85
|
1 |
/*
|
|
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 |
*/
|
|
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 |
/**
|
|
51 |
* Static method to compare two CCaWidgetDescription objects
|
|
52 |
* @param aFirst first item to compare
|
|
53 |
* @param aSecond second item to compare
|
|
54 |
* @return ETrue if iLibrary value is the same in both objects,
|
|
55 |
* otherwise returns EFalse
|
|
56 |
*/
|
|
57 |
static TBool Compare( const CCaWidgetDescription& aFirst,
|
|
58 |
const CCaWidgetDescription& aSecond);
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Method to compare two CCaWidgetDescription objects
|
|
62 |
* @param aToCompare first item to compare
|
|
63 |
* @return ETrue if all value is the same in both objects,
|
|
64 |
* otherwise returns EFalse
|
|
65 |
*/
|
|
66 |
TBool Compare( const CCaWidgetDescription& aToCompare );
|
|
67 |
|
|
68 |
/*
|
|
69 |
* MMC id setter
|
|
70 |
* @param aMmcId MMC id
|
|
71 |
*/
|
93
|
72 |
void SetMmcIdL( const TDesC& aMmcId );
|
85
|
73 |
|
|
74 |
/*
|
|
75 |
* PackageUid setter
|
|
76 |
* @param aPackageUid package UID
|
|
77 |
*/
|
|
78 |
void SetPackageUidL( const TDesC& aPackageUid );
|
|
79 |
|
|
80 |
/*
|
|
81 |
* Title setter
|
|
82 |
* @param aTitle widget title
|
|
83 |
*/
|
|
84 |
void SetTitleL( const TDesC& aTitle );
|
|
85 |
|
|
86 |
/*
|
|
87 |
* Description setter
|
|
88 |
* @param aTitle widget title
|
|
89 |
*/
|
|
90 |
void SetDescriptionL( const TDesC& aDescription );
|
|
91 |
|
|
92 |
/*
|
|
93 |
* Uri setter
|
|
94 |
* @param aUri widget uri
|
|
95 |
*/
|
|
96 |
void SetUriL( const TDesC& aUri );
|
|
97 |
|
|
98 |
/*
|
|
99 |
* Icon Uri setter
|
|
100 |
* @param aIconUri widget icon uri
|
|
101 |
*/
|
|
102 |
void SetIconUriL( const TDesC& aIconUri );
|
|
103 |
|
|
104 |
/*
|
|
105 |
* Library setter
|
|
106 |
* @param aLibrary widget library
|
|
107 |
*/
|
|
108 |
void SetLibraryL( const TDesC& aLibrary );
|
|
109 |
|
|
110 |
/*
|
89
|
111 |
* Path setter
|
|
112 |
* @param aLibrary widget library
|
|
113 |
*/
|
|
114 |
void SetPathL( const TDesC& aPath );
|
93
|
115 |
|
89
|
116 |
/*
|
|
117 |
* Path getter
|
|
118 |
* @return widget library
|
|
119 |
*/
|
|
120 |
TPtrC GetPath( ) const;
|
93
|
121 |
|
89
|
122 |
/*
|
85
|
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 |
/*
|
87
|
135 |
* Used flag setter
|
|
136 |
* @param aUsed flag
|
|
137 |
*/
|
93
|
138 |
void SetUsed( TBool aUsed );
|
|
139 |
|
87
|
140 |
/*
|
85
|
141 |
* Content arsenal entry id getter
|
|
142 |
* @return CA entry id
|
|
143 |
*/
|
|
144 |
TInt GetEntryId( ) const;
|
|
145 |
|
|
146 |
/*
|
|
147 |
* MMC id getter
|
|
148 |
* @return CA entry id
|
|
149 |
*/
|
93
|
150 |
TPtrC GetMmcId( ) const;
|
94
|
151 |
|
85
|
152 |
/*
|
|
153 |
* Library getter
|
|
154 |
* @return widget library
|
|
155 |
*/
|
|
156 |
TPtrC GetLibrary( ) const;
|
|
157 |
|
|
158 |
/*
|
|
159 |
* Description getter
|
|
160 |
* @return widget Description
|
|
161 |
*/
|
|
162 |
TPtrC GetDescription( ) const;
|
|
163 |
|
|
164 |
/*
|
|
165 |
* Uri getter
|
|
166 |
* @return widget Uri
|
|
167 |
*/
|
|
168 |
TPtrC GetUri( ) const;
|
|
169 |
|
|
170 |
/*
|
|
171 |
* IconUri getter
|
|
172 |
* @return widget IconUri
|
|
173 |
*/
|
|
174 |
TPtrC GetIconUri( ) const;
|
|
175 |
|
|
176 |
/*
|
|
177 |
* Title getter
|
|
178 |
* @return widget IconUri
|
|
179 |
*/
|
|
180 |
TPtrC GetTitle( ) const;
|
|
181 |
|
|
182 |
/*
|
|
183 |
* Missing flag
|
|
184 |
* @return ETrue if flag missing is set
|
|
185 |
*/
|
|
186 |
TBool IsMissing( ) const;
|
|
187 |
|
|
188 |
/*
|
87
|
189 |
* Used flag
|
|
190 |
* @return ETrue if flag used is set
|
|
191 |
*/
|
93
|
192 |
TBool IsUsed( ) const;
|
87
|
193 |
|
93
|
194 |
|
|
195 |
/*
|
|
196 |
* Used flag
|
|
197 |
* @return ETrue if flag visible is set
|
|
198 |
*/
|
|
199 |
TBool IsVisible( ) const;
|
|
200 |
|
87
|
201 |
/*
|
85
|
202 |
* Entry getter
|
|
203 |
* @return entry representing widget
|
|
204 |
*/
|
|
205 |
CCaInnerEntry* GetEntryLC( ) const;
|
93
|
206 |
|
87
|
207 |
/*
|
|
208 |
* Modification time setter
|
|
209 |
* @param aModificationTime
|
|
210 |
*/
|
|
211 |
void SetModificationTimeL( const TDesC& aModificationTime );
|
|
212 |
|
|
213 |
/*
|
|
214 |
* Modification time getter
|
|
215 |
* @return widget Modification time
|
|
216 |
*/
|
93
|
217 |
TPtrC GetModificationTime() const;
|
|
218 |
|
|
219 |
/*
|
|
220 |
* Remove MMC id.
|
|
221 |
*/
|
|
222 |
void RemoveMmcId();
|
|
223 |
/*
|
|
224 |
* Set service fw xml filename
|
|
225 |
* @param aServiceXml Service xml filename
|
|
226 |
*/
|
|
227 |
void SetServiceXmlL(const TDesC& aServiceXml);
|
|
228 |
/*
|
|
229 |
* Get service fw xml filename
|
|
230 |
* @return Service xml filename
|
|
231 |
*/
|
|
232 |
TPtrC GetServiceXml() const;
|
94
|
233 |
|
|
234 |
/*
|
|
235 |
* Set manifest file path name.
|
|
236 |
* @param aServiceXml Manifest file path name.
|
|
237 |
*/
|
|
238 |
void SetManifestFilePathNameL(const TDesC& aManifestFilePathName);
|
|
239 |
|
|
240 |
/*
|
|
241 |
* Get manifest file path name.
|
|
242 |
* @return Manifest file path name.
|
|
243 |
*/
|
|
244 |
TPtrC GetManifestFilePathName() const;
|
85
|
245 |
private:
|
|
246 |
|
|
247 |
/*
|
|
248 |
* Library name getter
|
|
249 |
* @return libraru name
|
|
250 |
*/
|
|
251 |
TPtrC GetLibraryName( ) const;
|
|
252 |
|
|
253 |
/*
|
|
254 |
* Flag setter
|
|
255 |
* @param aFlag flag
|
|
256 |
* @param aValue flag value
|
|
257 |
*/
|
|
258 |
void SetFlag( TInt aFlag, TBool aValue );
|
|
259 |
|
|
260 |
private:
|
|
261 |
|
|
262 |
/**
|
|
263 |
* C++ default constructor.
|
|
264 |
*/
|
|
265 |
CCaWidgetDescription();
|
|
266 |
|
|
267 |
/**
|
|
268 |
* By default Symbian 2nd phase constructor is private.
|
|
269 |
*/
|
|
270 |
void ConstructL( );
|
|
271 |
void ConstructL( CCaInnerEntry* aEntry );
|
|
272 |
|
|
273 |
|
|
274 |
private:
|
|
275 |
// Data
|
|
276 |
|
|
277 |
/*
|
|
278 |
* Content Storage entry id
|
|
279 |
*/
|
|
280 |
TInt iEntryId;
|
|
281 |
|
|
282 |
/*
|
|
283 |
* Package UID
|
|
284 |
*/
|
|
285 |
TUint iPackageUid;
|
|
286 |
|
|
287 |
/*
|
|
288 |
* MMC id
|
|
289 |
*/
|
93
|
290 |
RBuf iMmcId;
|
85
|
291 |
|
|
292 |
/*
|
|
293 |
* Widget title. Own
|
|
294 |
*/
|
|
295 |
RBuf iTitle;
|
|
296 |
|
|
297 |
/*
|
|
298 |
* Widget description. Own
|
|
299 |
*/
|
|
300 |
RBuf iDescription;
|
|
301 |
|
|
302 |
/*
|
|
303 |
* Widget uri. Own
|
|
304 |
*/
|
|
305 |
RBuf iUri;
|
|
306 |
|
|
307 |
/*
|
|
308 |
* Widget icon uri. Own
|
|
309 |
*/
|
|
310 |
RBuf iIconUri;
|
|
311 |
|
89
|
312 |
/*
|
|
313 |
* Widget library. Own
|
|
314 |
*/
|
|
315 |
RBuf iPath;
|
93
|
316 |
|
85
|
317 |
/*
|
|
318 |
* Widget library. Own
|
|
319 |
*/
|
|
320 |
RBuf iLibrary;
|
|
321 |
|
|
322 |
/*
|
|
323 |
* Widgets flags.
|
|
324 |
*/
|
|
325 |
TInt iFlags;
|
93
|
326 |
|
87
|
327 |
/*
|
|
328 |
* Modification time.
|
|
329 |
*/
|
|
330 |
RBuf iModificationTime;
|
93
|
331 |
/*
|
|
332 |
* Service fw xml file
|
|
333 |
*/
|
|
334 |
RBuf iServiceXml;
|
94
|
335 |
/*
|
|
336 |
* Manifest file path name.
|
|
337 |
*/
|
|
338 |
RBuf iManifestFilePathName;
|
85
|
339 |
};
|
|
340 |
|
|
341 |
typedef RPointerArray<CCaWidgetDescription> RWidgetArray;
|
|
342 |
|
|
343 |
#endif // C_WIDGETDESCRIPTION_H
|
|
344 |
// End of File
|