|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // Version : %version: 8 % |
|
20 |
|
21 |
|
22 |
|
23 #ifndef __CMPPopupList_H__ |
|
24 #define __CMPPopupList_H__ |
|
25 |
|
26 // INCLUDES |
|
27 #include <aknPopup.h> // CAknPopupList |
|
28 #include <eiklbx.h> |
|
29 #include <f32file.h> |
|
30 |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CEikListBox; |
|
34 |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 NONSHARABLE_CLASS( CMPPopupList ): public CAknPopupList |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CMPPopupList* NewL( CEikListBox* aListBox, |
|
46 const TDesC& aFilePath, |
|
47 TBool aDrmProtected, |
|
48 TBool aReadingDCFOnly ); |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 */ |
|
53 static CMPPopupList* NewL( CEikListBox* aListBox, |
|
54 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
55 RFile64& aFile, |
|
56 #else |
|
57 RFile& aFile, |
|
58 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
59 TBool aDrmProtected, |
|
60 TBool aReadingDCFOnly ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CMPPopupList(); |
|
66 |
|
67 public: // From CAknPopupList |
|
68 |
|
69 /** |
|
70 * Processes events from the softkeys. |
|
71 * @param aCommandId Event Id from the soft-key. |
|
72 */ |
|
73 void ProcessCommandL(TInt aCommandId); |
|
74 |
|
75 /** |
|
76 * Handle key press events |
|
77 */ |
|
78 void HandleListBoxEventL( CEikListBox* aListBox, |
|
79 TListBoxEvent aEventType ); |
|
80 |
|
81 /** |
|
82 * Handle key press events |
|
83 */ |
|
84 TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, |
|
85 TEventCode aType); |
|
86 |
|
87 public: // new |
|
88 |
|
89 /** |
|
90 * Re-construct DRM softkeys for playlist |
|
91 * @since 9.1 |
|
92 */ |
|
93 void ReConstructDrmSoftkeysL( TBool aDrmProtected ); |
|
94 |
|
95 private: |
|
96 |
|
97 /** |
|
98 * Construct |
|
99 * @since 9.1 |
|
100 */ |
|
101 void ConstructL( CEikListBox* aListBox, |
|
102 const TDesC& aFilePath, |
|
103 TBool aDrmProtected, |
|
104 TBool aReadingDCFOnly ); |
|
105 |
|
106 /** |
|
107 * Construct |
|
108 * @since 9.1 |
|
109 */ |
|
110 void ConstructL( CEikListBox* aListBox, |
|
111 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
112 RFile64& aFile, |
|
113 #else |
|
114 RFile& aFile, |
|
115 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
116 TBool aDrmProtected, |
|
117 TBool aReadingDCFOnly ); |
|
118 |
|
119 /** |
|
120 * Launch Details View of DRM component |
|
121 * @since 9.1 |
|
122 */ |
|
123 void LaunchDrmInfoL(); |
|
124 |
|
125 /** |
|
126 * Update softkeys according to DRM or non-DRM status |
|
127 * @since 9.1 |
|
128 */ |
|
129 void UpdateSoftkeysL(); |
|
130 |
|
131 private: // data |
|
132 |
|
133 HBufC* iFilePath; |
|
134 #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
135 RFile64 iFileHandle; |
|
136 #else |
|
137 RFile iFileHandle; |
|
138 #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API |
|
139 TBool iDrmProtected; |
|
140 TBool iReadingDCFOnly; |
|
141 CEikListBox* iListBox; // not own |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // __CMPPopupList_H__ |
|
146 |
|
147 // End of File |