|
1 /* |
|
2 * Copyright (c) 2007-2008 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 the License "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: CVcxNsSettingsView view class definitions.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VCXNSSETTINGSVIEW_H |
|
21 #define VCXNSSETTINGSVIEW_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <akncontext.h> |
|
25 #include <AknsUtils.h> |
|
26 #include <gsplugininterface.h> |
|
27 #include <gstabbedview.h> |
|
28 |
|
29 #include "feedsettingsview.hrh" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CVcxNsSettingsViewContainer; |
|
33 class CIptvResourceLoader; |
|
34 class CVcxNsSettingsEngine; |
|
35 class CVcxNsServiceSettings; |
|
36 class MMPXViewUtility; |
|
37 |
|
38 class MGSTabbedView; |
|
39 class CGSTabHelper; |
|
40 class CAknNavigationDecorator; |
|
41 class MMPSettingsNaviPaneController; |
|
42 |
|
43 // CONSTS |
|
44 const TInt32 KVcxNsSettingsViewUid = 0x20016B99; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * CVcxNsSettingsView view class definitions. |
|
50 * |
|
51 * @lib vcsettingsview.lib |
|
52 * @since S60 5.0 |
|
53 */ |
|
54 class CVcxNsSettingsView : public CGSPluginInterface, |
|
55 public MGSTabbedView |
|
56 { |
|
57 public: |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 */ |
|
62 IMPORT_C static CVcxNsSettingsView* NewL( ); |
|
63 |
|
64 /** |
|
65 * Two-phased constructor. |
|
66 */ |
|
67 IMPORT_C static CVcxNsSettingsView* NewLC( CArrayPtrFlat<MGSTabbedView>* aTabViewArray = NULL); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 IMPORT_C virtual ~CVcxNsSettingsView( ); |
|
73 |
|
74 protected: |
|
75 /** |
|
76 * Constructor. |
|
77 */ |
|
78 IMPORT_C CVcxNsSettingsView( const TUid aViewId = TUid::Uid( KVcxNsSettingsViewUid ) ); |
|
79 |
|
80 /** |
|
81 * EPOC default constructor. |
|
82 */ |
|
83 IMPORT_C void ConstructL( CArrayPtrFlat<MGSTabbedView>* aTabViewArray ); |
|
84 |
|
85 public: |
|
86 |
|
87 /** |
|
88 * MGSTabbedView |
|
89 */ |
|
90 CGulIcon* CreateTabIconL(); |
|
91 |
|
92 /** |
|
93 * From CAknView. |
|
94 */ |
|
95 TUid Id( ) const; |
|
96 |
|
97 /** |
|
98 * From CAknView. |
|
99 * |
|
100 * @param aCommand Command for view. |
|
101 */ |
|
102 IMPORT_C void HandleCommandL(TInt aCommand); |
|
103 |
|
104 /** |
|
105 * Handles client rectangle changes. |
|
106 */ |
|
107 IMPORT_C void HandleClientRectChange(); |
|
108 |
|
109 /** |
|
110 * Handles routed key events. Other components might route their key events |
|
111 * here because this view has overall control of the Settings UI. |
|
112 */ |
|
113 TKeyResponse RoutedKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType ); |
|
114 |
|
115 /** |
|
116 * Returns the button group container. Can be used for changing softkeys. |
|
117 * |
|
118 * @return Button group container. |
|
119 */ |
|
120 CEikButtonGroupContainer* GetButtonGroupContainer( ); |
|
121 |
|
122 /** |
|
123 * Sets "service subscription" mode on. When Settings UI is activated |
|
124 * in this mode, it goes directly to service subscriptions view. |
|
125 */ |
|
126 void SetServiceSubscriptionMode(); |
|
127 |
|
128 /** |
|
129 * Sets "Vodcast add feed subscription" mode on. When this is activated |
|
130 * it goes directly Add feed and returns to Vodcast view. |
|
131 */ |
|
132 void SetVodcastAddFeedMode(); |
|
133 |
|
134 /** |
|
135 * Checks if Settings UI is currently being displayed. |
|
136 * |
|
137 * @return ETrue if Settings UI is active. |
|
138 */ |
|
139 TBool IsSettingsViewActive(); |
|
140 |
|
141 /** |
|
142 * From CGSPluginInterface |
|
143 * GetCaptionL |
|
144 * Dummy implementation, implemented in settings plugin. |
|
145 */ |
|
146 virtual void GetCaptionL( TDes& /*aCaption*/ ) const {}; |
|
147 |
|
148 /** |
|
149 * Is the view launhed from general settings framework? |
|
150 * @return Is it launched from gs fw. |
|
151 */ |
|
152 TBool LaunchedFromGsFw( ); |
|
153 |
|
154 /** |
|
155 * Returns pointer to container |
|
156 * |
|
157 * @return Pointer to container. |
|
158 */ |
|
159 CVcxNsSettingsViewContainer* Container(); |
|
160 |
|
161 /** |
|
162 * Sets navi pane. |
|
163 * |
|
164 * @param aDisableNaviPane If ETrue navi pane is disabled. |
|
165 */ |
|
166 void SetNaviPaneL( TBool aDisableNaviPane = EFalse ); |
|
167 |
|
168 protected: |
|
169 |
|
170 /** |
|
171 * Handles activation message. |
|
172 * |
|
173 * @param aCustomMessage Custom message |
|
174 */ |
|
175 void HandleActivationMessageL( const TDesC8& aCustomMessage ); |
|
176 |
|
177 /** |
|
178 * Handle Back command. |
|
179 */ |
|
180 void HandleBackCommandL(); |
|
181 |
|
182 /** |
|
183 * Handle Back command service selection. |
|
184 */ |
|
185 void HandleBackCommandForServiceSelectionL(); |
|
186 |
|
187 /** |
|
188 * Handle Back command for add service view |
|
189 */ |
|
190 void HandleBackCommandForAddServiceL(); |
|
191 |
|
192 /** |
|
193 * Handle Add/Edit VoD service command. |
|
194 * |
|
195 * @param aIsAdding EFalse for edit, ETrue for add. |
|
196 */ |
|
197 void HandleVodAddOrEditCommandL( TBool aIsAdding ); |
|
198 |
|
199 /** |
|
200 * Saves service selection. |
|
201 * |
|
202 */ |
|
203 void SaveServiceSelectionL(); |
|
204 |
|
205 /** |
|
206 * From CAknView |
|
207 * Called when view is activated. |
|
208 * @param aPrevViewId |
|
209 * @param aCustomMessageId |
|
210 * @param aCustomMessage |
|
211 */ |
|
212 IMPORT_C virtual void DoActivateL( const TVwsViewId& aPrevViewId, |
|
213 TUid aCustomMessageId, |
|
214 const TDesC8& aCustomMessage ); |
|
215 |
|
216 /** |
|
217 * From CAknView |
|
218 * Called when view is deactivated. |
|
219 */ |
|
220 IMPORT_C virtual void DoDeactivate(); |
|
221 |
|
222 /** |
|
223 * Adjusts the visible items in menu pane accordding to Settings UI state. |
|
224 * |
|
225 * @param aResourceId Resource ID identifying the menu pane to initialise. |
|
226 * @param aMenuPane The in-memory representation of the menu pane. |
|
227 */ |
|
228 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
229 |
|
230 /** |
|
231 * Handles status pane size changes. |
|
232 */ |
|
233 IMPORT_C void HandleStatusPaneSizeChange(); |
|
234 |
|
235 /** |
|
236 * Locates the mif file searching from y: to a: and then z: last |
|
237 * |
|
238 * @param aFileName Full path to mif file. |
|
239 */ |
|
240 void LocateMifFileL( TFileName& aFileName ); |
|
241 |
|
242 private: |
|
243 |
|
244 /** |
|
245 * This view's ID |
|
246 */ |
|
247 TUid iViewId; |
|
248 |
|
249 /** |
|
250 * Settings control container |
|
251 */ |
|
252 CVcxNsSettingsViewContainer* iContainer; |
|
253 |
|
254 /** |
|
255 * Resource loader |
|
256 */ |
|
257 CIptvResourceLoader* iResourceLoader; |
|
258 |
|
259 /** |
|
260 * Previously active view's ID |
|
261 */ |
|
262 TVwsViewId iPrevViewId; |
|
263 |
|
264 /** |
|
265 * Status pane layout from previously active view. |
|
266 */ |
|
267 TInt iPrevStatusPaneLayout; |
|
268 |
|
269 /** |
|
270 * iFs |
|
271 */ |
|
272 RFs iFs; |
|
273 |
|
274 /** |
|
275 * Settings engine |
|
276 */ |
|
277 CVcxNsSettingsEngine* iSettingsEngine; |
|
278 |
|
279 /** |
|
280 * UI engine's service setting if. |
|
281 */ |
|
282 CVcxNsServiceSettings* iServiceSettings; |
|
283 |
|
284 /** |
|
285 * Is settings activated in ServiceSubscriptionMode |
|
286 */ |
|
287 TBool iServiceSubscriptionMode; |
|
288 |
|
289 /** |
|
290 * Is settings activated in VodcastAddFeedMode |
|
291 */ |
|
292 TBool iVodcastAddFeedMode; |
|
293 |
|
294 /** |
|
295 * Is settings activated from GSVideoPlugin |
|
296 */ |
|
297 TBool iGSVideoPluginMode; |
|
298 |
|
299 /** |
|
300 * Mpx view Utility |
|
301 */ |
|
302 MMPXViewUtility* iViewUtility; |
|
303 |
|
304 /** |
|
305 * General Settings tab helper |
|
306 */ |
|
307 CGSTabHelper* iTabHelper; |
|
308 |
|
309 /** |
|
310 * Navi pane context. |
|
311 * Not own. |
|
312 */ |
|
313 CAknNavigationDecorator* iNaviPaneContext; |
|
314 |
|
315 /** |
|
316 * Navi pane controller. |
|
317 * Not own. |
|
318 */ |
|
319 MMPSettingsNaviPaneController* iNaviCntrl; |
|
320 |
|
321 /* |
|
322 * View array. |
|
323 * Not own. |
|
324 */ |
|
325 CArrayPtrFlat<MGSTabbedView>* iViewArray; |
|
326 |
|
327 }; |
|
328 |
|
329 #endif // VCXNSSETTINGSVIEW_H |