1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 #ifndef C_WIDGETDESCRIPTION_H |
17 #ifndef C_WIDGETDESCRIPTION_H |
18 #define C_WIDGETDESCRIPTION_H |
18 #define C_WIDGETDESCRIPTION_H |
19 |
19 |
20 // INCLUDES |
20 // INCLUDES |
21 #include <e32base.h> |
21 #include <e32base.h> |
47 */ |
47 */ |
48 virtual ~CCaWidgetDescription(); |
48 virtual ~CCaWidgetDescription(); |
49 |
49 |
50 /** |
50 /** |
51 * Static method to compare two CCaWidgetDescription objects |
51 * Static method to compare two CCaWidgetDescription objects |
|
52 * used in Find() method |
52 * @param aFirst first item to compare |
53 * @param aFirst first item to compare |
53 * @param aSecond second item to compare |
54 * @param aSecond second item to compare |
54 * @return ETrue if iLibrary value is the same in both objects, |
55 * @return ETrue if widget uri value is the same in both objects, |
55 * otherwise returns EFalse |
56 * otherwise returns EFalse |
56 */ |
57 */ |
57 static TBool Compare( const CCaWidgetDescription& aFirst, |
58 static TBool Compare( const CCaWidgetDescription& aFirst, |
58 const CCaWidgetDescription& aSecond); |
59 const CCaWidgetDescription& aSecond ); |
59 |
60 |
60 /** |
61 /** |
61 * Method to compare two CCaWidgetDescription objects |
62 * Method to compare two CCaWidgetDescription objects |
62 * @param aToCompare first item to compare |
63 * @param aToCompare first item to compare |
63 * @return ETrue if all value is the same in both objects, |
64 * @return ETrue if all value is the same in both objects, |
100 * @param aIconUri widget icon uri |
107 * @param aIconUri widget icon uri |
101 */ |
108 */ |
102 void SetIconUriL( const TDesC& aIconUri ); |
109 void SetIconUriL( const TDesC& aIconUri ); |
103 |
110 |
104 /* |
111 /* |
|
112 * Preview image name setter. |
|
113 * @param aPreview preview image name identifier. |
|
114 */ |
|
115 void SetPreviewImageNameL( const TDesC& aPreviewName ); |
|
116 |
|
117 /* |
105 * Library setter |
118 * Library setter |
106 * @param aLibrary widget library |
119 * @param aLibrary widget library |
107 */ |
120 */ |
108 void SetLibraryL( const TDesC& aLibrary ); |
121 void SetLibraryL( const TDesC& aLibrary ); |
109 |
122 |
110 /* |
123 /* |
111 * Path setter |
124 * Content storage entry id getter |
112 * @param aLibrary widget library |
125 * @return CS entry id |
113 */ |
126 */ |
114 void SetPathL( const TDesC& aPath ); |
127 TInt GetEntryId() const; |
115 |
|
116 /* |
|
117 * Path getter |
|
118 * @return widget library |
|
119 */ |
|
120 TPtrC GetPath( ) const; |
|
121 |
|
122 /* |
|
123 * Missing flag setter |
|
124 * @param aMissing flag |
|
125 */ |
|
126 void SetMissing( TBool aMissing ); |
|
127 |
|
128 /* |
|
129 * Visible flag setter |
|
130 * @param aVisible flag |
|
131 */ |
|
132 void SetVisible( TBool aVisible ); |
|
133 |
|
134 /* |
|
135 * Used flag setter |
|
136 * @param aUsed flag |
|
137 */ |
|
138 void SetUsed( TBool aUsed ); |
|
139 |
|
140 /* |
|
141 * Content arsenal entry id getter |
|
142 * @return CA entry id |
|
143 */ |
|
144 TInt GetEntryId( ) const; |
|
145 |
128 |
146 /* |
129 /* |
147 * MMC id getter |
130 * MMC id getter |
148 * @return CA entry id |
131 * @return CA entry id |
149 */ |
132 */ |
150 TPtrC GetMmcId( ) const; |
133 TPtrC GetMmcId() const; |
151 |
134 |
152 /* |
135 /* |
153 * Library getter |
136 * Library getter |
154 * @return widget library |
137 * @return widget library |
155 */ |
138 */ |
156 TPtrC GetLibrary( ) const; |
139 TPtrC GetLibrary() const; |
157 |
140 |
158 /* |
141 /* |
159 * Description getter |
142 * Description getter |
160 * @return widget Description |
143 * @return widget Description |
161 */ |
144 */ |
162 TPtrC GetDescription( ) const; |
145 TPtrC GetDescription() const; |
163 |
146 |
164 /* |
147 /* |
165 * Uri getter |
148 * Uri getter |
166 * @return widget Uri |
149 * @return widget Uri |
167 */ |
150 */ |
168 TPtrC GetUri( ) const; |
151 TPtrC GetUri() const; |
169 |
152 |
170 /* |
153 /* |
171 * IconUri getter |
154 * IconUri getter |
172 * @return widget IconUri |
155 * @return widget IconUri |
173 */ |
156 */ |
174 TPtrC GetIconUri( ) const; |
157 TPtrC GetIconUri() const; |
175 |
158 |
|
159 /* |
|
160 * Preview image name getter |
|
161 * @return widget preview image name |
|
162 */ |
|
163 TPtrC GetPreviewImageName( ) const; |
|
164 |
176 /* |
165 /* |
177 * Title getter |
166 * Title getter |
178 * @return widget IconUri |
167 * @return widget title |
179 */ |
168 */ |
180 TPtrC GetTitle( ) const; |
169 TPtrC GetTitle() const; |
181 |
170 |
182 /* |
171 /* |
183 * Missing flag |
172 * Missing flag |
184 * @return ETrue if flag missing is set |
173 * @return ETrue if flag missing is set |
185 */ |
174 */ |
186 TBool IsMissing( ) const; |
175 TBool IsMissing() const; |
187 |
176 |
188 /* |
177 /* |
189 * Used flag |
178 * Used flag |
190 * @return ETrue if flag used is set |
179 * @return ETrue if flag used is set |
191 */ |
180 */ |
192 TBool IsUsed( ) const; |
181 TBool IsUsed() const; |
193 |
|
194 |
182 |
195 /* |
183 /* |
196 * Used flag |
184 * Used flag |
197 * @return ETrue if flag visible is set |
185 * @return ETrue if flag visible is set |
198 */ |
186 */ |
199 TBool IsVisible( ) const; |
187 TBool IsVisible() const; |
200 |
188 |
201 /* |
189 /* |
202 * Entry getter |
190 * Entry getter |
203 * @return entry representing widget |
191 * @return entry representing widget |
204 */ |
192 */ |
205 CCaInnerEntry* GetEntryLC( ) const; |
193 CCaInnerEntry* GetEntryLC() const; |
206 |
194 |
207 /* |
195 /* |
208 * Modification time setter |
196 * Modification time setter |
209 * @param aModificationTime |
197 * @param aModificationTime |
210 */ |
198 */ |
222 void RemoveMmcId(); |
210 void RemoveMmcId(); |
223 /* |
211 /* |
224 * Set service fw xml filename |
212 * Set service fw xml filename |
225 * @param aServiceXml Service xml filename |
213 * @param aServiceXml Service xml filename |
226 */ |
214 */ |
227 void SetServiceXmlL(const TDesC& aServiceXml); |
215 void SetServiceXmlL( const TDesC& aServiceXml ); |
228 /* |
216 /* |
229 * Get service fw xml filename |
217 * Get service fw xml filename |
230 * @return Service xml filename |
218 * @return Service xml filename |
231 */ |
219 */ |
232 TPtrC GetServiceXml() const; |
220 TPtrC GetServiceXml() const; |
233 |
221 |
234 /* |
222 /* |
235 /* |
223 /* |
236 * Localizes title and description, fill string id fields |
224 * Localizes title and description, fill string id fields |
237 */ |
225 */ |
238 void LocalizeTextsL(); |
226 void LocalizeTextsL(); |
239 |
227 |
240 /* |
228 /* |
241 * StringIdDescription time getter |
229 * StringIdDescription time getter |
242 * @return StringIdDescription |
230 * @return StringIdDescription |
243 */ |
231 */ |
244 TPtrC GetStringIdDescription() const; |
232 TPtrC GetStringIdDescription() const; |
245 |
233 |
246 /* |
234 /* |
247 * StringIdTitle time getter |
235 * StringIdTitle time getter |
248 * @return widget StringIdTitle |
236 * @return widget StringIdTitle |
249 */ |
237 */ |
250 TPtrC GetStringIdTitle() const; |
238 TPtrC GetStringIdTitle() const; |
251 |
239 |
252 /* |
240 /* |
253 * Set manifest file path name. |
241 * Set manifest file path name. |
254 * @param aServiceXml Manifest file path name. |
242 * @param aServiceXml Manifest file path name. |
255 */ |
243 */ |
256 void SetManifestFilePathNameL(const TDesC& aManifestFilePathName); |
244 void SetManifestFilePathNameL( const TDesC& aManifestFilePathName ); |
257 |
245 |
258 /* |
246 /* |
259 * Get manifest file path name. |
247 * Get manifest file path name. |
260 * @return Manifest file path name. |
248 * @return Manifest file path name. |
261 */ |
249 */ |
262 TPtrC GetManifestFilePathName() const; |
250 TPtrC GetManifestFilePathName() const; |
263 |
251 |
|
252 /* |
|
253 * Set logical string for description. |
|
254 * @param aStringIdDescription logical string for description. |
|
255 */ |
264 void SetStringIdDescriptionL( const TDesC& aStringIdDescription ); |
256 void SetStringIdDescriptionL( const TDesC& aStringIdDescription ); |
265 |
257 |
|
258 /* |
|
259 * Set logical string for title. |
|
260 * @param aStringIdTitle logical string for title. |
|
261 */ |
266 void SetStringidTitleL( const TDesC& aStringIdTitle ); |
262 void SetStringidTitleL( const TDesC& aStringIdTitle ); |
267 |
|
268 private: |
|
269 /* |
|
270 * Library name getter |
|
271 * @return libraru name |
|
272 */ |
|
273 TPtrC GetLibraryName( ) const; |
|
274 |
263 |
275 /* |
264 /* |
276 * Flag setter |
265 * Flag setter |
277 * @param aFlag flag |
266 * @param aFlag flag |
278 * @param aValue flag value |
267 * @param aValue flag value |
279 */ |
268 */ |
280 void SetFlag( TInt aFlag, TBool aValue ); |
269 void SetFlag( TInt aFlag, TBool aValue ); |
281 |
270 |
282 private: |
271 /* |
|
272 * Valid setter |
|
273 * @param aVal value |
|
274 */ |
|
275 void SetValid(TBool aVal); |
|
276 |
|
277 /* |
|
278 * Valid getter |
|
279 * @return valid value |
|
280 */ |
|
281 TBool CCaWidgetDescription::IsValid(); |
|
282 |
|
283 /* |
|
284 * Library name getter |
|
285 * @return libraru name |
|
286 */ |
|
287 TPtrC GetLibraryName() const; |
|
288 |
283 |
289 |
284 /** |
290 /** |
285 * C++ default constructor. |
291 * C++ default constructor. |
286 */ |
292 */ |
287 CCaWidgetDescription(); |
293 CCaWidgetDescription(); |
288 |
294 |
289 /** |
295 /** |
290 * By default Symbian 2nd phase constructor is private. |
296 * By default Symbian 2nd phase constructor is private. |
291 */ |
297 */ |
292 void ConstructL( ); |
298 void ConstructL(); |
293 void ConstructL( CCaInnerEntry* aEntry ); |
299 void ConstructL( CCaInnerEntry* aEntry ); |
294 |
300 |
295 |
|
296 private: |
|
297 // Data |
301 // Data |
298 |
302 |
299 /* |
303 /* |
300 * Content Storage entry id |
304 * Content Storage entry id |
301 */ |
305 */ |
302 TInt iEntryId; |
306 TInt iEntryId; |
|
307 |
|
308 /* |
|
309 * Marks vidget as valid, used to remove widgets |
|
310 */ |
|
311 TBool iValid; |
303 |
312 |
304 /* |
313 /* |
305 * Package UID |
314 * Package UID |
306 */ |
315 */ |
307 TUint iPackageUid; |
316 TUint iPackageUid; |