|
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: My Videos UI main view.* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 12 % |
|
19 |
|
20 #ifndef VCXHGMYVIDEOSMAINVIEW_H |
|
21 #define VCXHGMYVIDEOSMAINVIEW_H |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <coemain.h> |
|
25 #include <aknappui.h> |
|
26 #include <aknViewAppUi.h> |
|
27 #include <aknview.h> |
|
28 #include <akntitle.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class CVcxHgMyVideosModel; |
|
33 class CVcxHgMyVideosMainViewContainer; |
|
34 class CIptvResourceLoader; |
|
35 class CVcxHgMyVideosCategoryListImpl; |
|
36 class CVcxHgMyVideosVideoListImpl; |
|
37 class TVcxHgMyVideosMemoryStatusDialog; |
|
38 class CHgScroller; |
|
39 class CAknsBasicBackgroundControlContext; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * My Videos UI main view. |
|
45 * |
|
46 * @lib vcxhgmyvideos.lib |
|
47 */ |
|
48 class CVcxHgMyVideosMainView : public CAknView |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Creates main view. |
|
54 * |
|
55 * @return New main view object. |
|
56 */ |
|
57 IMPORT_C static CVcxHgMyVideosMainView* NewL(); |
|
58 |
|
59 /** |
|
60 * Creates main view. |
|
61 * |
|
62 * @return New main view object. |
|
63 */ |
|
64 IMPORT_C static CVcxHgMyVideosMainView* NewLC(); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 IMPORT_C virtual ~CVcxHgMyVideosMainView(); |
|
70 |
|
71 public: |
|
72 |
|
73 /** |
|
74 * Accessor for the application's AppUi. |
|
75 * |
|
76 * @return Pointer to AppUi. |
|
77 */ |
|
78 CAknViewAppUi* AppUi() const { return CAknView::AppUi(); } |
|
79 |
|
80 /** |
|
81 * Returns pointer to button group container. |
|
82 * |
|
83 * @return Button group container. |
|
84 */ |
|
85 CEikButtonGroupContainer* Cba(); |
|
86 |
|
87 /** |
|
88 * Accessor for the view's title pane. |
|
89 * |
|
90 * @return Pointer to title pane. |
|
91 */ |
|
92 CAknTitlePane* TitlePaneL(); |
|
93 |
|
94 /** |
|
95 * Accessor for category list. Creates the category list if not already |
|
96 * created. Can only leave if not created yet. |
|
97 * |
|
98 * @return Pointer to category list. |
|
99 */ |
|
100 CVcxHgMyVideosCategoryListImpl* CategoryListL(); |
|
101 |
|
102 /** |
|
103 * Accessor for video list. Creates the video list if not already |
|
104 * created. Can only leave if not created yet. |
|
105 * |
|
106 * @return Pointer to video list. |
|
107 */ |
|
108 CVcxHgMyVideosVideoListImpl* VideoListL(); |
|
109 |
|
110 /** |
|
111 * Activates category list. |
|
112 */ |
|
113 void ActivateCategoryListL(); |
|
114 |
|
115 /** |
|
116 * Activates video list. |
|
117 * |
|
118 * @param aIndex Index of video list to activate. |
|
119 */ |
|
120 void ActivateVideoListL( TInt aIndex ); |
|
121 |
|
122 /** |
|
123 * Handles commands for the view. |
|
124 * |
|
125 * @param aCommand Command ID. |
|
126 */ |
|
127 void HandleCommandL( TInt aCommand ); |
|
128 |
|
129 /** |
|
130 * Handles key events from container. |
|
131 * |
|
132 * @param aKeyEvent Key event. |
|
133 * @param aType Key event type. |
|
134 * @return Response, tells if key was handled or not. |
|
135 */ |
|
136 TKeyResponse HandleKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
137 |
|
138 /** |
|
139 * Sets correct resource to MSK. Call whenever app state changes to that |
|
140 * MSK could be affected. |
|
141 */ |
|
142 void DynInitMskL(); |
|
143 |
|
144 /** |
|
145 * Sets correct resource to RSK. Call whenever app state changes to that |
|
146 * RSK could be affected. |
|
147 */ |
|
148 void DynInitRskL(); |
|
149 |
|
150 /** |
|
151 * Updates layout for controls. |
|
152 */ |
|
153 void UpdateLayout(); |
|
154 |
|
155 private: // Constructors |
|
156 |
|
157 /** |
|
158 * Default C++ constructor. |
|
159 */ |
|
160 CVcxHgMyVideosMainView(); |
|
161 |
|
162 /** |
|
163 * Symbian 2nd phase constructor. |
|
164 */ |
|
165 void ConstructL(); |
|
166 |
|
167 private: |
|
168 |
|
169 /** |
|
170 * Returns Uid of View. |
|
171 * |
|
172 * @return TUid uid of the view |
|
173 */ |
|
174 TUid Id() const; |
|
175 |
|
176 /** |
|
177 * Gets an object whose type is encapsulated by the specified |
|
178 * TTypeUid object. |
|
179 * |
|
180 * @param aId Encapsulates the Uid that identifies the type of |
|
181 * object required. |
|
182 * @return TTypeUid::Ptr Encapsulates the pointer to the object provided. |
|
183 * Note that the encapsulated pointer may be NULL. |
|
184 */ |
|
185 TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); |
|
186 |
|
187 /* |
|
188 * Called by the framework when the application status pane |
|
189 * size is changed. |
|
190 */ |
|
191 void HandleStatusPaneSizeChange(); |
|
192 |
|
193 /** |
|
194 * Activate the view. |
|
195 * |
|
196 * @param aPrevViewId Id of previous view. |
|
197 * @param aCustomMessageId Id of custom message for view. |
|
198 * @param aCustomMessage Custom message for view. |
|
199 */ |
|
200 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
201 TUid aCustomMessageId, |
|
202 const TDesC8& aCustomMessage ); |
|
203 |
|
204 /** |
|
205 * Deactivate the view (free resources). |
|
206 */ |
|
207 void DoDeactivate(); |
|
208 |
|
209 /** |
|
210 * Disables menu items which are not available. |
|
211 * |
|
212 * @param aResourceId Menu resource Id. |
|
213 * @param aMenuPane Menu resource. |
|
214 */ |
|
215 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
216 |
|
217 /** |
|
218 * Handles cancel command from RSK while in marking mode. |
|
219 */ |
|
220 void HandleCancelL(); |
|
221 |
|
222 private: |
|
223 |
|
224 /** |
|
225 * Memory status dialog. |
|
226 * Own. |
|
227 */ |
|
228 TVcxHgMyVideosMemoryStatusDialog* iMemoryStatus; |
|
229 |
|
230 /** |
|
231 * Component model. |
|
232 * Own. |
|
233 */ |
|
234 CVcxHgMyVideosModel* iModel; |
|
235 |
|
236 /** |
|
237 * View container. |
|
238 * Own. |
|
239 */ |
|
240 CVcxHgMyVideosMainViewContainer* iContainer; |
|
241 |
|
242 /** |
|
243 * Resource loader. |
|
244 * Own. |
|
245 */ |
|
246 CIptvResourceLoader* iResourceLoader; |
|
247 |
|
248 /** |
|
249 * Category list implementation. |
|
250 * Own. |
|
251 */ |
|
252 CVcxHgMyVideosCategoryListImpl* iCategoryList; |
|
253 |
|
254 /** |
|
255 * Video list implementation. |
|
256 * Own. |
|
257 */ |
|
258 CVcxHgMyVideosVideoListImpl* iVideoList; |
|
259 |
|
260 /** |
|
261 * Background context. |
|
262 * Own. |
|
263 */ |
|
264 CAknsBasicBackgroundControlContext* iBgContext; |
|
265 |
|
266 /** |
|
267 * Resource ID of current MSK resource. |
|
268 */ |
|
269 TInt iCurrentMskResource; |
|
270 |
|
271 /** |
|
272 * Resource ID of current RSK resource. |
|
273 */ |
|
274 TInt iCurrentRskResource; |
|
275 }; |
|
276 |
|
277 #endif // VCXHGMYVIDEOSMAINVIEW_H |