34
|
1 |
/*
|
|
2 |
* Copyright (c) 2003 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: Defines constant values for Avkon Skins.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef AKNSSRVSKININFORMATIONPKG_H
|
|
20 |
#define AKNSSRVSKININFORMATIONPKG_H
|
|
21 |
|
|
22 |
//INCLUDE FILES
|
|
23 |
|
|
24 |
#include <e32base.h>
|
|
25 |
|
|
26 |
#include <AknsPkgID.h>
|
|
27 |
|
|
28 |
// CONSTANTS
|
|
29 |
|
|
30 |
/**
|
|
31 |
* Enumeration for the skin package locations.
|
|
32 |
*
|
|
33 |
* @since 2.0
|
|
34 |
*
|
|
35 |
*/
|
|
36 |
enum TAknSkinSrvSkinPackageLocation
|
|
37 |
{
|
|
38 |
/**
|
|
39 |
* Location enum value for phone (drives C:\ and Z:\)
|
|
40 |
*/
|
|
41 |
EAknsSrvPhone = 0,
|
|
42 |
|
|
43 |
/**
|
|
44 |
* Location enum value for MMC (E:\)
|
|
45 |
*/
|
|
46 |
EAknsSrvMMC = 2,
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Location enum value for all drives available.(d:\ ie. RAM disk excluded)
|
|
50 |
*/
|
|
51 |
EAknsSrvAll = 4
|
|
52 |
};
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Enumeration for the skin protection type.
|
|
56 |
*
|
|
57 |
* @since 2.6
|
|
58 |
*
|
|
59 |
*/
|
|
60 |
enum TAknsSkinSrvSkinProtectionType
|
|
61 |
{
|
|
62 |
/**
|
|
63 |
* The skin is not DRM protected
|
|
64 |
*/
|
|
65 |
EAknsSrvNoProtection,
|
|
66 |
|
|
67 |
/**
|
|
68 |
* The skin is DRM protected
|
|
69 |
*/
|
|
70 |
EAknsSrvProtected,
|
|
71 |
|
|
72 |
/**
|
|
73 |
* The rights object for has no rights for the skin
|
|
74 |
*/
|
|
75 |
EAknsSrvNoRights,
|
|
76 |
|
|
77 |
/**
|
|
78 |
* The rights object for the skin is count based,
|
|
79 |
* and should not be allowed to activated or
|
|
80 |
* edited.
|
|
81 |
* §qtn_drm_prev_rights_set§ should be displayed.
|
|
82 |
*/
|
|
83 |
EAknsSrvCountBased,
|
|
84 |
|
|
85 |
/**
|
|
86 |
* The rights object is valid in the future,
|
|
87 |
* should not be allowed to be actived or
|
|
88 |
* edited.
|
|
89 |
* §qtn_drm_prev_rights_set§ should be displayed.
|
|
90 |
*/
|
|
91 |
EAknsSrvFutureRights,
|
|
92 |
|
|
93 |
/**
|
|
94 |
* The rights object has bee expired
|
|
95 |
* §qtn_drm_mgr_det_exp§ from drmcommon should be displayed
|
|
96 |
*/
|
|
97 |
EAknsSrvExpiredRights
|
|
98 |
};
|
|
99 |
|
|
100 |
// CLASS DECLARATIONS
|
|
101 |
|
|
102 |
struct TAknsSrvSkinInfoPkg
|
|
103 |
{
|
|
104 |
public:
|
|
105 |
TAknsPkgID iPID; // Package ID of the skin
|
|
106 |
TAknsPkgID iColorSchemePID; // Package ID of the color scheme in the skin
|
|
107 |
TFileName iSkinDirectoryBuf; // The directory of the skin package
|
|
108 |
TFileName iSkinIniFileDirectoryBuf; // The directory containing the skin ini file
|
|
109 |
TFileName iSkinNameBuf; // The name of the skin package.
|
|
110 |
TFileName iIdleStateWallPaperImageName; // The name of the idle state wallpaper mbm file.
|
|
111 |
TFileName iFullName; // The fully qualified skn-file name
|
|
112 |
TBool iIsCopyable; // Boolean value specifying if the skin package copyable
|
|
113 |
TBool iIsDeletable; // Boolean value specifying if the skin package is deletable
|
|
114 |
TInt iIdleBgImageIndex; // The index of the idle state background image
|
|
115 |
TAknsSkinSrvSkinProtectionType iProtectionType; // Specifies the DRM protection type in this skin
|
|
116 |
TBool iCorrupted; // Specifies if the skin is somehow corrupted
|
|
117 |
TBool iSupportAnimBg; // Specifies if the skin support animated background
|
|
118 |
};
|
|
119 |
|
|
120 |
/**
|
|
121 |
* A storage class containing skin information.
|
|
122 |
*
|
|
123 |
* @since 2.0
|
|
124 |
*
|
|
125 |
**/
|
|
126 |
NONSHARABLE_CLASS(CAknsSrvSkinInformationPkg) : public CBase
|
|
127 |
{
|
|
128 |
public: // Construction and destruction
|
|
129 |
|
|
130 |
static CAknsSrvSkinInformationPkg* NewL(
|
|
131 |
const TAknsPkgID aPID, const TAknsPkgID aColorSchemePID,
|
|
132 |
const TDesC& aDirectory, const TDesC& aInifileDir,
|
|
133 |
const TDesC& aSkinName,
|
|
134 |
const TDesC& aIdleStateMbmFilename,
|
|
135 |
const TDesC& aPinboardWallPaperMbmFilename,
|
|
136 |
const TDesC& aFullName,
|
|
137 |
const TInt aIdleBgImageIndex,
|
|
138 |
const TInt aPinboardBgImageIndex,
|
|
139 |
const TBool aDeletable,
|
|
140 |
const TBool aCopyable,
|
|
141 |
const TBool aHasIconset,
|
|
142 |
const TAknsSkinSrvSkinProtectionType aProtectionType,
|
|
143 |
const TBool aCorrupted,
|
|
144 |
const TBool aSupportAnimBg);
|
|
145 |
|
|
146 |
virtual ~CAknsSrvSkinInformationPkg();
|
|
147 |
|
|
148 |
public: // New methods
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Gets the package ID of the skin
|
|
152 |
*
|
|
153 |
* @since 2.0
|
|
154 |
*
|
|
155 |
* @return The package ID of the skin
|
|
156 |
*/
|
|
157 |
IMPORT_C TAknsPkgID PID() const;
|
|
158 |
|
|
159 |
/**
|
|
160 |
* Gets the skin package directory
|
|
161 |
*
|
|
162 |
* @since 2.0
|
|
163 |
*
|
|
164 |
* @return The skin package directory
|
|
165 |
*/
|
|
166 |
IMPORT_C TDesC& Directory() const;
|
|
167 |
|
|
168 |
/**
|
|
169 |
* Gets the skin package ini file directory
|
|
170 |
*
|
|
171 |
* @since 2.0
|
|
172 |
*
|
|
173 |
* @return The skin package ini file directory
|
|
174 |
*/
|
|
175 |
IMPORT_C TDesC& IniFileDirectory() const;
|
|
176 |
|
|
177 |
/**
|
|
178 |
* Gets the skin name. May or may not be empty.
|
|
179 |
*
|
|
180 |
* @since 2.0
|
|
181 |
*
|
|
182 |
* @return The skin name, may also be empty
|
|
183 |
*/
|
|
184 |
IMPORT_C TDesC& Name() const;
|
|
185 |
|
|
186 |
/**
|
|
187 |
* Gets the skin idle state wallpaper mbm file name. May or may not be empty.
|
|
188 |
* The filename is fully qualified (incl. full file path)
|
|
189 |
*
|
|
190 |
* @since 2.0
|
|
191 |
*
|
|
192 |
* @return The mbm filename of the skin wallpaper, may also be empty
|
|
193 |
*/
|
|
194 |
IMPORT_C TDesC& IdleStateWallPaperImageFileName() const;
|
|
195 |
|
|
196 |
/**
|
|
197 |
* Gets the skin pinboard wallpaper mbm file name. May or may not be empty.
|
|
198 |
* The filename is fully qualified (incl. full file path)
|
|
199 |
*
|
|
200 |
* @since 2.0
|
|
201 |
*
|
|
202 |
* @return The mbm filename of the pinboard wallpaper, may also be empty
|
|
203 |
*/
|
|
204 |
IMPORT_C TDesC& PinboarWallPaperImageFileName() const;
|
|
205 |
|
|
206 |
/**
|
|
207 |
* Gets the idle state background image index.
|
|
208 |
*
|
|
209 |
* @since 2.0
|
|
210 |
*
|
|
211 |
* @return The idle state background image index.
|
|
212 |
*/
|
|
213 |
IMPORT_C TInt IdleStateWallPaperImageIndex() const;
|
|
214 |
|
|
215 |
/**
|
|
216 |
* Gets the pinboard background image index.
|
|
217 |
*
|
|
218 |
* @since 2.0
|
|
219 |
*
|
|
220 |
* @return The pinboard background image index.
|
|
221 |
*/
|
|
222 |
IMPORT_C TInt PinboardWallPaperImageIndex() const;
|
|
223 |
|
|
224 |
/**
|
|
225 |
* Indicates if the skin package is deletable.
|
|
226 |
*
|
|
227 |
* @since 2.0
|
|
228 |
*
|
|
229 |
* @return ETrue if the skin is deletable, EFalse otherwise.
|
|
230 |
*/
|
|
231 |
IMPORT_C TBool IsDeletable() const;
|
|
232 |
|
|
233 |
/**
|
|
234 |
* Indicates if the skin package is copyable.
|
|
235 |
*
|
|
236 |
* @since 2.0
|
|
237 |
*
|
|
238 |
* @return ETrue if the skin is deletable, EFalse otherwise.
|
|
239 |
*/
|
|
240 |
IMPORT_C TBool IsCopyable() const;
|
|
241 |
|
|
242 |
/**
|
|
243 |
* Returns the color scheme package ID for this skin.
|
|
244 |
*
|
|
245 |
* @since 2.0
|
|
246 |
*
|
|
247 |
* @return Package ID value of the color scheme associated with this
|
|
248 |
* skin, or @c KAknsNullPkgID if this skin has no preference over
|
|
249 |
* color schemes.
|
|
250 |
*
|
|
251 |
*/
|
|
252 |
IMPORT_C TAknsPkgID ColorSchemePID() const;
|
|
253 |
|
|
254 |
/**
|
|
255 |
* Indicates whether the skin has an iconset.
|
|
256 |
*
|
|
257 |
* @since 2.0
|
|
258 |
*
|
|
259 |
* @return ETrue if the skin has an iconset, EFalse otherwise.
|
|
260 |
*/
|
|
261 |
IMPORT_C TBool HasIconset() const;
|
|
262 |
|
|
263 |
/**
|
|
264 |
* Gets the protection type for this skin
|
|
265 |
*
|
|
266 |
* @since 2.6
|
|
267 |
*
|
|
268 |
* @return The protection type for this skin.
|
|
269 |
*/
|
|
270 |
IMPORT_C TAknsSkinSrvSkinProtectionType ProtectionType() const;
|
|
271 |
|
|
272 |
/**
|
|
273 |
* Indicates whether the skin is corrupted.
|
|
274 |
*
|
|
275 |
* @since 2.6
|
|
276 |
*
|
|
277 |
* @return ETrue if the skin is corrupted, EFalse otherwise.
|
|
278 |
*/
|
|
279 |
IMPORT_C TBool IsCorrupted() const;
|
|
280 |
|
|
281 |
/**
|
|
282 |
* Get the fully qualified skin skn-filename (incl. full path).
|
|
283 |
*
|
|
284 |
* @since 2.6
|
|
285 |
*
|
|
286 |
* @return The fully qualified skn-file name.
|
|
287 |
*/
|
|
288 |
IMPORT_C TDesC& FullName() const;
|
|
289 |
|
|
290 |
/**
|
|
291 |
* Indicates whether the skin support animation background.
|
|
292 |
*
|
|
293 |
* @since 5.2
|
|
294 |
*
|
|
295 |
* @return The fully qualified skn-file name.
|
|
296 |
*/
|
|
297 |
IMPORT_C TBool IsSupportAnimBg() const;
|
|
298 |
|
|
299 |
protected:
|
|
300 |
CAknsSrvSkinInformationPkg(
|
|
301 |
const TAknsPkgID aPID, const TAknsPkgID aColorSchemePID,
|
|
302 |
const TBool aDeletable, const TBool aCopyable,
|
|
303 |
const TInt aIdleBgImageIndex,
|
|
304 |
const TInt aPinboardBgImageIndex, const TBool aHasIconset,
|
|
305 |
const TAknsSkinSrvSkinProtectionType aProtectionType,
|
|
306 |
const TBool aCorrupted,
|
|
307 |
const TBool aSupportAnimBg);
|
|
308 |
|
|
309 |
void ConstructL(
|
|
310 |
const TDesC& aDirectory, const TDesC& aInifileDir,
|
|
311 |
const TDesC& aSkinName, const TDesC& aIdleStateMbmFilename,
|
|
312 |
const TDesC& aPinboardWallPaperMbmFilename,
|
|
313 |
const TDesC& aFullName);
|
|
314 |
|
|
315 |
private:
|
|
316 |
TAknsPkgID iPID; // Package ID of the skin
|
|
317 |
TAknsPkgID iColorSchemePID; // Package ID of the color scheme in the skin
|
|
318 |
HBufC* iSkinDirectoryBuf; // The directory of the skin package
|
|
319 |
HBufC* iSkinIniFileDirectoryBuf; // The directory containing the skin ini file
|
|
320 |
HBufC* iSkinNameBuf; // The name of the skin package.
|
|
321 |
HBufC* iIdleStateWallPaperImageName; // The name of the idle state wallpaper mbm file.
|
|
322 |
HBufC* iPinboardWallPaperImageName; // The name of the pinboard wallpaper mbm file
|
|
323 |
HBufC* iFullName; // The fully qualified skn-file name
|
|
324 |
TBool iIsCopyable; // Boolean value specifying if the skin package copyable
|
|
325 |
TBool iIsDeletable; // Boolean value specifying if the skin package is deletable
|
|
326 |
TInt iIdleBgImageIndex; // The index of the idle state background image
|
|
327 |
TInt iPinboardBgImageIndex; // The index of the pinboard backgound image
|
|
328 |
TBool iHasIconset; // Boolean value indicating whether this skin has an iconset
|
|
329 |
TAknsSkinSrvSkinProtectionType iProtectionType; // Specifies the DRM protection type in this skin
|
|
330 |
TBool iCorrupted; // Specifies if the skin is somehow corrupted
|
|
331 |
TBool iSupportAnimBg; // Specifies if the skin support Animated background
|
|
332 |
};
|
|
333 |
|
|
334 |
#endif AKNSSRVSKININFORMATIONPKG_H // AknsSrvSkinInformationPkg.h
|
|
335 |
|
|
336 |
// End of file
|