|
1 /* |
|
2 * Copyright (c) 2008-2009 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 "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: Command Binding Class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef _GLXDETAILSBOUNDCOMMAND_H_ |
|
22 #define _GLXDETAILSBOUNDCOMMAND_H_ |
|
23 |
|
24 #include <eikmenup.h> // helper class for extending CEikMenuPaneItem without breaking binary |
|
25 #include <mglxmedialistprovider.h> // Interface to allow a class that owns a media list to share access to it |
|
26 |
|
27 class CGlxCommandHandlerAddToContainer; // Command handler for adding to a container |
|
28 class CAknAppUi; |
|
29 /** Error Id EMPY-7MKDHP **/ |
|
30 class MGlxMetadataDialogObserver ; // call back to details dailog |
|
31 |
|
32 /** |
|
33 * MGlxBoundCommand |
|
34 */ |
|
35 class MGlxBoundCommand |
|
36 { |
|
37 public: |
|
38 /** |
|
39 * Destructor |
|
40 */ |
|
41 virtual ~MGlxBoundCommand() {}; |
|
42 |
|
43 /** |
|
44 * OfferCommandL |
|
45 * Handles user commands |
|
46 * @param aCommandId the command need to handle |
|
47 */ |
|
48 virtual TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist) = 0; |
|
49 |
|
50 /** |
|
51 * InitMenuL |
|
52 * Initialises a menu pane |
|
53 * @param aMenu representation of the menu pane |
|
54 */ |
|
55 virtual void InitMenuL( CEikMenuPane& aMenu ) const = 0; |
|
56 |
|
57 /** |
|
58 * HideLocationMenuItem |
|
59 * Hides Location Menu option |
|
60 * @param aMenu representation of the menu pane |
|
61 */ |
|
62 virtual void HideLocationMenuItem( CEikMenuPane& aMenu ) const = 0; |
|
63 |
|
64 |
|
65 /** |
|
66 * Close the MGlxBoundCommand object. |
|
67 */ |
|
68 virtual void Close() = 0; |
|
69 |
|
70 /** |
|
71 * Changes the Middle softkey command. |
|
72 */ |
|
73 virtual void ChangeMskL() = 0; |
|
74 |
|
75 /** |
|
76 * Sets the Dailogs Observer |
|
77 */ |
|
78 /** Error Id EMPY-7MKDHP **/ |
|
79 virtual void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ) = 0; |
|
80 |
|
81 }; |
|
82 |
|
83 /** |
|
84 * CGlxTitleBoundCommand |
|
85 */ |
|
86 NONSHARABLE_CLASS( CGlxTitleBoundCommand ) : public CBase, public MGlxBoundCommand |
|
87 { |
|
88 public: |
|
89 |
|
90 /** |
|
91 * Two phase construction |
|
92 */ |
|
93 IMPORT_C static CGlxTitleBoundCommand* NewL(); |
|
94 |
|
95 /** |
|
96 * Two phase construction |
|
97 */ |
|
98 static CGlxTitleBoundCommand* NewLC(); |
|
99 |
|
100 /** |
|
101 * Destructor |
|
102 */ |
|
103 ~CGlxTitleBoundCommand(); |
|
104 private: |
|
105 // From MGlxBoundCommand |
|
106 TBool OfferCommandL( TInt aCommandId ,MGlxMediaList& aMedialist); |
|
107 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
108 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
109 void Close(); |
|
110 void ChangeMskL(); |
|
111 /** |
|
112 * SetDetailsDailogObserver |
|
113 * @param aObserver details dailog observer |
|
114 */ |
|
115 /** Error Id EMPY-7MKDHP **/ |
|
116 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
117 /** |
|
118 * ModifyTitleL |
|
119 * @param aData new title to be modified |
|
120 */ |
|
121 void ModifyTitleL(const TDesC& aData ); |
|
122 |
|
123 private://data |
|
124 |
|
125 MGlxMediaList* iMedialist; |
|
126 |
|
127 }; |
|
128 |
|
129 /** |
|
130 * CGlxTagsBoundCommand |
|
131 */ |
|
132 NONSHARABLE_CLASS( CGlxTagsBoundCommand ) : public CBase, public MGlxBoundCommand, public MGlxMediaListProvider |
|
133 { |
|
134 public: |
|
135 |
|
136 /** |
|
137 * Two phase construction |
|
138 */ |
|
139 IMPORT_C static CGlxTagsBoundCommand* NewL(); |
|
140 |
|
141 /** |
|
142 * Two phase construction |
|
143 */ |
|
144 static CGlxTagsBoundCommand* NewLC(); |
|
145 |
|
146 /** |
|
147 *ConstructL |
|
148 */ |
|
149 void ConstructL(); |
|
150 |
|
151 /** |
|
152 * Destructor |
|
153 */ |
|
154 ~CGlxTagsBoundCommand(); |
|
155 |
|
156 /** |
|
157 *SetMediaList |
|
158 *@param aMedialist medialist |
|
159 */ |
|
160 void SetMediaList(MGlxMediaList* aMedialist); |
|
161 |
|
162 //From MGlxMediaListProvider |
|
163 MGlxMediaList& MediaList(); |
|
164 private: |
|
165 // From MGlxBoundCommand |
|
166 TBool OfferCommandL( TInt aCommandId, MGlxMediaList& aMedialist); |
|
167 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
168 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
169 void Close(); |
|
170 void ChangeMskL(); |
|
171 /** |
|
172 * SetDetailsDailogObserver |
|
173 * @param aObserver details dailog observer |
|
174 */ |
|
175 /** Error Id EMPY-7MKDHP **/ |
|
176 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
177 private: |
|
178 CGlxCommandHandlerAddToContainer* iAddToTag; //own |
|
179 MGlxMediaList* iMedialist; |
|
180 }; |
|
181 |
|
182 /** |
|
183 * CGlxDescriptionBoundCommand |
|
184 */ |
|
185 NONSHARABLE_CLASS( CGlxDescriptionBoundCommand ) : public CBase, public MGlxBoundCommand |
|
186 { |
|
187 public: |
|
188 |
|
189 /** |
|
190 * Two phase construction |
|
191 */ |
|
192 IMPORT_C static CGlxDescriptionBoundCommand* NewL(); |
|
193 |
|
194 /** |
|
195 * Two phase construction |
|
196 */ |
|
197 static CGlxDescriptionBoundCommand* NewLC(); |
|
198 |
|
199 /** |
|
200 * Destructor |
|
201 */ |
|
202 ~CGlxDescriptionBoundCommand(); |
|
203 private: |
|
204 // From MGlxBoundCommand |
|
205 TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist); |
|
206 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
207 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
208 void Close(); |
|
209 void ChangeMskL(); |
|
210 /** |
|
211 * SetDetailsDailogObserver |
|
212 * @param aObserver details dailog observer |
|
213 */ |
|
214 /** Error Id EMPY-7MKDHP **/ |
|
215 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
216 /** |
|
217 * ModifyDescriptionL |
|
218 * @param aData new description to be modified |
|
219 */ |
|
220 void ModifyDescriptionL(const TDesC& aData ); |
|
221 |
|
222 private: |
|
223 MGlxMediaList* iMedialist; |
|
224 |
|
225 }; |
|
226 |
|
227 /** |
|
228 * CGlxLocationBoundCommand |
|
229 */ |
|
230 NONSHARABLE_CLASS( CGlxLocationBoundCommand ) : public CBase, public MGlxBoundCommand |
|
231 { |
|
232 public: |
|
233 |
|
234 /** |
|
235 * Two phase construction |
|
236 */ |
|
237 IMPORT_C static CGlxLocationBoundCommand* NewL(); |
|
238 |
|
239 /** |
|
240 * Two phase construction |
|
241 */ |
|
242 static CGlxLocationBoundCommand* NewLC(); |
|
243 |
|
244 /** |
|
245 * Destructor |
|
246 */ |
|
247 ~CGlxLocationBoundCommand(); |
|
248 private: |
|
249 // From MGlxBoundCommand |
|
250 TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist); |
|
251 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
252 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
253 void Close(); |
|
254 void ChangeMskL(); |
|
255 |
|
256 /** |
|
257 * RemoveLocationL |
|
258 * removes location information of an image |
|
259 */ |
|
260 void RemoveLocationL(); |
|
261 |
|
262 /** |
|
263 * SetDetailsDailogObserver |
|
264 * Sets detail dailog observer |
|
265 */ |
|
266 /** Error Id EMPY-7MKDHP **/ |
|
267 void SetDetailsDailogObserver(MGlxMetadataDialogObserver& aObserver) ; |
|
268 |
|
269 private: |
|
270 MGlxMediaList* iMedialist; |
|
271 |
|
272 /// The AppUI. Not owned |
|
273 CAknAppUi* iAppUi; |
|
274 |
|
275 TBool iOnNaviKeySelect; |
|
276 |
|
277 MGlxMetadataDialogObserver* iDialogObserver ; |
|
278 }; |
|
279 |
|
280 |
|
281 /** |
|
282 * CGlxAlbumsBoundCommand |
|
283 */ |
|
284 NONSHARABLE_CLASS( CGlxAlbumsBoundCommand ) : public CBase, public MGlxBoundCommand, public MGlxMediaListProvider |
|
285 { |
|
286 public: |
|
287 |
|
288 /** |
|
289 * Two phase construction |
|
290 */ |
|
291 IMPORT_C static CGlxAlbumsBoundCommand* NewL(); |
|
292 |
|
293 /** |
|
294 * Two phase construction |
|
295 */ |
|
296 static CGlxAlbumsBoundCommand* NewLC(); |
|
297 |
|
298 /** |
|
299 *ConstructL |
|
300 */ |
|
301 void ConstructL(); |
|
302 |
|
303 /** |
|
304 * Destructor |
|
305 */ |
|
306 ~CGlxAlbumsBoundCommand(); |
|
307 |
|
308 /** |
|
309 *SetMediaList |
|
310 *@param aMedialist medialist |
|
311 */ |
|
312 void SetMediaList(MGlxMediaList* aMedialist); |
|
313 |
|
314 //From MGlxMediaListProvider |
|
315 MGlxMediaList& MediaList(); |
|
316 |
|
317 private: |
|
318 // From MGlxBoundCommand |
|
319 TBool OfferCommandL( TInt aCommandId, MGlxMediaList& aMedialist ); |
|
320 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
321 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
322 void Close(); |
|
323 void ChangeMskL(); |
|
324 /** |
|
325 * SetDetailsDailogObserver |
|
326 * @param aObserver details dailog observer |
|
327 */ |
|
328 /** Error Id EMPY-7MKDHP **/ |
|
329 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
330 private: |
|
331 CGlxCommandHandlerAddToContainer* iAddToAlbum; //own |
|
332 MGlxMediaList* iMedialist; |
|
333 |
|
334 }; |
|
335 |
|
336 |
|
337 /** |
|
338 * CGlxResolutionBoundCommand |
|
339 */ |
|
340 NONSHARABLE_CLASS( CGlxResolutionBoundCommand ) : public CBase, public MGlxBoundCommand |
|
341 { |
|
342 public: |
|
343 /** |
|
344 * Two phase construction |
|
345 */ |
|
346 IMPORT_C static CGlxResolutionBoundCommand* NewL(); |
|
347 |
|
348 /** |
|
349 * Two phase construction |
|
350 */ |
|
351 static CGlxResolutionBoundCommand* NewLC(); |
|
352 |
|
353 /** |
|
354 * Destructor |
|
355 */ |
|
356 ~CGlxResolutionBoundCommand(); |
|
357 private: |
|
358 // From MGlxBoundCommand |
|
359 TBool OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& aMedialist); |
|
360 void InitMenuL( CEikMenuPane& /*aMenu*/ ) const; |
|
361 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
362 void Close(); |
|
363 void ChangeMskL(); |
|
364 /** |
|
365 * SetDetailsDailogObserver |
|
366 * @param aObserver details dailog observer |
|
367 */ |
|
368 /** Error Id EMPY-7MKDHP **/ |
|
369 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
370 }; |
|
371 |
|
372 /** |
|
373 * CGlxUsageRightsBoundCommand |
|
374 */ |
|
375 NONSHARABLE_CLASS( CGlxDurationBoundCommand ) : public CBase, public MGlxBoundCommand |
|
376 { |
|
377 public: |
|
378 /** |
|
379 * Two phase construction |
|
380 */ |
|
381 IMPORT_C static CGlxDurationBoundCommand* NewL(); |
|
382 |
|
383 /** |
|
384 * Two phase construction |
|
385 */ |
|
386 static CGlxDurationBoundCommand* NewLC(); |
|
387 /** |
|
388 * Destructor |
|
389 */ |
|
390 ~CGlxDurationBoundCommand(); |
|
391 |
|
392 private: |
|
393 // From MGlxBoundCommand |
|
394 TBool OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& aMedialist); |
|
395 void InitMenuL( CEikMenuPane& /*aMenu*/ ) const; |
|
396 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
397 void Close(); |
|
398 void ChangeMskL(); |
|
399 /** |
|
400 * SetDetailsDailogObserver |
|
401 * @param aObserver details dailog observer |
|
402 */ |
|
403 /** Error Id EMPY-7MKDHP **/ |
|
404 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
405 }; |
|
406 |
|
407 |
|
408 /** |
|
409 * CGlxUsageRightsBoundCommand |
|
410 */ |
|
411 NONSHARABLE_CLASS( CGlxUsageRightsBoundCommand ) : public CBase, public MGlxBoundCommand |
|
412 { |
|
413 public: |
|
414 /** |
|
415 * Two phase construction |
|
416 */ |
|
417 IMPORT_C static CGlxUsageRightsBoundCommand* NewL(); |
|
418 |
|
419 /** |
|
420 * Two phase construction |
|
421 */ |
|
422 static CGlxUsageRightsBoundCommand* NewLC(); |
|
423 |
|
424 /** |
|
425 * SetMediaList |
|
426 * @param aMedialist medialist |
|
427 */ |
|
428 void SetMediaList(MGlxMediaList* aMedialist); |
|
429 |
|
430 /** |
|
431 * MediaList |
|
432 * @return MGlxMediaList main medialist |
|
433 */ |
|
434 MGlxMediaList& MediaList(); |
|
435 |
|
436 /** |
|
437 * Destructor |
|
438 */ |
|
439 ~CGlxUsageRightsBoundCommand(); |
|
440 private: |
|
441 // From MGlxBoundCommand |
|
442 TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist); |
|
443 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
444 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
445 void Close(); |
|
446 void ChangeMskL(); |
|
447 /** |
|
448 * SetDetailsDailogObserver |
|
449 * @param aObserver details dailog observer |
|
450 */ |
|
451 /** Error Id EMPY-7MKDHP **/ |
|
452 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
453 /** |
|
454 * Launches the DRM view associated with the media. |
|
455 */ |
|
456 void LaunchDRMViewL(); |
|
457 |
|
458 private: |
|
459 MGlxMediaList* iMedialist; |
|
460 |
|
461 }; |
|
462 |
|
463 /** |
|
464 * CGlxDateAndTimeBoundCommand |
|
465 */ |
|
466 NONSHARABLE_CLASS( CGlxDateAndTimeBoundCommand ) : public CBase, public MGlxBoundCommand |
|
467 { |
|
468 public: |
|
469 /** |
|
470 * Two phase construction |
|
471 */ |
|
472 IMPORT_C static CGlxDateAndTimeBoundCommand* NewL(); |
|
473 |
|
474 /** |
|
475 * Two phase construction |
|
476 */ |
|
477 static CGlxDateAndTimeBoundCommand* NewLC(); |
|
478 |
|
479 /** |
|
480 * Destructor |
|
481 */ |
|
482 ~CGlxDateAndTimeBoundCommand(); |
|
483 private: |
|
484 // From MGlxBoundCommand |
|
485 TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist); |
|
486 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
487 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
488 void Close(); |
|
489 void ChangeMskL(); |
|
490 /** |
|
491 * SetDetailsDailogObserver |
|
492 * @param aObserver details dailog observer |
|
493 */ |
|
494 /** Error Id EMPY-7MKDHP **/ |
|
495 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
496 }; |
|
497 |
|
498 /** |
|
499 * CGlxFileSizeBoundCommand |
|
500 */ |
|
501 NONSHARABLE_CLASS( CGlxFileSizeBoundCommand ) : public CBase, public MGlxBoundCommand |
|
502 { |
|
503 public: |
|
504 /** |
|
505 * Two phase construction |
|
506 */ |
|
507 IMPORT_C static CGlxFileSizeBoundCommand* NewL(); |
|
508 |
|
509 /** |
|
510 * Two phase construction |
|
511 */ |
|
512 static CGlxFileSizeBoundCommand* NewLC(); |
|
513 |
|
514 /** |
|
515 * Destructor |
|
516 */ |
|
517 ~CGlxFileSizeBoundCommand(); |
|
518 private: |
|
519 // From MGlxBoundCommand |
|
520 TBool OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist); |
|
521 void InitMenuL( CEikMenuPane& aMenu ) const; |
|
522 void HideLocationMenuItem( CEikMenuPane& aMenu ) const; |
|
523 void Close(); |
|
524 void ChangeMskL(); |
|
525 /** |
|
526 * SetDetailsDailogObserver |
|
527 * @param aObserver details dailog observer |
|
528 */ |
|
529 /** Error Id EMPY-7MKDHP **/ |
|
530 void SetDetailsDailogObserver( MGlxMetadataDialogObserver& aObserver ); |
|
531 }; |
|
532 |
|
533 #endif // _GLXDETAILSBOUNDCOMMAND_H_ |