17 |
17 |
18 |
18 |
19 #ifndef C_APPUI_H |
19 #ifndef C_APPUI_H |
20 #define C_APPUI_H |
20 #define C_APPUI_H |
21 |
21 |
|
22 // System includes |
22 #include <coeview.h> |
23 #include <coeview.h> |
|
24 |
|
25 // User includes |
|
26 #include <hspublisherinfo.h> |
23 #include "xnappuiadapter.h" |
27 #include "xnappuiadapter.h" |
24 |
28 |
25 |
29 // Forward declarations |
26 class CAiUiIdleIntegration; |
30 class CAiUiIdleIntegration; |
27 class MAiUiFrameworkObserver; |
|
28 |
31 |
29 namespace AiXmlUiController |
32 namespace AiXmlUiController |
30 { |
33 { |
31 class CContentRenderer; |
34 class CContentRenderer; |
32 class CXmlUiController; |
35 class CXmlUiController; |
38 * |
41 * |
39 * AppUI class of XML UI Controller application |
42 * AppUI class of XML UI Controller application |
40 * |
43 * |
41 * @lib AiXmlUiMain |
44 * @lib AiXmlUiMain |
42 */ |
45 */ |
43 NONSHARABLE_CLASS( CAppUi ) : public CXnAppUiAdapter, |
46 NONSHARABLE_CLASS( CAppUi ) : public CXnAppUiAdapter, |
44 public MCoeViewActivationObserver |
47 public MCoeViewActivationObserver |
45 { |
48 { |
46 public: // Constructors and destructor |
49 public: // Constructors and destructor |
47 |
50 |
48 static CAppUi* NewL( CXmlUiController& aUiCtl ); |
51 static CAppUi* NewL( CXmlUiController& aUiCtl ); |
53 // new functions |
56 // new functions |
54 CCoeEnv* CoeEnv() { return iCoeEnv; } |
57 CCoeEnv* CoeEnv() { return iCoeEnv; } |
55 |
58 |
56 private: |
59 private: |
57 // from CXnAppUiAdapter |
60 // from CXnAppUiAdapter |
|
61 |
58 void PrepareToExit(); |
62 void PrepareToExit(); |
59 |
63 |
60 void HandleForegroundEventL( TBool aForeground ); |
|
61 |
|
62 void HandleCommandL( TInt aCommand ); |
64 void HandleCommandL( TInt aCommand ); |
63 |
|
64 void HandleResourceChangeL( TInt aType ); |
|
65 |
65 |
66 void HandleXuikonEventL( CXnNodeAppIf& aOrigin, CXnNodeAppIf& aTrigger, |
66 void HandleXuikonEventL( CXnNodeAppIf& aOrigin, CXnNodeAppIf& aTrigger, |
67 CXnDomNode& aTriggerDefinition, CXnDomNode& aEvent ); |
67 CXnDomNode& aTriggerDefinition, CXnDomNode& aEvent ); |
|
68 |
|
69 void HandleEventL( const TDesC& aEvent, CXnNodeAppIf& aDestination ); |
68 |
70 |
69 void HandleWsEventL( const TWsEvent& aEvent, |
71 void HandleWsEventL( const TWsEvent& aEvent, |
70 CCoeControl* aDestination ); |
72 CCoeControl* aDestination ); |
71 |
73 |
72 void LoadDataPluginsL( RPointerArray< CXnNodeAppIf >& aList ); |
74 TInt LoadPublisher( CXnNodeAppIf& aPublisher, TInt aReason ); |
73 |
75 |
74 void DestroyDataPluginsL( RPointerArray< CXnNodeAppIf >& aList ); |
76 TInt DestroyPublisher( CXnNodeAppIf& aPublisher, TInt aReason ); |
75 |
77 |
76 void SetOnlineStateL( RPointerArray< CXnNodeAppIf >& aList ); |
|
77 |
|
78 TBool DynInitMenuItemL( const TDesC& aItemType, |
78 TBool DynInitMenuItemL( const TDesC& aItemType, |
79 RPointerArray< CXnNodeAppIf >* aList = NULL ); |
79 RPointerArray< CXnNodeAppIf >* aList = NULL ); |
80 |
|
81 void HandlePageSwitch(); |
|
82 |
80 |
83 void HandleEnterEditModeL( TBool aEnter ); |
81 void HandleEnterEditModeL( TBool aEnter ); |
84 |
82 |
85 private: |
|
86 // new functions |
|
87 void LoadNativeDataPluginsL(); |
|
88 void DestroyNativeDataPluginsL(); |
|
89 |
83 |
90 private: |
84 private: |
91 // from MCoeViewActivationObserver |
85 // from MCoeViewActivationObserver |
92 |
86 |
93 /** |
87 /** |
94 * @see MCoeViewActivationObserver |
88 * @see MCoeViewActivationObserver |
95 */ |
89 */ |
96 void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, |
90 void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, |
97 const TVwsViewId& aViewIdToBeDeactivated ); |
91 const TVwsViewId& aViewIdToBeDeactivated ); |
98 |
92 |
99 public: |
93 public: |
100 // new functions |
94 // new functions |
101 |
95 |
102 /** |
96 /** |
103 * Sets plugins online state |
97 * Sets plugins online state |
124 void ConstructL(); |
126 void ConstructL(); |
125 |
127 |
126 private: |
128 private: |
127 // data |
129 // data |
128 |
130 |
129 /** |
131 /** UI Controller implementation, not owned */ |
130 * UI Controller implementation. Not own. |
|
131 */ |
|
132 CXmlUiController& iUiCtl; |
132 CXmlUiController& iUiCtl; |
133 |
133 /** Event handler, owned */ |
134 /** |
134 CAIXuikonEventHandler* iEventHandler; |
135 * Event handler. Own. |
135 /** Content renderer, owned */ |
136 */ |
136 CContentRenderer* iContentRenderer; |
137 CAIXuikonEventHandler* iEventHandler; |
137 /** Idle Integration helper object, owed */ |
138 |
|
139 /** |
|
140 * Content renderer. Own. |
|
141 */ |
|
142 CContentRenderer* iContentRenderer; |
|
143 |
|
144 /** |
|
145 * Ui framework event observer. Not own. |
|
146 */ |
|
147 MAiUiFrameworkObserver* iUiFwObserver; |
|
148 |
|
149 /** |
|
150 * Idle Integration helper object. Own. |
|
151 */ |
|
152 CAiUiIdleIntegration* iIdleIntegration; |
138 CAiUiIdleIntegration* iIdleIntegration; |
153 |
139 /** Online/Offline helper object, owned */ |
154 /** |
140 COnlineOfflineHelper* iHelper; |
155 * Online/Offline helper object. Own. |
141 /** DeviceStatus publisher info */ |
156 */ |
142 THsPublisherInfo iDeviceStatusInfo; |
157 COnlineOfflineHelper* iHelper; |
143 /** Flag to indicate whether edit mode is active */ |
158 |
144 TBool iInEditMode; |
159 /** |
145 /** Flag to indicate UI shutdown sequence is ongoing */ |
160 * Flag to indicate whether native plugins are loaded. |
146 TBool iUiShutdown; |
161 */ |
|
162 TBool iNativePluginsLoaded; |
|
163 |
|
164 /** |
|
165 * Flag to indicate whether edit mode is active. |
|
166 */ |
|
167 TBool iIsEditModeActive; |
|
168 }; |
147 }; |
169 |
148 |
170 } // namespace AiXmlUiController |
149 } // namespace AiXmlUiController |
171 |
150 |
172 #endif // C_APPUI_H |
151 #endif // C_APPUI_H |