13 * |
13 * |
14 * Description: XML UI Controller main class |
14 * Description: XML UI Controller main class |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 |
18 #ifndef _XMLUICONTROLLER_H |
19 #ifndef C_XMLUICONTROLLER_H |
19 #define _XMLUICONTROLLER_H |
20 #define C_XMLUICONTROLLER_H |
20 |
21 |
21 // System includes |
|
22 |
|
23 // User includes |
22 #include <aisystemuids.hrh> |
24 #include <aisystemuids.hrh> |
23 #include "aiuicontroller.h" |
25 #include "aiuicontroller.h" |
24 #include "aiuieventhandler.h" |
26 #include "aiuieventhandler.h" |
25 |
27 |
26 |
28 // Constants |
27 const TInt KImplementationUidXmlUiController = AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML; |
29 const TInt KImplementationUidXmlUiController = AI3_UID_ECOM_IMPLEMENTATION_UICONTROLLER_XML; |
28 const TUid KUidXmlUiController = { KImplementationUidXmlUiController }; |
30 const TUid KUidXmlUiController = { KImplementationUidXmlUiController }; |
29 |
31 |
30 |
32 // Forward declarations |
31 class CApaApplication; |
33 class CApaApplication; |
32 class TXnUiEngineAppIf; |
34 class TXnUiEngineAppIf; |
33 class CXnNodeAppIf; |
35 class CXnNodeAppIf; |
34 class CRepository; |
36 class CRepository; |
|
37 class THsPublisherInfo; |
35 |
38 |
36 namespace AiXmlUiController |
39 namespace AiXmlUiController |
37 { |
40 { |
38 |
|
39 class CAppUi; |
41 class CAppUi; |
40 class CAIXuikonEventHandler; |
42 class CAIXuikonEventHandler; |
41 class CXmlNodeIdGenerator; |
43 class CXmlNodeIdGenerator; |
42 class CContentRenderer; |
44 class CContentRenderer; |
43 class CContentPublisher; |
45 class CContentPublisher; |
44 |
46 |
45 |
|
46 /** |
47 /** |
47 * @ingroup group_xmluicontroller |
48 * @ingroup group_xmluicontroller |
48 * |
49 * |
49 * Active Idle XML UI Controller. |
50 * Active Idle XML UI Controller. |
50 */ |
51 */ |
51 class CXmlUiController : public CAiUiController, |
52 NONSHARABLE_CLASS( CXmlUiController ) : public CAiUiController, |
52 public MAiMainUiController, |
53 public MAiMainUiController, public MAiUiEventHandler |
53 public MAiUiEventHandler |
|
54 { |
54 { |
55 public: |
55 public: |
56 // Constructors and destructor |
56 // Constructors and destructor |
57 |
57 |
58 static CXmlUiController* NewL(); |
58 static CXmlUiController* NewL(); |
134 * @return Settings repository |
134 * @return Settings repository |
135 */ |
135 */ |
136 CRepository& SettingsRepository() const; |
136 CRepository& SettingsRepository() const; |
137 |
137 |
138 /** |
138 /** |
139 * Gets native ui publishers |
|
140 * |
|
141 * @since S60 5.0 |
|
142 * @param aPlugins Array where plugins are appended. |
|
143 */ |
|
144 void PublisherInfoL( RAiPublisherInfoArray& aPlugins ); |
|
145 |
|
146 /** |
|
147 * Gets xml ui publishers |
139 * Gets xml ui publishers |
148 * |
140 * |
149 * @since S60 5.0 |
141 * @since S60 5.2 |
150 * @param aSource Xml node which defineds the publisher |
142 * @param aSource Xml node which defineds the publisher |
151 * @param aInfo Publisher info filled based aSource information |
143 * @param aPublisherInfo Publisher info filled based aSource information |
152 */ |
144 */ |
153 void PublisherInfoL( CXnNodeAppIf& aSource, |
145 void PublisherInfoL( CXnNodeAppIf& aSource, |
154 TAiPublisherInfo& aInfo ); |
146 THsPublisherInfo& aPublisherInfo ); |
155 |
147 |
156 public: |
148 public: |
157 // from CAiUiController |
149 // from CAiUiController |
158 |
150 |
|
151 /** |
|
152 * @see CAiUiController |
|
153 */ |
159 void LoadUIDefinitionL(); |
154 void LoadUIDefinitionL(); |
160 |
155 |
161 void GetPluginsL( RAiPublisherInfoArray& aPlugins ); |
156 /** |
162 |
157 * @see CAiUiController |
163 void GetSettingsL( const TAiPublisherInfo& aPubInfo, |
158 */ |
|
159 void GetSettingsL( const THsPublisherInfo& aPublisherInfo, |
164 RAiSettingsItemArray& aSettings ); |
160 RAiSettingsItemArray& aSettings ); |
165 |
161 |
|
162 /** |
|
163 * @see CAiUiController |
|
164 */ |
166 void ActivateUI(); |
165 void ActivateUI(); |
167 |
166 |
|
167 /** |
|
168 * @see CAiUiController |
|
169 */ |
168 MAiContentObserver& GetContentObserver(); |
170 MAiContentObserver& GetContentObserver(); |
169 |
171 |
|
172 /** |
|
173 * @see CAiUiController |
|
174 */ |
170 void SetEventHandler( MAiFwEventHandler& aFwEventHandler ); |
175 void SetEventHandler( MAiFwEventHandler& aFwEventHandler ); |
171 |
176 |
172 void RemovePluginFromUI( MAiPropertyExtension& aPlugin ); |
177 /** |
173 |
178 * @see CAiUiController |
|
179 */ |
|
180 void SetStateHandler( MAiFwStateHandler& aFwStateHandler ); |
|
181 |
|
182 /** |
|
183 * @see CAiUiController |
|
184 */ |
174 MAiMainUiController* MainInterface(); |
185 MAiMainUiController* MainInterface(); |
175 |
186 |
|
187 /** |
|
188 * @see CAiUiController |
|
189 */ |
176 MAiSecondaryUiController* SecondaryInterface(); |
190 MAiSecondaryUiController* SecondaryInterface(); |
177 |
191 |
178 private: |
192 private: |
179 // from MAiMainUiController |
193 // from MAiMainUiController |
180 |
194 |
|
195 /** |
|
196 * @see MAiMainUiController |
|
197 */ |
181 void RunApplicationL(); |
198 void RunApplicationL(); |
182 |
199 |
|
200 /** |
|
201 * @see MAiMainUiController |
|
202 */ |
183 CCoeEnv& CoeEnv(); |
203 CCoeEnv& CoeEnv(); |
184 |
204 |
185 void SetUiFrameworkObserver( MAiUiFrameworkObserver& aObserver ); |
205 /** |
186 |
206 * @see MAiMainUiController |
|
207 */ |
187 void Exit(); |
208 void Exit(); |
188 |
209 |
|
210 /** |
|
211 * @see MAiMainUiController |
|
212 */ |
189 TBool IsMenuOpen(); |
213 TBool IsMenuOpen(); |
190 |
214 |
191 private: |
215 private: |
192 // from MAiUiEventHandler |
216 // from MAiUiEventHandler |
193 |
217 |
|
218 /** |
|
219 * @see MAiUiEventHandler |
|
220 */ |
194 TBool HandleUiEvent(TAny* aEvent, const TDesC8& aParam); |
221 TBool HandleUiEvent(TAny* aEvent, const TDesC8& aParam); |
195 |
222 |
196 private: |
223 private: |
197 // Constructors |
224 // Constructors |
198 |
225 |
|
226 /** |
|
227 * C++ default constructor |
|
228 */ |
199 CXmlUiController(); |
229 CXmlUiController(); |
200 |
230 |
|
231 /** |
|
232 * 2nd phase constructor |
|
233 */ |
201 void ConstructL(); |
234 void ConstructL(); |
202 |
235 |
203 private: |
236 private: |
204 // New methods |
237 // New functions |
|
238 |
205 static CApaApplication* NewApplication(); |
239 static CApaApplication* NewApplication(); |
206 |
240 |
207 void HandleFocusGainedL( const TDesC8& aUiElement1, const TDesC8& aUiElement2, CXnNodeAppIf& aOrigin ); |
241 void HandleFocusGainedL( const TDesC8& aUiElement1, |
208 |
242 const TDesC8& aUiElement2, CXnNodeAppIf& aOrigin ); |
209 void HandleSetElementSizeL( const TDesC8& aElementName, CXnNodeAppIf& aOrigin ); |
243 |
210 |
244 void HandleSetElementSizeL( const TDesC8& aElementName, |
211 static TInt ExitTimerCallBack(TAny *aSelf); |
245 CXnNodeAppIf& aOrigin ); |
212 |
246 |
213 void GetSettingsFromCRL( const TAiPublisherInfo& aPubInfo, RAiSettingsItemArray &aPluginSettings ); |
247 static TInt ExitTimerCallBack( TAny *aSelf ); |
214 |
248 |
215 void GetContentItemL( CXnNodeAppIf& aNode, RAiSettingsItemArray& aSettings, HBufC*& aItemName ); |
249 void GetContentItemL( CXnNodeAppIf& aNode, |
216 |
250 RAiSettingsItemArray& aSettings, HBufC*& aItemName ); |
217 void GetConfigurationsL( CXnNodeAppIf& aNode, RAiSettingsItemArray& aSettings, const TDesC& aConfOwner ); |
251 |
218 |
252 void GetConfigurationsL( CXnNodeAppIf& aNode, |
219 void GetContentModelL(const TAiPublisherInfo& aPubInfo, RAiSettingsItemArray& aSettings); |
253 RAiSettingsItemArray& aSettings, const TDesC& aConfOwner ); |
|
254 |
|
255 void GetContentModelL( const THsPublisherInfo& aPubInfo, |
|
256 RAiSettingsItemArray& aSettings ); |
220 |
257 |
221 private: // data |
258 private: |
|
259 // data |
222 |
260 |
223 /** |
261 /** Ai content observer, Not owned */ |
224 * Ai content observer. Not own. |
262 MAiContentObserver* iObserver; |
225 */ |
263 /** AiFw Event handler, Not owned */ |
226 MAiContentObserver* iObserver; |
|
227 |
|
228 /** |
|
229 * Ui framework observer. Not own. |
|
230 */ |
|
231 MAiUiFrameworkObserver* iUiFrameworkObserver; |
|
232 |
|
233 /** |
|
234 * Event handler. Not own. |
|
235 */ |
|
236 MAiFwEventHandler* iFwEventHandler; |
264 MAiFwEventHandler* iFwEventHandler; |
237 |
265 /** AiFw State handler, Not owned */ |
238 /** |
266 MAiFwStateHandler* iFwStateHandler; |
239 * Node id generator. Own. |
267 /** * Node id generator, Owned */ |
240 */ |
268 CXmlNodeIdGenerator* iNodeIdGenerator; |
241 CXmlNodeIdGenerator* iNodeIdGenerator; |
269 /** AppUi, Not owned */ |
242 |
270 CAppUi* iAppUi; |
243 /** |
271 /** Timer to call AppUi's exit, Owned */ |
244 * App UI. Not own. |
|
245 */ |
|
246 CAppUi* iAppUi; |
|
247 |
|
248 /** |
|
249 * Timer to call AppUi's exit. Own. |
|
250 **/ |
|
251 CPeriodic *iExitTimer; |
272 CPeriodic *iExitTimer; |
252 |
273 /** Cenrep, Owned */ |
253 /** |
|
254 * Cenrep. Own. |
|
255 */ |
|
256 CRepository *iAISettingsRepository; |
274 CRepository *iAISettingsRepository; |
257 |
275 /** CPS publisher, Owned */ |
258 /** |
276 CContentPublisher* iCPSpublisher; |
259 * CPS publisher. Own. |
277 /** Flag to indicate whether running as main UI controller */ |
260 */ |
|
261 CContentPublisher* iCPSpublisher; |
|
262 |
|
263 /** |
|
264 * Flag to indicate whether running as main UI controller |
|
265 */ |
|
266 TBool iRunningAsMain; |
278 TBool iRunningAsMain; |
267 }; |
279 }; |
268 } // namespace AiXmlUiController |
280 } // namespace AiXmlUiController |
269 |
281 |
270 #endif // C_XMLUICONTROLLER_H |
282 #endif // _XMLUICONTROLLER_H |
|
283 |
|
284 // End of file |