|
1 /* |
|
2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Device status plugin interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_AIDEVICESTATUSPLUGIN_H |
|
20 #define C_AIDEVICESTATUSPLUGIN_H |
|
21 |
|
22 |
|
23 #include <aicontentpublisher.h> |
|
24 #include <aipropertyextension.h> |
|
25 #include <aicontentrequest.h> |
|
26 |
|
27 class MAiDeviceStatusPublisher; |
|
28 class CAiContentItemArrayIterator; |
|
29 class CAiDeviceStatusPluginEngine; |
|
30 class CAiMultiContentObserver; |
|
31 class CAiPublishPrioritizer; |
|
32 class CAiNetworkInfoListener; |
|
33 |
|
34 /** |
|
35 * @ingroup group_devicestatusplugin |
|
36 * |
|
37 * Device status plugin interface. |
|
38 * |
|
39 * This class implements required active idle plugin API. |
|
40 * |
|
41 * @since S60 3.2 |
|
42 */ |
|
43 class CAiDeviceStatusPlugin : public CAiContentPublisher, |
|
44 public MAiPropertyExtension, |
|
45 public MAiContentRequest |
|
46 { |
|
47 public: |
|
48 |
|
49 static CAiDeviceStatusPlugin* NewL(); |
|
50 static CAiDeviceStatusPlugin* NewLC(); |
|
51 |
|
52 virtual ~CAiDeviceStatusPlugin(); |
|
53 |
|
54 protected: |
|
55 |
|
56 // from base class CAiContentPublisher |
|
57 void Resume( TAiTransitionReason aReason ); |
|
58 void Suspend( TAiTransitionReason aReason ); |
|
59 void Stop( TAiTransitionReason aReason ); |
|
60 void SubscribeL(MAiContentObserver& aObserver); |
|
61 TAny* Extension(TUid aUid); |
|
62 void ConfigureL(RAiSettingsItemArray& aSettings); |
|
63 |
|
64 protected: |
|
65 |
|
66 // from base class MAiPropertyExtension |
|
67 TAny* GetPropertyL(TInt aProperty); |
|
68 void SetPropertyL(TInt aProperty, TAny* aValue); |
|
69 |
|
70 // from base class MAiContentRequest |
|
71 TBool RefreshContent( TInt aContentId ); |
|
72 |
|
73 |
|
74 private: |
|
75 |
|
76 CAiDeviceStatusPlugin(); |
|
77 void ConstructL(); |
|
78 |
|
79 void AllocateResourcesL(); |
|
80 void FreeResources(); |
|
81 void DoResumeL( TAiTransitionReason aReason ); |
|
82 TBool IgnoreReason( TAiTransitionReason aReason ); |
|
83 |
|
84 /** |
|
85 * Add device status publisher. |
|
86 */ |
|
87 void AddPublisherL( MAiDeviceStatusPublisher* aPublisher ); |
|
88 |
|
89 private: // data |
|
90 |
|
91 /** |
|
92 * Device Status Plug-in Engine. |
|
93 * Own. |
|
94 */ |
|
95 CAiDeviceStatusPluginEngine* iEngine; |
|
96 |
|
97 /** |
|
98 * Content observers. |
|
99 * Own. |
|
100 */ |
|
101 CAiMultiContentObserver* iContentObservers; |
|
102 |
|
103 /** |
|
104 * Device Status Plug-in content prioritizer. |
|
105 * Own. |
|
106 */ |
|
107 CAiPublishPrioritizer* iPrioritizer; |
|
108 |
|
109 /** |
|
110 * Content item array iterator. |
|
111 * Own. |
|
112 */ |
|
113 MAiContentItemIterator* iContent; |
|
114 |
|
115 /** |
|
116 * Content item array iterator for resources. |
|
117 * Own. |
|
118 */ |
|
119 MAiContentItemIterator* iResources; |
|
120 |
|
121 /** |
|
122 * Publisher info. |
|
123 */ |
|
124 TAiPublisherInfo iInfo; |
|
125 |
|
126 /** |
|
127 * Offset of the loaded resource file. |
|
128 */ |
|
129 TInt iResourceOffset; |
|
130 |
|
131 /** |
|
132 * Network info listener. |
|
133 * Own. |
|
134 */ |
|
135 CAiNetworkInfoListener* iListener; |
|
136 }; |
|
137 |
|
138 |
|
139 #endif // C_AIDEVICESTATUSPLUGIN_H |