|
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: CommandHandlerMoreInfo - Handler for DRM related commands. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 * @internal reviewed 03/07/2007 by Rowland Cook |
|
24 */ |
|
25 |
|
26 #ifndef C_GLXCOMMANDHANDLERMOREINFO_H |
|
27 #define C_GLXCOMMANDHANDLERMOREINFO_H |
|
28 |
|
29 // INCLUDES |
|
30 #include <e32base.h> |
|
31 #include <glxmedialistcommandhandler.h> |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CGlxDRMUtility; |
|
35 class CGlxDefaultAttributeContext; |
|
36 // CLASS DECLARATION |
|
37 |
|
38 //class |
|
39 |
|
40 /** |
|
41 * CGlxCommandHandlerMoreInfo class |
|
42 * Handler for DRM related commands |
|
43 * @glxdrmcommandhandler.lib |
|
44 * @author M Byrne |
|
45 */ |
|
46 NONSHARABLE_CLASS( CGlxCommandHandlerMoreInfo ): public CGlxMediaListCommandHandler |
|
47 { |
|
48 public : //constructor and desctructor |
|
49 /** |
|
50 * Two-phase constructor |
|
51 * @param aMediaListProvider object that provides the media list |
|
52 * @param aIsContainerList |
|
53 */ |
|
54 IMPORT_C static CGlxCommandHandlerMoreInfo* NewL( |
|
55 MGlxMediaListProvider* aMediaListProvider, TBool aIsContainerList); |
|
56 |
|
57 /** Destructor */ |
|
58 IMPORT_C ~CGlxCommandHandlerMoreInfo(); |
|
59 |
|
60 /** Activate command handler |
|
61 * @param aViewId id of view activating cmd handler |
|
62 */ |
|
63 void DoActivateL(TInt aViewId); |
|
64 |
|
65 /** |
|
66 * Deactivate command handler |
|
67 */ |
|
68 void Deactivate(); |
|
69 |
|
70 protected: |
|
71 /** see @ref CGlxMediaListCommandHandler::DoExecuteL */ |
|
72 TBool DoExecuteL(TInt aCommandId, MGlxMediaList& aList); |
|
73 |
|
74 /** see @ref CGlxMediaListCommandHandler::DoIsDisabled */ |
|
75 TBool DoIsDisabled(TInt aCommandId, MGlxMediaList& aList) const; |
|
76 |
|
77 private: |
|
78 /** Second phase constructor */ |
|
79 void ConstructL(TBool aIsContainerList); |
|
80 |
|
81 /** Constructor */ |
|
82 CGlxCommandHandlerMoreInfo(MGlxMediaListProvider* aMediaListProvider); |
|
83 |
|
84 /** |
|
85 * Check if 'more info' option is supported |
|
86 * (i.e. URL for information can be returned) |
|
87 * @param aList reference to media list |
|
88 * @return ETrue if 'more info' URL is available |
|
89 */ |
|
90 TBool CanGetInfoURLL(MGlxMediaList& aList) const; |
|
91 |
|
92 private: |
|
93 |
|
94 // Does the list contain containers or items |
|
95 TInt iIsContainerList; |
|
96 |
|
97 /** Pointer to DRM utility class (owned) */ |
|
98 CGlxDRMUtility* iDrmUtility; |
|
99 |
|
100 /** Fetch context for required attributes (owned) */ |
|
101 CGlxDefaultAttributeContext* iFetchContext; |
|
102 |
|
103 /** URI for current media items (owned) */ |
|
104 mutable HBufC* iUrl; |
|
105 }; |
|
106 |
|
107 #endif // C_GLXCOMMANDHANDLERMOREINFO_H |
|
108 |
|
109 |
|
110 |