|
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: Provide Icon File Considering Requirement |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef GLXMULICONPROVIDER_H_ |
|
22 #define GLXMULICONPROVIDER_H_ |
|
23 |
|
24 #include <e32base.h> // Container Base Class |
|
25 #include "glxmedia.h" // Reference to a media item in the item pool. |
|
26 #include "mpxmediageneraldefs.h" // Content ID identifying general category of content provided |
|
27 |
|
28 class TGlxMedia; // Reference to a media item in the item pool. |
|
29 class CGlxDRMUtility; // DRM utility class to provide DRM-related functionality used in many places |
|
30 |
|
31 NONSHARABLE_CLASS( CGlxMulIconProvider ) : public CBase |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * Virtual Destructor |
|
36 */ |
|
37 virtual ~CGlxMulIconProvider() {}; |
|
38 |
|
39 /** |
|
40 * IconIdL Returns the icon id |
|
41 * @param aMedia Media item |
|
42 */ |
|
43 virtual TInt IconIdL( const TGlxMedia& aMedia ) const = 0; |
|
44 |
|
45 /** |
|
46 * TwoPhaseConstruction |
|
47 */ |
|
48 void ConstructL( ); |
|
49 |
|
50 /** |
|
51 * ResourceFileName returns the filename of the resource |
|
52 */ |
|
53 virtual const TDesC& ResourceFileName() const ; |
|
54 private: |
|
55 // Stores the resource filename |
|
56 TFileName iResFileName; |
|
57 }; |
|
58 |
|
59 // ------------------------------------------------------------------------------------------------------------------------------------- |
|
60 |
|
61 NONSHARABLE_CLASS( CGlxMulLocationIconProvider ) : public CGlxMulIconProvider |
|
62 { |
|
63 public: |
|
64 /** |
|
65 * TwoPhaseConstruction |
|
66 */ |
|
67 IMPORT_C static CGlxMulLocationIconProvider* NewL( ); |
|
68 |
|
69 /** |
|
70 * Destructor |
|
71 */ |
|
72 ~CGlxMulLocationIconProvider(); |
|
73 |
|
74 /** |
|
75 * IconIdL Returns the icon id |
|
76 * @param aMedia Media item |
|
77 */ |
|
78 TInt IconIdL( const TGlxMedia& aMedia ) const; |
|
79 }; |
|
80 |
|
81 // ------------------------------------------------------------------------------------------------------------------------------------- |
|
82 |
|
83 NONSHARABLE_CLASS( CGlxMulDriveIconProvider ) : public CGlxMulIconProvider |
|
84 { |
|
85 public: |
|
86 /** |
|
87 * TwoPhaseConstruction |
|
88 */ |
|
89 IMPORT_C static CGlxMulDriveIconProvider* NewL( ); |
|
90 |
|
91 /** |
|
92 * Destructor |
|
93 */ |
|
94 ~CGlxMulDriveIconProvider(); |
|
95 |
|
96 /** |
|
97 * IconIdL Returns the icon id |
|
98 * @param aMedia Media item |
|
99 */ |
|
100 TInt IconIdL( const TGlxMedia& aMedia ) const; |
|
101 }; |
|
102 |
|
103 //----------------------------------------------------------------------------- |
|
104 |
|
105 NONSHARABLE_CLASS( CGlxMulStaticIconProvider ) : public CGlxMulIconProvider |
|
106 { |
|
107 public: |
|
108 |
|
109 /** |
|
110 * TwoPhaseConstruction |
|
111 */ |
|
112 IMPORT_C static CGlxMulStaticIconProvider* NewL( TInt aResourceIconId ); |
|
113 |
|
114 /** |
|
115 * Destructor |
|
116 */ |
|
117 CGlxMulStaticIconProvider( TInt aResourceIconId ); |
|
118 |
|
119 /** |
|
120 * IconIdL Returns the icon id |
|
121 * @param aMedia Media item |
|
122 */ |
|
123 TInt IconIdL( const TGlxMedia& aMedia ) const; |
|
124 |
|
125 private: |
|
126 // Stores the resource id |
|
127 TInt iIconId; |
|
128 |
|
129 }; |
|
130 |
|
131 //----------------------------------------------------------------------------- |
|
132 |
|
133 NONSHARABLE_CLASS( CGlxMulDRMIconProvider ) : public CGlxMulIconProvider |
|
134 { |
|
135 public: |
|
136 |
|
137 /** |
|
138 * TwoPhaseConstruction |
|
139 */ |
|
140 IMPORT_C static CGlxMulDRMIconProvider* NewL( ); |
|
141 |
|
142 /** |
|
143 * Contructor |
|
144 */ |
|
145 CGlxMulDRMIconProvider( ); |
|
146 |
|
147 /** |
|
148 * Destructor |
|
149 */ |
|
150 ~CGlxMulDRMIconProvider(); // Memory Leak Fix |
|
151 |
|
152 /** |
|
153 * IconIdL Returns the icon id |
|
154 * @param aMedia Media item |
|
155 */ |
|
156 TInt IconIdL( const TGlxMedia& aMedia ) const; |
|
157 |
|
158 /** |
|
159 * TwoPhaseConstruction |
|
160 */ |
|
161 void ConstructL( ); |
|
162 |
|
163 |
|
164 /** |
|
165 * ResourceFileName |
|
166 */ |
|
167 const TDesC& ResourceFileName() const; |
|
168 |
|
169 |
|
170 private: |
|
171 // Stores the resource id |
|
172 TInt iIconId; |
|
173 |
|
174 // The Resource file name from which icon to be read |
|
175 TFileName iMifFileName; |
|
176 |
|
177 // Provides DRM related functionality |
|
178 CGlxDRMUtility* iDRMUtility; |
|
179 }; |
|
180 |
|
181 //----------------------------------------------------------------------------- |
|
182 |
|
183 NONSHARABLE_CLASS( CGlxMulVideoIconProvider ) : public CGlxMulIconProvider |
|
184 { |
|
185 public: |
|
186 |
|
187 /** |
|
188 * TwoPhaseConstruction |
|
189 */ |
|
190 IMPORT_C static CGlxMulVideoIconProvider* NewL(TBool aIsFullscreen=EFalse); |
|
191 |
|
192 /** |
|
193 * Contructor |
|
194 */ |
|
195 CGlxMulVideoIconProvider(TBool aIsFullscreen); |
|
196 |
|
197 /** |
|
198 * Destructor |
|
199 */ |
|
200 ~CGlxMulVideoIconProvider(); |
|
201 |
|
202 /** |
|
203 * IconIdL Returns the icon id |
|
204 * @param aMedia Media item |
|
205 */ |
|
206 TInt IconIdL( const TGlxMedia& aMedia ) const; |
|
207 |
|
208 /** |
|
209 * TwoPhaseConstruction |
|
210 */ |
|
211 void ConstructL( ); |
|
212 |
|
213 |
|
214 /** |
|
215 * ResourceFileName |
|
216 */ |
|
217 const TDesC& ResourceFileName() const; |
|
218 |
|
219 |
|
220 private: |
|
221 // Stores the resource id |
|
222 TInt iIconId; |
|
223 |
|
224 // Flag to identify fullscreen icon |
|
225 TBool iIsFullscreen; |
|
226 |
|
227 // The Resource file name from which icon to be read |
|
228 TFileName iMifFileName; |
|
229 }; |
|
230 |
|
231 #endif //GLXMULICONPROVIDER_H_ |