|
1 /* |
|
2 * Copyright (c) 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: HG VOD Feed view implementation* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: tr1ido#REL6_12 % |
|
19 |
|
20 #ifndef VCXHGVODMAINVIEW_H |
|
21 #define VCXHGVODMAINVIEW_H |
|
22 |
|
23 #include <aknview.h> |
|
24 #include <videoplayeractivationmessage.h> |
|
25 #include "vcxviewmessageutility.h" |
|
26 |
|
27 class CAknTitlePane; |
|
28 class CAknNavigationControlContainer; |
|
29 class CEikonEnv; |
|
30 class CAknsBasicBackgroundControlContext; |
|
31 class CGulIcon; |
|
32 class CRepository; |
|
33 class CVcxHgVodMainViewContainer; |
|
34 class CIptvResourceLoader; |
|
35 class MEikMenuObserver; |
|
36 class CVcxNsPlayerWrapper; |
|
37 class CVcxNsUiEngine; |
|
38 class MMPXViewUtility; |
|
39 class CVcxNsContent; |
|
40 class CVcxHgVodServiceListImpl; |
|
41 class CVcxHgVodCategoryListImpl; |
|
42 class CVcxHgVodContentListImpl; |
|
43 class CVcxHgVodServiceGroupListImpl; |
|
44 class CVcxHgVodListImplBase; |
|
45 class CVcxHgVodTelephonyClient; |
|
46 class TViaPlayerCustomMessage; |
|
47 class CHgDoubleGraphicList; |
|
48 class CHgDoubleTextList; |
|
49 |
|
50 // CLASS DECLARATION |
|
51 /** |
|
52 * Main view |
|
53 * |
|
54 * |
|
55 * @code |
|
56 * |
|
57 * @endcode |
|
58 * |
|
59 * @lib vcxhgvodui.lib |
|
60 * @since S60 v5.0 |
|
61 */ |
|
62 class CVcxHgVodMainView : public CAknView, |
|
63 public MVcxViewMessageObserver |
|
64 { |
|
65 |
|
66 public: |
|
67 |
|
68 //list type |
|
69 enum TVcxHgVodListType |
|
70 { |
|
71 EVcxNsServiceList, |
|
72 EVcxNsCategoryList, |
|
73 EVcxNsContentList, |
|
74 EVcxNsCustomList |
|
75 }; |
|
76 |
|
77 /** |
|
78 * Two-phased constructor. |
|
79 */ |
|
80 IMPORT_C static CVcxHgVodMainView* NewL( ); |
|
81 |
|
82 /** |
|
83 * Two-phased constructor. |
|
84 */ |
|
85 IMPORT_C static CVcxHgVodMainView* NewLC( ); |
|
86 |
|
87 /** |
|
88 * Destructor. |
|
89 */ |
|
90 IMPORT_C virtual ~CVcxHgVodMainView(); |
|
91 |
|
92 /** |
|
93 * Accessor for the application's AppUi. |
|
94 * |
|
95 * @return Pointer to AppUi. |
|
96 */ |
|
97 CAknViewAppUi* AppUi() const { return CAknView::AppUi(); } |
|
98 |
|
99 /** |
|
100 * Get pointer to title pane |
|
101 * @return Pointer to CAknTitlePane |
|
102 */ |
|
103 CAknTitlePane* TitlePaneL(); |
|
104 |
|
105 /** |
|
106 * Get pointer to navi pane |
|
107 * @return Pointer to CAknNavigationControlContainer |
|
108 */ |
|
109 CAknNavigationControlContainer* NaviPaneL(); |
|
110 |
|
111 /** |
|
112 * Accessor for player wrapper. |
|
113 * |
|
114 * @return Pointer to player wrapper. |
|
115 */ |
|
116 CVcxNsPlayerWrapper* PlayerWrapper(); |
|
117 |
|
118 /** |
|
119 * Command handling function |
|
120 * @param aCommand ID of the command to respond to |
|
121 */ |
|
122 void HandleCommandL( TInt aCommand ); |
|
123 |
|
124 /** |
|
125 * Accessor for view container |
|
126 * |
|
127 */ |
|
128 CVcxHgVodMainViewContainer* Container(); |
|
129 |
|
130 /** |
|
131 * Handles key events from container. |
|
132 * |
|
133 * @param aKeyEvent Key event. |
|
134 * @param aType Key event type. |
|
135 * @return Response, tells if key was handled or not. |
|
136 */ |
|
137 TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
138 |
|
139 /** |
|
140 * Create list widget and related classes |
|
141 * @param aType List type |
|
142 */ |
|
143 void CreateListL( TVcxHgVodListType aType ); |
|
144 |
|
145 /** |
|
146 * Change list inside main view. |
|
147 * No actual view change, just switch to different list type. |
|
148 */ |
|
149 void ChangeListViewL(); |
|
150 |
|
151 /** |
|
152 * Open settings view via mpx view utility |
|
153 * @param aCommand Command for the state where settings is opened |
|
154 */ |
|
155 void OpenSettingsL( TInt aCommand ); |
|
156 |
|
157 /** |
|
158 * Open schedule settings for the service. |
|
159 */ |
|
160 void OpenScheduleSettingsL(); |
|
161 |
|
162 /** |
|
163 * Get pointer to active list in view |
|
164 * @return Pointer to active list. |
|
165 */ |
|
166 CVcxHgVodListImplBase* ActiveList(); |
|
167 |
|
168 /** |
|
169 * PlayInternalVideoL |
|
170 * |
|
171 * @param aContent Content that contains video data. |
|
172 */ |
|
173 void PlayInternalVideoL( CVcxNsContent* aContent ); |
|
174 |
|
175 /** |
|
176 * Play stream |
|
177 * @param aUrl Url |
|
178 */ |
|
179 void PlayStreamL( const TDesC& aUrl ); |
|
180 |
|
181 /** |
|
182 * From MVcxViewMessageObserver |
|
183 * Handles a custom view message. |
|
184 * @param aMessageUid UID for custom message |
|
185 * @param aCustomMessage Message contents |
|
186 */ |
|
187 void HandleCustomViewMessageL( |
|
188 const TUid aMessageUid, |
|
189 const TDesC8 &aCustomMessage ); |
|
190 |
|
191 /** |
|
192 * Called by list impelementation(s) when layout is changed. |
|
193 */ |
|
194 void LayoutChanged(); |
|
195 |
|
196 /** |
|
197 * Return eikon env. |
|
198 * |
|
199 * @return Reference to eikon env |
|
200 */ |
|
201 CEikonEnv& EikonEnv(); |
|
202 |
|
203 /** |
|
204 * Return view's cba. |
|
205 */ |
|
206 CEikButtonGroupContainer* ViewCba(); |
|
207 |
|
208 /** |
|
209 * Return touch support flag. |
|
210 * ETrue if touch supported. |
|
211 */ |
|
212 TBool IsTouchSupported(); |
|
213 |
|
214 private: |
|
215 |
|
216 /** |
|
217 * Set active list |
|
218 * @param aList |
|
219 */ |
|
220 void SetActiveList( CVcxHgVodListImplBase* aList ); |
|
221 |
|
222 /** |
|
223 * From CAknView returns Uid of View |
|
224 * @return TUid uid of the view |
|
225 */ |
|
226 TUid Id() const; |
|
227 |
|
228 /** |
|
229 * From CAknView activate the view |
|
230 * |
|
231 * @since S60 v3.0 |
|
232 * @param aPrevViewId |
|
233 * @param aCustomMessageId |
|
234 * @param aCustomMessage |
|
235 */ |
|
236 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
237 TUid aCustomMessageId, |
|
238 const TDesC8& aCustomMessage ); |
|
239 |
|
240 /** |
|
241 * From CAknView deactivate the view (free resources) |
|
242 * |
|
243 * @since S60 v3.0 |
|
244 */ |
|
245 void DoDeactivate(); |
|
246 |
|
247 /** |
|
248 * Default constructor |
|
249 * |
|
250 */ |
|
251 CVcxHgVodMainView( ); |
|
252 |
|
253 /** |
|
254 * Constructor |
|
255 * |
|
256 */ |
|
257 void ConstructL(); |
|
258 |
|
259 //From MEikMenuObserver |
|
260 |
|
261 /** |
|
262 * Menu item handling method |
|
263 * @param aResourceId Menu pane resource id |
|
264 * @param aMenuPane Pointer to menu pane |
|
265 */ |
|
266 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
267 |
|
268 /** |
|
269 * Supplies objects to Mop childs. |
|
270 * @param aId Type of object to supply. |
|
271 * @return Type UID pointer containing supplied object, or @c NULL type UID |
|
272 * pointer if given type is not found. |
|
273 */ |
|
274 TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
275 |
|
276 /** |
|
277 * Handles the change of status pane. |
|
278 */ |
|
279 void HandleStatusPaneSizeChange(); |
|
280 |
|
281 /** |
|
282 * Handles the foreground event. |
|
283 * @param aForeground Is foreground state gained or not. |
|
284 */ |
|
285 void HandleForegroundEventL( TBool aForeground ); |
|
286 |
|
287 /** |
|
288 * Checks parental control for a video, and asks lock code. |
|
289 * |
|
290 * @leave KErrPermissionDenied If not allowed to play. |
|
291 * @param aAgeProfile Age profile for the video to be checked. |
|
292 */ |
|
293 void CheckParentalControlL( TUint32 aAgeProfile ); |
|
294 |
|
295 /* |
|
296 * Process custom activation message. |
|
297 * |
|
298 * @param aCustomMessage The message. |
|
299 */ |
|
300 void ProcessCustomMessageL( const TDesC8& aCustomMessage ); |
|
301 |
|
302 /* |
|
303 * Handles custom activation message. |
|
304 */ |
|
305 void HandleCustomViewMessageL(); |
|
306 |
|
307 /** |
|
308 * Locates the mif file searching from y: to a: and then z: last |
|
309 * |
|
310 * @param aFileName Full path to mif file. |
|
311 */ |
|
312 void LocateMifFileL( TFileName& aFileName ); |
|
313 |
|
314 private: // data |
|
315 |
|
316 /** |
|
317 * View id |
|
318 */ |
|
319 TUid iViewId; |
|
320 |
|
321 /** |
|
322 * Flag for touch support |
|
323 */ |
|
324 TBool iTouchSupport; |
|
325 |
|
326 /** |
|
327 * View container |
|
328 * Own. |
|
329 */ |
|
330 CVcxHgVodMainViewContainer* iContainer; |
|
331 |
|
332 /** |
|
333 * Resource loader |
|
334 * Own. |
|
335 */ |
|
336 CIptvResourceLoader* iResourceLoader; |
|
337 |
|
338 /** |
|
339 * Background context. |
|
340 * Own. |
|
341 */ |
|
342 CAknsBasicBackgroundControlContext* iBgContext; |
|
343 |
|
344 /** |
|
345 * Ui engine. |
|
346 * Own. |
|
347 */ |
|
348 CVcxNsUiEngine* iModel; |
|
349 |
|
350 /** |
|
351 * Service list view implementation |
|
352 * Own. |
|
353 */ |
|
354 CVcxHgVodServiceListImpl* iServiceList; |
|
355 |
|
356 /** |
|
357 * Category list view implementation |
|
358 * Own. |
|
359 */ |
|
360 CVcxHgVodCategoryListImpl* iCategoryList; |
|
361 |
|
362 /** |
|
363 * Content list view implementation |
|
364 * Own. |
|
365 */ |
|
366 CVcxHgVodContentListImpl* iContentList; |
|
367 |
|
368 /** |
|
369 * Service group list view implementation |
|
370 * Own. |
|
371 */ |
|
372 CVcxHgVodServiceGroupListImpl* iServiceGroupList; |
|
373 |
|
374 /** |
|
375 * Content list view implementation |
|
376 * Own. |
|
377 */ |
|
378 CVcxHgVodListImplBase* iActiveList; |
|
379 |
|
380 /** |
|
381 * Mpx view Utility |
|
382 */ |
|
383 MMPXViewUtility* iViewUtility; |
|
384 |
|
385 /** |
|
386 * Scroller for double graphics hg list. |
|
387 * Own. |
|
388 */ |
|
389 CHgDoubleGraphicList* iGraphicScroller; |
|
390 |
|
391 /** |
|
392 * Scroller for double text hg list. |
|
393 * Own. |
|
394 */ |
|
395 CHgDoubleTextList* iTextScroller; |
|
396 |
|
397 /** |
|
398 * Default icon for services. |
|
399 * Own. |
|
400 */ |
|
401 CGulIcon* iServiceDefaultIcon; |
|
402 |
|
403 /** |
|
404 * Default icon for content. |
|
405 * Own. |
|
406 */ |
|
407 CGulIcon* iContentDefaultIcon; |
|
408 |
|
409 /** |
|
410 * Telephony client for lock code queries |
|
411 * Own. |
|
412 */ |
|
413 CVcxHgVodTelephonyClient* iTelephonyClient; |
|
414 |
|
415 /** |
|
416 * Central repository access needed for parental control setting. |
|
417 * Own. |
|
418 */ |
|
419 CRepository* iCenRep; |
|
420 |
|
421 }; |
|
422 |
|
423 #endif // VCXHGVODMAINVIEW_H |