85
|
1 |
/*
|
98
|
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 "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 |
*/
|
85
|
17 |
#ifndef C_WIDGETDESCRIPTION_H
|
|
18 |
#define C_WIDGETDESCRIPTION_H
|
|
19 |
|
|
20 |
// INCLUDES
|
|
21 |
#include <e32base.h>
|
|
22 |
// CONSTANTS
|
|
23 |
|
|
24 |
// FORWARD DECLARATIONS
|
|
25 |
class CCaInnerEntry;
|
|
26 |
|
|
27 |
/**
|
|
28 |
* Widget Parser
|
|
29 |
*
|
|
30 |
* @since Series Series60 5.x
|
|
31 |
*/
|
|
32 |
class CCaWidgetDescription : public CBase
|
|
33 |
{
|
|
34 |
|
|
35 |
public:
|
|
36 |
// Constructors and destructor
|
|
37 |
|
|
38 |
/**
|
|
39 |
* Two-phased constructor.
|
|
40 |
*/
|
|
41 |
static CCaWidgetDescription* NewL( );
|
|
42 |
static CCaWidgetDescription* NewLC( );
|
|
43 |
static CCaWidgetDescription* NewLC( CCaInnerEntry* aEntry );
|
|
44 |
|
|
45 |
/**
|
|
46 |
* Destructor.
|
|
47 |
*/
|
|
48 |
virtual ~CCaWidgetDescription();
|
|
49 |
|
|
50 |
/**
|
107
|
51 |
* @return new heap allocated object being a copy of the object.
|
|
52 |
* Ownership is passed to the caller.
|
|
53 |
*/
|
|
54 |
CCaWidgetDescription *CloneL();
|
|
55 |
|
|
56 |
/**
|
85
|
57 |
* Static method to compare two CCaWidgetDescription objects
|
98
|
58 |
* used in Find() method
|
85
|
59 |
* @param aFirst first item to compare
|
|
60 |
* @param aSecond second item to compare
|
98
|
61 |
* @return ETrue if widget uri value is the same in both objects,
|
85
|
62 |
* otherwise returns EFalse
|
|
63 |
*/
|
107
|
64 |
static TBool CompareUri( const CCaWidgetDescription& aFirst,
|
98
|
65 |
const CCaWidgetDescription& aSecond );
|
85
|
66 |
|
|
67 |
/**
|
|
68 |
* Method to compare two CCaWidgetDescription objects
|
|
69 |
* @param aToCompare first item to compare
|
|
70 |
* @return ETrue if all value is the same in both objects,
|
|
71 |
* otherwise returns EFalse
|
|
72 |
*/
|
|
73 |
TBool Compare( const CCaWidgetDescription& aToCompare );
|
|
74 |
|
|
75 |
/*
|
|
76 |
* MMC id setter
|
|
77 |
* @param aMmcId MMC id
|
|
78 |
*/
|
93
|
79 |
void SetMmcIdL( const TDesC& aMmcId );
|
85
|
80 |
|
|
81 |
/*
|
|
82 |
* PackageUid setter
|
|
83 |
* @param aPackageUid package UID
|
|
84 |
*/
|
|
85 |
void SetPackageUidL( const TDesC& aPackageUid );
|
|
86 |
|
|
87 |
/*
|
98
|
88 |
* PackageUid getter
|
|
89 |
* @return iPackageUid - package UID
|
|
90 |
*/
|
|
91 |
TUint GetPackageUidL();
|
|
92 |
|
|
93 |
/*
|
85
|
94 |
* Title setter
|
|
95 |
* @param aTitle widget title
|
|
96 |
*/
|
|
97 |
void SetTitleL( const TDesC& aTitle );
|
|
98 |
|
|
99 |
/*
|
|
100 |
* Description setter
|
|
101 |
* @param aTitle widget title
|
|
102 |
*/
|
|
103 |
void SetDescriptionL( const TDesC& aDescription );
|
|
104 |
|
|
105 |
/*
|
|
106 |
* Uri setter
|
|
107 |
* @param aUri widget uri
|
|
108 |
*/
|
|
109 |
void SetUriL( const TDesC& aUri );
|
99
|
110 |
|
|
111 |
/*
|
|
112 |
* Translation file setter.
|
|
113 |
* @param aTranslationFileName widget translation file.
|
|
114 |
*/
|
|
115 |
void SetTranslationFileNameL( const TDesC& aTranslationFileName );
|
85
|
116 |
|
|
117 |
/*
|
|
118 |
* Icon Uri setter
|
|
119 |
* @param aIconUri widget icon uri
|
|
120 |
*/
|
|
121 |
void SetIconUriL( const TDesC& aIconUri );
|
|
122 |
|
|
123 |
/*
|
98
|
124 |
* Preview image name setter.
|
|
125 |
* @param aPreview preview image name identifier.
|
|
126 |
*/
|
|
127 |
void SetPreviewImageNameL( const TDesC& aPreviewName );
|
|
128 |
|
|
129 |
/*
|
85
|
130 |
* Library setter
|
|
131 |
* @param aLibrary widget library
|
|
132 |
*/
|
|
133 |
void SetLibraryL( const TDesC& aLibrary );
|
|
134 |
|
|
135 |
/*
|
99
|
136 |
* Path setter
|
|
137 |
* @param aLibrary widget library
|
|
138 |
*/
|
|
139 |
void SetPathL( const TDesC& aPath );
|
|
140 |
|
|
141 |
/*
|
|
142 |
* Path getter
|
|
143 |
* @return widget library
|
|
144 |
*/
|
|
145 |
TPtrC GetPath( ) const;
|
|
146 |
|
|
147 |
/*
|
98
|
148 |
* Content storage entry id getter
|
|
149 |
* @return CS entry id
|
85
|
150 |
*/
|
98
|
151 |
TInt GetEntryId() const;
|
85
|
152 |
|
|
153 |
/*
|
|
154 |
* MMC id getter
|
|
155 |
* @return CA entry id
|
|
156 |
*/
|
98
|
157 |
TPtrC GetMmcId() const;
|
|
158 |
|
85
|
159 |
/*
|
|
160 |
* Library getter
|
|
161 |
* @return widget library
|
|
162 |
*/
|
98
|
163 |
TPtrC GetLibrary() const;
|
85
|
164 |
|
|
165 |
/*
|
|
166 |
* Description getter
|
|
167 |
* @return widget Description
|
|
168 |
*/
|
98
|
169 |
TPtrC GetDescription() const;
|
85
|
170 |
|
|
171 |
/*
|
|
172 |
* Uri getter
|
|
173 |
* @return widget Uri
|
|
174 |
*/
|
98
|
175 |
TPtrC GetUri() const;
|
85
|
176 |
|
|
177 |
/*
|
99
|
178 |
* Uri translation filename
|
|
179 |
* @return widget translation filename
|
|
180 |
*/
|
|
181 |
TPtrC GetTranslationFileName() const;
|
|
182 |
|
|
183 |
/*
|
85
|
184 |
* IconUri getter
|
|
185 |
* @return widget IconUri
|
|
186 |
*/
|
98
|
187 |
TPtrC GetIconUri() const;
|
85
|
188 |
|
|
189 |
/*
|
98
|
190 |
* Preview image name getter
|
|
191 |
* @return widget preview image name
|
|
192 |
*/
|
|
193 |
TPtrC GetPreviewImageName( ) const;
|
|
194 |
|
|
195 |
/*
|
85
|
196 |
* Title getter
|
98
|
197 |
* @return widget title
|
85
|
198 |
*/
|
98
|
199 |
TPtrC GetTitle() const;
|
85
|
200 |
|
|
201 |
/*
|
|
202 |
* Missing flag
|
|
203 |
* @return ETrue if flag missing is set
|
|
204 |
*/
|
98
|
205 |
TBool IsMissing() const;
|
85
|
206 |
|
|
207 |
/*
|
87
|
208 |
* Used flag
|
|
209 |
* @return ETrue if flag used is set
|
|
210 |
*/
|
98
|
211 |
TBool IsUsed() const;
|
93
|
212 |
|
|
213 |
/*
|
|
214 |
* Used flag
|
|
215 |
* @return ETrue if flag visible is set
|
|
216 |
*/
|
98
|
217 |
TBool IsVisible() const;
|
93
|
218 |
|
87
|
219 |
/*
|
85
|
220 |
* Entry getter
|
|
221 |
* @return entry representing widget
|
|
222 |
*/
|
98
|
223 |
CCaInnerEntry* GetEntryLC() const;
|
93
|
224 |
|
87
|
225 |
/*
|
|
226 |
* Modification time setter
|
|
227 |
* @param aModificationTime
|
|
228 |
*/
|
|
229 |
void SetModificationTimeL( const TDesC& aModificationTime );
|
|
230 |
|
|
231 |
/*
|
|
232 |
* Modification time getter
|
|
233 |
* @return widget Modification time
|
|
234 |
*/
|
93
|
235 |
TPtrC GetModificationTime() const;
|
|
236 |
|
|
237 |
/*
|
|
238 |
* Remove MMC id.
|
|
239 |
*/
|
|
240 |
void RemoveMmcId();
|
|
241 |
/*
|
|
242 |
* Set service fw xml filename
|
|
243 |
* @param aServiceXml Service xml filename
|
|
244 |
*/
|
98
|
245 |
void SetServiceXmlL( const TDesC& aServiceXml );
|
93
|
246 |
/*
|
|
247 |
* Get service fw xml filename
|
|
248 |
* @return Service xml filename
|
|
249 |
*/
|
|
250 |
TPtrC GetServiceXml() const;
|
98
|
251 |
|
96
|
252 |
/*
|
98
|
253 |
/*
|
|
254 |
* Localizes title and description, fill string id fields
|
|
255 |
*/
|
96
|
256 |
void LocalizeTextsL();
|
98
|
257 |
|
96
|
258 |
/*
|
|
259 |
* StringIdDescription time getter
|
|
260 |
* @return StringIdDescription
|
|
261 |
*/
|
|
262 |
TPtrC GetStringIdDescription() const;
|
98
|
263 |
|
96
|
264 |
/*
|
|
265 |
* StringIdTitle time getter
|
|
266 |
* @return widget StringIdTitle
|
|
267 |
*/
|
|
268 |
TPtrC GetStringIdTitle() const;
|
98
|
269 |
|
|
270 |
/*
|
94
|
271 |
* Set manifest file path name.
|
|
272 |
* @param aServiceXml Manifest file path name.
|
|
273 |
*/
|
98
|
274 |
void SetManifestFilePathNameL( const TDesC& aManifestFilePathName );
|
|
275 |
|
94
|
276 |
/*
|
|
277 |
* Get manifest file path name.
|
|
278 |
* @return Manifest file path name.
|
|
279 |
*/
|
|
280 |
TPtrC GetManifestFilePathName() const;
|
96
|
281 |
|
98
|
282 |
/*
|
|
283 |
* Set logical string for description.
|
|
284 |
* @param aStringIdDescription logical string for description.
|
|
285 |
*/
|
96
|
286 |
void SetStringIdDescriptionL( const TDesC& aStringIdDescription );
|
|
287 |
|
98
|
288 |
/*
|
|
289 |
* Set logical string for title.
|
|
290 |
* @param aStringIdTitle logical string for title.
|
|
291 |
*/
|
96
|
292 |
void SetStringidTitleL( const TDesC& aStringIdTitle );
|
|
293 |
|
85
|
294 |
/*
|
|
295 |
* Flag setter
|
|
296 |
* @param aFlag flag
|
|
297 |
* @param aValue flag value
|
|
298 |
*/
|
|
299 |
void SetFlag( TInt aFlag, TBool aValue );
|
|
300 |
|
98
|
301 |
/*
|
|
302 |
* Valid setter
|
|
303 |
* @param aVal value
|
|
304 |
*/
|
|
305 |
void SetValid(TBool aVal);
|
|
306 |
|
|
307 |
/*
|
|
308 |
* Valid getter
|
|
309 |
* @return valid value
|
|
310 |
*/
|
|
311 |
TBool CCaWidgetDescription::IsValid();
|
|
312 |
|
|
313 |
/*
|
|
314 |
* Library name getter
|
|
315 |
* @return libraru name
|
|
316 |
*/
|
|
317 |
TPtrC GetLibraryName() const;
|
|
318 |
|
85
|
319 |
|
|
320 |
/**
|
|
321 |
* C++ default constructor.
|
|
322 |
*/
|
|
323 |
CCaWidgetDescription();
|
|
324 |
|
|
325 |
/**
|
|
326 |
* By default Symbian 2nd phase constructor is private.
|
|
327 |
*/
|
98
|
328 |
void ConstructL();
|
85
|
329 |
void ConstructL( CCaInnerEntry* aEntry );
|
|
330 |
|
|
331 |
// Data
|
|
332 |
|
|
333 |
/*
|
|
334 |
* Content Storage entry id
|
|
335 |
*/
|
|
336 |
TInt iEntryId;
|
98
|
337 |
|
|
338 |
/*
|
|
339 |
* Marks vidget as valid, used to remove widgets
|
|
340 |
*/
|
|
341 |
TBool iValid;
|
85
|
342 |
|
|
343 |
/*
|
|
344 |
* Package UID
|
|
345 |
*/
|
|
346 |
TUint iPackageUid;
|
|
347 |
|
|
348 |
/*
|
|
349 |
* MMC id
|
|
350 |
*/
|
93
|
351 |
RBuf iMmcId;
|
85
|
352 |
|
|
353 |
/*
|
|
354 |
* Widget title. Own
|
|
355 |
*/
|
|
356 |
RBuf iTitle;
|
|
357 |
|
|
358 |
/*
|
|
359 |
* Widget description. Own
|
|
360 |
*/
|
|
361 |
RBuf iDescription;
|
|
362 |
|
|
363 |
/*
|
|
364 |
* Widget uri. Own
|
|
365 |
*/
|
|
366 |
RBuf iUri;
|
99
|
367 |
|
|
368 |
/*
|
|
369 |
* Widget translation file name. Own
|
|
370 |
*/
|
|
371 |
RBuf iTranslationFileName;
|
85
|
372 |
|
|
373 |
/*
|
|
374 |
* Widget icon uri. Own
|
|
375 |
*/
|
|
376 |
RBuf iIconUri;
|
98
|
377 |
|
89
|
378 |
/*
|
98
|
379 |
* Preview name. Own
|
89
|
380 |
*/
|
98
|
381 |
RBuf iPreviewImageName;
|
99
|
382 |
|
|
383 |
/*
|
|
384 |
* Widget library. Own
|
|
385 |
*/
|
|
386 |
RBuf iPath;
|
|
387 |
|
85
|
388 |
/*
|
|
389 |
* Widget library. Own
|
|
390 |
*/
|
|
391 |
RBuf iLibrary;
|
|
392 |
|
|
393 |
/*
|
|
394 |
* Widgets flags.
|
|
395 |
*/
|
|
396 |
TInt iFlags;
|
93
|
397 |
|
87
|
398 |
/*
|
|
399 |
* Modification time.
|
|
400 |
*/
|
|
401 |
RBuf iModificationTime;
|
93
|
402 |
/*
|
|
403 |
* Service fw xml file
|
|
404 |
*/
|
|
405 |
RBuf iServiceXml;
|
94
|
406 |
/*
|
|
407 |
* Manifest file path name.
|
|
408 |
*/
|
|
409 |
RBuf iManifestFilePathName;
|
96
|
410 |
/*
|
|
411 |
* Strign id of title
|
|
412 |
*/
|
|
413 |
RBuf iStringIdTitle;
|
|
414 |
/*
|
|
415 |
* Strign id of description
|
|
416 |
*/
|
|
417 |
RBuf iStringIdDescription;
|
85
|
418 |
};
|
|
419 |
|
|
420 |
typedef RPointerArray<CCaWidgetDescription> RWidgetArray;
|
|
421 |
|
|
422 |
#endif // C_WIDGETDESCRIPTION_H
|
|
423 |
// End of File
|