|
1 /* |
|
2 * Copyright (c) 2003-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 "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 a class encapsulating various information on single |
|
15 * skin in the system. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <AknsSrvSkinInformationPkg.h> |
|
22 |
|
23 // ----------------------------------------------------------------------------- |
|
24 // CAknsSrvSkinInformationPkg::NewL |
|
25 // ----------------------------------------------------------------------------- |
|
26 // |
|
27 CAknsSrvSkinInformationPkg* CAknsSrvSkinInformationPkg::NewL( |
|
28 const TAknsPkgID aPID, |
|
29 const TAknsPkgID aColorSchemePID, |
|
30 const TDesC& aDirectory, |
|
31 const TDesC& aInifileDir, |
|
32 const TDesC& aSkinName, |
|
33 const TDesC& aIdleStateMbmFilename, |
|
34 const TDesC& aPinboardWallPaperMbmFilename, |
|
35 const TDesC& aFullName, |
|
36 const TInt aIdleBgImageIndex, |
|
37 const TInt aPinboardBgImageIndex, |
|
38 const TBool aDeletable, |
|
39 const TBool aCopyable, |
|
40 const TBool aHasIconset, |
|
41 const TAknsSkinSrvSkinProtectionType aProtectionType, |
|
42 const TBool aCorrupted, |
|
43 const TBool aSupportAnimBg) |
|
44 { |
|
45 CAknsSrvSkinInformationPkg* self = new (ELeave) CAknsSrvSkinInformationPkg( |
|
46 aPID, aColorSchemePID, aDeletable, aCopyable, aIdleBgImageIndex, |
|
47 aPinboardBgImageIndex, aHasIconset, aProtectionType, aCorrupted, aSupportAnimBg ); |
|
48 CleanupStack::PushL(self); |
|
49 self->ConstructL(aDirectory, aInifileDir, aSkinName, aIdleStateMbmFilename, aPinboardWallPaperMbmFilename, aFullName ); |
|
50 CleanupStack::Pop( self ); |
|
51 return self; |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CAknsSrvSkinInformationPkg::CAknsSrvSkinInformationPkg |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CAknsSrvSkinInformationPkg::CAknsSrvSkinInformationPkg( |
|
59 const TAknsPkgID aPID, |
|
60 const TAknsPkgID aColorSchemePID, |
|
61 const TBool aDeletable, |
|
62 const TBool aCopyable, |
|
63 const TInt aIdleBgImageIndex, |
|
64 const TInt aPinboardBgImageIndex, |
|
65 const TBool aHasIconset, |
|
66 const TAknsSkinSrvSkinProtectionType aProtectionType, |
|
67 const TBool aCorrupted, |
|
68 const TBool aSupportAnimBg) |
|
69 { |
|
70 iPID.Set( aPID ); |
|
71 iColorSchemePID.Set( aColorSchemePID ); |
|
72 iIsDeletable = aDeletable; |
|
73 iIsCopyable = aCopyable; |
|
74 iIdleBgImageIndex = aIdleBgImageIndex; |
|
75 iPinboardBgImageIndex = aPinboardBgImageIndex; |
|
76 iHasIconset = aHasIconset; |
|
77 iProtectionType = aProtectionType; |
|
78 iCorrupted = aCorrupted; |
|
79 iSupportAnimBg = aSupportAnimBg; |
|
80 } |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CAknsSrvSkinInformationPkg::~CAknsSrvSkinInformationPkg |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 CAknsSrvSkinInformationPkg::~CAknsSrvSkinInformationPkg() |
|
87 { |
|
88 delete iSkinDirectoryBuf; |
|
89 delete iSkinIniFileDirectoryBuf; |
|
90 delete iSkinNameBuf; |
|
91 delete iIdleStateWallPaperImageName; |
|
92 delete iPinboardWallPaperImageName; |
|
93 delete iFullName; |
|
94 } |
|
95 |
|
96 // ----------------------------------------------------------------------------- |
|
97 // CAknsSrvSkinInformationPkg::ConstructL |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 void CAknsSrvSkinInformationPkg::ConstructL( |
|
101 const TDesC& aDirectory, const TDesC& aInifileDir, const TDesC& aSkinName, |
|
102 const TDesC& aIdleStateMbmFilename, |
|
103 const TDesC& aPinboardWallPaperMbmFilename, |
|
104 const TDesC& aFullName) |
|
105 { |
|
106 iSkinDirectoryBuf = aDirectory.AllocL(); |
|
107 iSkinIniFileDirectoryBuf = aInifileDir.AllocL(); |
|
108 iSkinNameBuf = aSkinName.AllocL(); |
|
109 iIdleStateWallPaperImageName = aIdleStateMbmFilename.AllocL(); |
|
110 iPinboardWallPaperImageName = aPinboardWallPaperMbmFilename.AllocL(); |
|
111 iFullName = aFullName.AllocL(); |
|
112 } |
|
113 |
|
114 // ----------------------------------------------------------------------------- |
|
115 // CAknsSrvSkinInformationPkg::PID |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 EXPORT_C TAknsPkgID CAknsSrvSkinInformationPkg::PID() const |
|
119 { |
|
120 return iPID; |
|
121 } |
|
122 |
|
123 // ----------------------------------------------------------------------------- |
|
124 // CAknsSrvSkinInformationPkg::Directory |
|
125 // ----------------------------------------------------------------------------- |
|
126 // |
|
127 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::Directory() const |
|
128 { |
|
129 return *iSkinDirectoryBuf; |
|
130 } |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // CAknsSrvSkinInformationPkg::IniFileDirectory |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::IniFileDirectory() const |
|
137 { |
|
138 return *iSkinIniFileDirectoryBuf; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // CAknsSrvSkinInformationPkg::Name |
|
143 // ----------------------------------------------------------------------------- |
|
144 // |
|
145 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::Name() const |
|
146 { |
|
147 return *iSkinNameBuf; |
|
148 } |
|
149 |
|
150 // ----------------------------------------------------------------------------- |
|
151 // CAknsSrvSkinInformationPkg::IdleStateWallPaperImageFileName |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::IdleStateWallPaperImageFileName() const |
|
155 { |
|
156 return *iIdleStateWallPaperImageName; |
|
157 } |
|
158 |
|
159 // ----------------------------------------------------------------------------- |
|
160 // CAknsSrvSkinInformationPkg::PinboardWallPaperImageFileName |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::PinboarWallPaperImageFileName() const |
|
164 { |
|
165 return *iPinboardWallPaperImageName; |
|
166 } |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // CAknsSrvSkinInformationPkg::IdleStateWallPaperImageIndex |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 EXPORT_C TInt CAknsSrvSkinInformationPkg::IdleStateWallPaperImageIndex() const |
|
173 { |
|
174 return iIdleBgImageIndex; |
|
175 } |
|
176 |
|
177 // ----------------------------------------------------------------------------- |
|
178 // CAknsSrvSkinInformationPkg::PinboardWallPaperImageIndex |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 EXPORT_C TInt CAknsSrvSkinInformationPkg::PinboardWallPaperImageIndex() const |
|
182 { |
|
183 return iPinboardBgImageIndex; |
|
184 } |
|
185 |
|
186 // ----------------------------------------------------------------------------- |
|
187 // CAknsSrvSkinInformationPkg::IsCopyable |
|
188 // ----------------------------------------------------------------------------- |
|
189 // |
|
190 EXPORT_C TBool CAknsSrvSkinInformationPkg::IsCopyable() const |
|
191 { |
|
192 return iIsCopyable; |
|
193 } |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // CAknsSrvSkinInformationPkg::IsDeletable |
|
197 // ----------------------------------------------------------------------------- |
|
198 // |
|
199 EXPORT_C TBool CAknsSrvSkinInformationPkg::IsDeletable() const |
|
200 { |
|
201 return iIsDeletable; |
|
202 } |
|
203 |
|
204 // ----------------------------------------------------------------------------- |
|
205 // CAknsSrvSkinInformationPkg::ColorSchemePID |
|
206 // ----------------------------------------------------------------------------- |
|
207 // |
|
208 EXPORT_C TAknsPkgID CAknsSrvSkinInformationPkg::ColorSchemePID() const |
|
209 { |
|
210 return iColorSchemePID; |
|
211 } |
|
212 |
|
213 // ----------------------------------------------------------------------------- |
|
214 // CAknsSrvSkinInformationPkg::HasIconset |
|
215 // ----------------------------------------------------------------------------- |
|
216 // |
|
217 EXPORT_C TBool CAknsSrvSkinInformationPkg::HasIconset() const |
|
218 { |
|
219 return iHasIconset; |
|
220 } |
|
221 |
|
222 // ----------------------------------------------------------------------------- |
|
223 // CAknsSrvSkinInformationPkg::ProtectionType |
|
224 // ----------------------------------------------------------------------------- |
|
225 // |
|
226 EXPORT_C TAknsSkinSrvSkinProtectionType CAknsSrvSkinInformationPkg::ProtectionType() const |
|
227 { |
|
228 return iProtectionType; |
|
229 } |
|
230 |
|
231 // ----------------------------------------------------------------------------- |
|
232 // CAknsSrvSkinInformationPkg::IsCorrupted |
|
233 // ----------------------------------------------------------------------------- |
|
234 // |
|
235 EXPORT_C TBool CAknsSrvSkinInformationPkg::IsCorrupted() const |
|
236 { |
|
237 return iCorrupted; |
|
238 } |
|
239 |
|
240 // ----------------------------------------------------------------------------- |
|
241 // CAknsSrvSkinInformationPkg::IsSupportAnimBg |
|
242 // ----------------------------------------------------------------------------- |
|
243 // |
|
244 EXPORT_C TBool CAknsSrvSkinInformationPkg::IsSupportAnimBg() const |
|
245 { |
|
246 return iSupportAnimBg; |
|
247 } |
|
248 |
|
249 // ----------------------------------------------------------------------------- |
|
250 // CAknsSrvSkinInformationPkg::FullName |
|
251 // ----------------------------------------------------------------------------- |
|
252 // |
|
253 EXPORT_C TDesC& CAknsSrvSkinInformationPkg::FullName() const |
|
254 { |
|
255 return *iFullName; |
|
256 } |
|
257 |
|
258 // End of File |