|
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: UI controller stub |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _AIUICONTROLLER_STUB_H |
|
20 #define _AIUICONTROLLER_STUB_H |
|
21 |
|
22 // System includes |
|
23 #include <e32base.h> |
|
24 |
|
25 // User includes |
|
26 #include <aiuicontroller.h> |
|
27 #include <aicontentobserver.h> |
|
28 |
|
29 #include <hscontentpublisher.h> |
|
30 |
|
31 // Forward declarations |
|
32 class MAiContentObserver; |
|
33 class MAiFwEventHandler; |
|
34 class MAiFwStateHandler; |
|
35 class MAiMainUiController; |
|
36 class MAiSecondaryUiController; |
|
37 |
|
38 // Class declaration |
|
39 /** |
|
40 * @ingroup group_aifw |
|
41 * |
|
42 * Active Idle UI Controller stub. |
|
43 * |
|
44 * @since S60 5.2 |
|
45 */ |
|
46 NONSHARABLE_CLASS( CAiUiControllerStub ) : public CAiUiController, |
|
47 public MAiMainUiController, |
|
48 public MAiSecondaryUiController, |
|
49 public MAiContentObserver |
|
50 { |
|
51 public: |
|
52 // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 */ |
|
57 static CAiUiControllerStub* NewL(); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 */ |
|
62 static CAiUiControllerStub* NewL( TUid aImpUid ); |
|
63 |
|
64 /** |
|
65 * Destructor |
|
66 */ |
|
67 ~CAiUiControllerStub(); |
|
68 |
|
69 public: |
|
70 // from CAiUiController |
|
71 |
|
72 /** |
|
73 * Instructs this UI controller to load its UI definition. |
|
74 * |
|
75 * @since Series 60 3.2 |
|
76 */ |
|
77 void LoadUIDefinitionL(); |
|
78 |
|
79 /** |
|
80 * Retrieves plug-in settings specified in this UI controller's UI definition. |
|
81 * |
|
82 * @param aPublisherInfo Publisher info of the plug-in for which to |
|
83 * retrieve settings for. |
|
84 * @param aSettings array to get settings items to. |
|
85 */ |
|
86 void GetSettingsL( |
|
87 const THsPublisherInfo& aPublisherInfo, |
|
88 RAiSettingsItemArray& aSettings ); |
|
89 |
|
90 /** |
|
91 * Activate UI managed by this UI controller. |
|
92 * |
|
93 * @since Series 60 3.2 |
|
94 */ |
|
95 void ActivateUI(); |
|
96 |
|
97 /** |
|
98 * Returns content observer interface implemented by this UI controller. |
|
99 * |
|
100 * @since Series 60 3.2 |
|
101 * @return reference to content observer implementation. |
|
102 */ |
|
103 MAiContentObserver& GetContentObserver(); |
|
104 |
|
105 /** |
|
106 * Sets the Active Idle Framework event handler for this UI Controller. |
|
107 * |
|
108 * @since Series 60 3.2 |
|
109 * @param aEventHandler Framework event handler for this UI controller. |
|
110 * Set to NULL to disable event callbacks from this |
|
111 * UI Controller. |
|
112 */ |
|
113 void SetEventHandler( MAiFwEventHandler& aEventHandler ); |
|
114 |
|
115 /** |
|
116 * Sets plugin state handler |
|
117 * |
|
118 * @since S60 5.2 |
|
119 * @param aHandler Plugin State Handler |
|
120 */ |
|
121 void SetStateHandler( MAiFwStateHandler& aStateHandler ); |
|
122 |
|
123 /** |
|
124 * Returns the main UI Controller interface, or NULL if this is not the |
|
125 * main UI controller. |
|
126 */ |
|
127 MAiMainUiController* MainInterface(); |
|
128 |
|
129 /** |
|
130 * Returns the secondary UI Controller interface, or NULL if this is not |
|
131 * a secondary UI controller. |
|
132 */ |
|
133 MAiSecondaryUiController* SecondaryInterface(); |
|
134 |
|
135 public: |
|
136 // from MAiMainUiController |
|
137 |
|
138 /** |
|
139 * @see MAiMainUiController |
|
140 */ |
|
141 void RunApplicationL(); |
|
142 |
|
143 /** |
|
144 * @see MAiMainUiController |
|
145 */ |
|
146 CCoeEnv& CoeEnv(); |
|
147 |
|
148 /** |
|
149 * @see MAiMainUiController |
|
150 */ |
|
151 void Exit(); |
|
152 |
|
153 /** |
|
154 * @see MAiMainUiController |
|
155 */ |
|
156 TBool IsMenuOpen(); |
|
157 |
|
158 public: |
|
159 // from MAiSecondaryUiController |
|
160 |
|
161 /** |
|
162 * @see MAiSecondaryUiController |
|
163 */ |
|
164 void SetCoeEnv( CCoeEnv& aCoeEnv ); |
|
165 |
|
166 public: |
|
167 // from MAiContentObserver |
|
168 |
|
169 /** |
|
170 * @see MAiContentObserver |
|
171 */ |
|
172 TInt StartTransaction( TInt aTxId ); |
|
173 |
|
174 TInt Commit( TInt aTxId ); |
|
175 |
|
176 TInt CancelTransaction( TInt aTxId ); |
|
177 |
|
178 TBool CanPublish( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ); |
|
179 |
|
180 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, TInt aResource, TInt aIndex ); |
|
181 |
|
182 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC16& aText, TInt aIndex ); |
|
183 |
|
184 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, const TDesC8& aBuf, TInt aIndex ); |
|
185 |
|
186 TInt Publish( CHsContentPublisher& aPlugin, TInt aContent, RFile& aFile, TInt aIndex ); |
|
187 |
|
188 TInt Clean( CHsContentPublisher& aPlugin, TInt aContent, TInt aIndex ); |
|
189 |
|
190 TAny* Extension( TUid aUid ); |
|
191 |
|
192 TBool RequiresSubscription( const THsPublisherInfo& aPublisherInfo ) const; |
|
193 |
|
194 TInt SetProperty( CHsContentPublisher& aPlugin, |
|
195 const TDesC8& aElementId, |
|
196 const TDesC8& aPropertyName, |
|
197 const TDesC8& aPropertyValue ); |
|
198 |
|
199 TInt SetProperty( CHsContentPublisher& aPlugin, |
|
200 const TDesC8& aElementId, |
|
201 const TDesC8& aPropertyName, |
|
202 const TDesC8& aPropertyValue, |
|
203 MAiContentObserver::TValueType aValueType); |
|
204 private: |
|
205 // private constructors |
|
206 |
|
207 /** |
|
208 * Leaving constructor |
|
209 */ |
|
210 void ConstructL(); |
|
211 |
|
212 /** |
|
213 * C++ default constructor |
|
214 */ |
|
215 CAiUiControllerStub(); |
|
216 |
|
217 public: |
|
218 // data |
|
219 TBool iMain; |
|
220 TBool iRunning; |
|
221 TBool iExit; |
|
222 TBool iActive; |
|
223 TBool iSettings; |
|
224 TBool iUiDefinition; |
|
225 TBool iEventHandler; |
|
226 TBool iStateHandler; |
|
227 }; |
|
228 |
|
229 #endif // _AIUICONTROLLER_STUB_H |
|
230 |