|
1 /* |
|
2 * Copyright (c) 2008-2010 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 the License "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 * Declares entry classes for Software Components Registry interface. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @publishedAll |
|
23 @released |
|
24 */ |
|
25 |
|
26 #ifndef SCRENTRIES_H |
|
27 #define SCRENTRIES_H |
|
28 |
|
29 #include <e32base.h> |
|
30 #include <s32strm.h> |
|
31 #include <f32file.h> |
|
32 #include <usif/usifcommon.h> |
|
33 |
|
34 namespace Usif |
|
35 { |
|
36 // CONSTANTS |
|
37 |
|
38 /** |
|
39 KUnspecifiedLocale means that the locale is not specified and locale resolving will be done by SCR. |
|
40 First, the current locale with its downgraded languages (@see BaflUtils::GetDowngradePathL) is tried |
|
41 by SCR. If no value is found, then non-localized values are searched for. |
|
42 */ |
|
43 static const TLanguage KUnspecifiedLocale = TLanguage(-1); |
|
44 |
|
45 /** |
|
46 KNonLocalized means that only non-localized values are looked up by SCR. |
|
47 */ |
|
48 static const TLanguage KNonLocalized = TLanguage(0); |
|
49 |
|
50 // CLASSES |
|
51 |
|
52 |
|
53 NONSHARABLE_CLASS(CGlobalComponentId) : public CBase |
|
54 /** |
|
55 Encapsulates the global software component identifier which is a named, component level and nullable string. |
|
56 that an installer may use to specify a deterministic identifier for the component that is unique within |
|
57 the context of that software type. This global component id would be the package UID for native applications |
|
58 or the midlet-names for Java etc |
|
59 |
|
60 The global component id is consistent and equal on all devices. It is used to state dependencies |
|
61 and to check for the presence of installed software components of arbitrary types without each installer having |
|
62 to be aware of every other installers naming scheme. |
|
63 */ |
|
64 { |
|
65 public: |
|
66 /** |
|
67 Creates an empty global software component ID object. |
|
68 @return A pointer to the newly allocated global software component ID object, if creation is successful. |
|
69 The pointer is also put onto the cleanup stack. |
|
70 */ |
|
71 IMPORT_C static CGlobalComponentId* NewLC(); |
|
72 |
|
73 /** |
|
74 Creates a global software component ID object. |
|
75 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
|
76 @param aUniqueSwTypeName Non-localized unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
|
77 @return A pointer to the newly allocated global software component ID object, if creation is successful. |
|
78 */ |
|
79 IMPORT_C static CGlobalComponentId* NewL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName); |
|
80 |
|
81 /** |
|
82 Creates a global software component ID object. |
|
83 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
|
84 @param aUniqueSwTypeName Non-localized unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
|
85 @return A pointer to the newly allocated global software component ID object, if creation is successful. |
|
86 The pointer is also put onto the cleanup stack. |
|
87 */ |
|
88 IMPORT_C static CGlobalComponentId* NewLC(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName); |
|
89 |
|
90 /** |
|
91 Creates a global software component ID object from a stream. |
|
92 @param aStream The stream to read the software component entry object from |
|
93 @return A pointer to the newly allocated global software component ID object, if creation is successful. |
|
94 @internalComponent |
|
95 */ |
|
96 IMPORT_C static CGlobalComponentId* NewL(RReadStream& aStream); |
|
97 |
|
98 /** |
|
99 Externalises this CGlobalComponentId object to a write stream. |
|
100 @param aStream The stream to which the object is externalised. |
|
101 @internalComponent |
|
102 */ |
|
103 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
104 |
|
105 /** |
|
106 Internalises this CGlobalComponentId object from a read stream. |
|
107 @param aStream The stream from which the object is internalised. |
|
108 @internalComponent |
|
109 */ |
|
110 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
111 |
|
112 /** @return The global id name part (@see CGlobalComponentId::NewLC) of the global component id.*/ |
|
113 IMPORT_C const TDesC& GlobalIdName() const; |
|
114 |
|
115 /** @return The software type name part (@see CGlobalComponentId::NewLC) of the global component id. */ |
|
116 IMPORT_C const TDesC& SoftwareTypeName() const; |
|
117 |
|
118 IMPORT_C ~CGlobalComponentId(); |
|
119 |
|
120 private: |
|
121 CGlobalComponentId(); |
|
122 void ConstructL(const TDesC& aGlobalIdName, const TDesC& aSoftwareTypeName); |
|
123 |
|
124 private: |
|
125 HBufC* iGlobalIdName; ///< The global id name part of the global component id. |
|
126 HBufC* iSoftwareTypeName; ///< The software type name part of the global component id. |
|
127 }; |
|
128 |
|
129 |
|
130 NONSHARABLE_CLASS(CVersionedComponentId) : public CBase |
|
131 /** |
|
132 Class that represents a continuous set of versions for a particular component. |
|
133 |
|
134 This class is used for specifying dependencies, where a dependant component requires |
|
135 specific version(s) of the supplier to be present on the system. The version information |
|
136 is optional, i.e. this class can be used to represent any version of a component. |
|
137 |
|
138 If this class is used to represent a dependant component, it specifies the range of versions |
|
139 of the dependency relationship defined by the dependant component. |
|
140 */ |
|
141 { |
|
142 public: |
|
143 |
|
144 /** |
|
145 Creates an empty version component identifier object. |
|
146 @return A pointer to the newly allocated version component identifier object, if creation is successful. |
|
147 The pointer is also put onto the cleanup stack. |
|
148 */ |
|
149 IMPORT_C static CVersionedComponentId* NewLC(); |
|
150 |
|
151 /** |
|
152 Creates a versioned component identifier object. |
|
153 |
|
154 N.B. The version parameters are optional and used to set the lower and upper limit of the version range. |
|
155 It is also possible to set only an upper limit or a lower limit or none. If only one version |
|
156 parameter is supplied then a lower limit will be set. In this case, there is no upper limit. |
|
157 If the first version parameter is upplied with KNullDesC, then the second version parameter |
|
158 will be used to set an upper limit. |
|
159 |
|
160 @param aGlobalId The global software component identifier. |
|
161 @param aVersionFrom The first version of the specified version range. |
|
162 @param aVersionTo The last version of the specified version range. |
|
163 |
|
164 @return A pointer to the newly allocated versioned component identifier object, if creation is successful. |
|
165 */ |
|
166 IMPORT_C static CVersionedComponentId* NewL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom=NULL, const TDesC* aVersionTo=NULL); |
|
167 |
|
168 /** |
|
169 Creates a versioned component identifier object. |
|
170 For more information about the version parameters look at @see CVersionedComponentId::NewLC(). |
|
171 |
|
172 @param aGlobalId The global software component identifier. |
|
173 @param aVersionFrom The first version of the specified version range. |
|
174 @param aVersionTo The last version of the specified version range. |
|
175 |
|
176 @return A pointer to the newly allocated versioned component identifier object, if creation is successful. |
|
177 The pointer is also put onto the cleanup stack. |
|
178 */ |
|
179 IMPORT_C static CVersionedComponentId* NewLC(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom=NULL, const TDesC* aVersionTo=NULL); |
|
180 |
|
181 /** |
|
182 Creates a versioned component identifier object from a stream. |
|
183 @param aStream The stream to read the versioned component identifier object from |
|
184 @return A pointer to the newly allocated versioned component identifier object, if creation is successful. |
|
185 @internalComponent |
|
186 */ |
|
187 IMPORT_C static CVersionedComponentId* NewL(RReadStream& aStream); |
|
188 |
|
189 /** |
|
190 Internalises this CVersionedComponentId object from a read stream. |
|
191 @param aStream The stream from which the object is internalised. |
|
192 @internalComponent |
|
193 */ |
|
194 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
195 |
|
196 /** |
|
197 Externalises this CVersionedComponentId object to a write stream. |
|
198 @param aStream The stream to which the object is externalised. |
|
199 @internalComponent |
|
200 */ |
|
201 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
202 |
|
203 /** @return The global id of the versioned component. */ |
|
204 IMPORT_C const CGlobalComponentId& GlobalId() const; |
|
205 |
|
206 /** @return The first version of the specified version range. NULL, if there is no lower limit for the version range. */ |
|
207 IMPORT_C const TDesC* VersionFrom() const; |
|
208 |
|
209 /** @return The last version of the specified version range. NULL, if there is no upper limit for the version range. */ |
|
210 IMPORT_C const TDesC* VersionTo() const; |
|
211 |
|
212 IMPORT_C ~CVersionedComponentId(); |
|
213 |
|
214 private: |
|
215 CVersionedComponentId(); |
|
216 void ConstructL(const CGlobalComponentId& aGlobalId, const TDesC* aVersionFrom, const TDesC* aVersionTo); |
|
217 |
|
218 private: |
|
219 CGlobalComponentId* iGlobalId; ///< The global id of the versioned component identifier. |
|
220 HBufC* iVersionFrom; ///< The first version of the specified version range. |
|
221 HBufC* iVersionTo; ///< The last version of the specified version range. |
|
222 }; |
|
223 |
|
224 |
|
225 class CComponentEntry : public CBase |
|
226 /** |
|
227 Class that represents a software component entry stored in the SCR. |
|
228 */ |
|
229 { |
|
230 friend class CScrRequestImpl; |
|
231 public: |
|
232 /** |
|
233 Creates an empty software component entry object. |
|
234 @return A pointer to the newly allocated software component object, if creation is successful. |
|
235 */ |
|
236 IMPORT_C static CComponentEntry* NewL(); |
|
237 |
|
238 /** |
|
239 Creates an empty software component entry object. |
|
240 @return A pointer to the newly allocated software component object, if creation is successful. |
|
241 The pointer is also put onto the cleanup stack. |
|
242 */ |
|
243 IMPORT_C static CComponentEntry* NewLC(); |
|
244 |
|
245 /** |
|
246 Creates a software component entry object from a stream. |
|
247 @param aStream The stream to read the software component entry object from |
|
248 @return A pointer to the newly allocated software component entry object, if creation is successful. |
|
249 @internalComponent |
|
250 */ |
|
251 IMPORT_C static CComponentEntry* NewL(RReadStream& aStream); |
|
252 |
|
253 /** |
|
254 Creates a software component entry object. |
|
255 |
|
256 @param aId The unique ID of the software component. |
|
257 @param aName The name of of the software component. |
|
258 @param aVendor The vendor name of the software component. |
|
259 @param aSwType The software type of the component. |
|
260 @param aGlobalId The globally unique identifier of the component. |
|
261 @param aRemovable Whether the component is removable. ETrue means the component is removable. |
|
262 @param aSize The total size of the component at installation time in bytes. |
|
263 @param aScomoState The SCOMO state of the component. |
|
264 @param aInstalledDrives The set of drives that files for the software component were installed to. |
|
265 @param aVersion The version identifier of the software component. |
|
266 @param aInstallTime The formatted install time string. The format is as following: YYYYMMDD:HHMMSS |
|
267 @param aDrmProtected Whether the component is DRM protected. ETrue means the component is DRM protected. |
|
268 @param aHidden Whether the component is displayed in the list of installed components. ETrue means the component is hidden. |
|
269 @param aKnownRevoked Whether the component has been revoked. ETrue means that a revocation check was |
|
270 performed during or after the installation and the component was found to be revoked. |
|
271 @param aOriginVerified Whether the installer has verified the originator of the component. ETrue means the installer |
|
272 has verified the originator of the software component by using appropriate checking mechanisms. |
|
273 @return A pointer to the newly allocated software component object, if creation is successful. |
|
274 @internalComponent |
|
275 */ |
|
276 IMPORT_C static CComponentEntry* NewL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, |
|
277 const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, |
|
278 const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime, |
|
279 TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified); |
|
280 |
|
281 /** |
|
282 Creates a software component entry object. |
|
283 |
|
284 @param aId The unique ID of the software component. |
|
285 @param aName The name of of the software component. |
|
286 @param aVendor The vendor name of the software component. |
|
287 @param aSwType The software type of the component. |
|
288 @param aGlobalId The globally unique identifier of the component. |
|
289 @param aRemovable Whether the component is removable. ETrue means the component is removable. |
|
290 @param aSize The total size of the component at installation time in bytes. |
|
291 @param aScomoState The SCOMO state of the component. |
|
292 @param aInstalledDrives The set of drives that files for the software component were installed to. |
|
293 @param aVersion The version identifier of the software component. |
|
294 @param aInstallTime The formatted install time string. The format is as following: YYYYMMDD:HHMMSS |
|
295 @param aDrmProtected Whether the component is DRM protected. ETrue means the component is DRM protected. |
|
296 @param aHidden Whether the component is displayed in the list of installed components. ETrue means the component is hidden. |
|
297 @param aKnownRevoked Whether the component has been revoked. ETrue means that a revocation check was |
|
298 performed during or after the installation and the component was found to be revoked. |
|
299 @param aOriginVerified Whether the installer has verified the originator of the component. ETrue means the installer |
|
300 has verified the originator of the software component by using appropriate checking mechanisms. |
|
301 @return A pointer to the newly allocated software component object, if creation is successful. |
|
302 The pointer is also put onto the cleanup stack. |
|
303 @internalComponent |
|
304 */ |
|
305 IMPORT_C static CComponentEntry* NewLC(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, |
|
306 const TDesC& aGlobalId, TBool aRemovable, TInt64 aSize, const TScomoState& aScomoState, |
|
307 const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime, |
|
308 TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified); |
|
309 |
|
310 IMPORT_C ~CComponentEntry(); |
|
311 |
|
312 /** |
|
313 Externalises this CComponentEntry object to a write stream. |
|
314 @param aStream The stream to which the object is externalised. |
|
315 @internalComponent |
|
316 */ |
|
317 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
318 |
|
319 /** |
|
320 Internalises this CComponentEntry object from a read stream. |
|
321 @param aStream The stream from which the object is internalised. |
|
322 @internalComponent |
|
323 */ |
|
324 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
325 |
|
326 /** @return The unique ID of the software component. */ |
|
327 IMPORT_C const TComponentId& ComponentId() const; |
|
328 |
|
329 /** @return The name of the software component. */ |
|
330 IMPORT_C const TDesC& Name() const; |
|
331 |
|
332 /** @return The vendor name of the software component. */ |
|
333 IMPORT_C const TDesC& Vendor() const; |
|
334 |
|
335 /** @return The software type name of the software component, e.g @see Usif::KSoftwareTypeNative. */ |
|
336 IMPORT_C const TDesC& SoftwareType() const; |
|
337 |
|
338 /** @return Globally unique component identifier. */ |
|
339 IMPORT_C const TDesC& GlobalId() const; |
|
340 |
|
341 /** @return Whether the software component is removable. ETrue means it is removable. */ |
|
342 IMPORT_C TBool IsRemovable() const; |
|
343 |
|
344 /** @return The total size of the component at installation time in bytes. */ |
|
345 IMPORT_C TInt64 ComponentSize() const; |
|
346 |
|
347 /** @return The SCOMO state of the software component. @see Usif::TScomoState */ |
|
348 IMPORT_C const TScomoState& ScomoState() const; |
|
349 |
|
350 /** @return The set of drives that files for the software component were installed to. */ |
|
351 IMPORT_C const TDriveList& InstalledDrives() const; |
|
352 |
|
353 /** @return The version identifier of the software component. */ |
|
354 IMPORT_C const TDesC& Version() const; |
|
355 |
|
356 /** @return The install time of the component. */ |
|
357 IMPORT_C TTime InstallTimeL() const; |
|
358 |
|
359 /** @return Whether the component is DRM protected. ETrue means the component is DRM protected.*/ |
|
360 IMPORT_C TBool IsDrmProtected() const; |
|
361 |
|
362 /** @return Whether the component is hidden in the list of installed components. ETrue means the component is hidden. */ |
|
363 IMPORT_C TBool IsHidden() const; |
|
364 |
|
365 /** @return Whether the component has been revoked. ETrue means that a revocation check was performed |
|
366 during or after the installation and the component was found to be revoked. |
|
367 */ |
|
368 IMPORT_C TBool IsKnownRevoked() const; |
|
369 |
|
370 /** @return Whether the installer has verified the originator of the component. ETrue means the installer |
|
371 has verified the originator of the software component by using appropriate checking mechanisms. |
|
372 */ |
|
373 IMPORT_C TBool IsOriginVerified()const; |
|
374 |
|
375 private: |
|
376 CComponentEntry(); |
|
377 void ConstructL(const TComponentId& aId, const TDesC& aName, const TDesC& aVendor, const TDesC& aSwType, const TDesC& aGlobalId, TBool aRemovable, |
|
378 TInt64 aSize, const TScomoState& aScomoState, const TDriveList& aInstalledDrives, const TDesC& aVersion, const TDesC& aInstallTime, |
|
379 TBool aDrmProtected, TBool aHidden, TBool aKnownRevoked, TBool aOriginVerified); |
|
380 private: |
|
381 TComponentId iComponentId; ///< The unique id of the software component. |
|
382 HBufC* iName; ///< Name of the software component. |
|
383 HBufC* iVendor; ///< Vendor of the software component. |
|
384 HBufC* iSwType; ///< Software type name of the component. |
|
385 HBufC* iGlobalId; ///< Globally unique component identifier. |
|
386 TBool iRemovable; ///< Whether the component is removable. |
|
387 TInt64 iSize; ///< The total size of the component at installation time in bytes. |
|
388 TScomoState iScomoState; ///< SCOMO state of the component. |
|
389 TDriveList iInstalledDrives; ///< The set of drives that files for the software component were installed to. |
|
390 HBufC* iVersion; ///< Version identifier of the software component |
|
391 HBufC* iInstallTime; ///< The install time of the component. |
|
392 TBool iDrmProtected; ///< Whether the component is DRM protected. |
|
393 TBool iHidden; ///< Whether the component is hidden in the list of installed components. |
|
394 TBool iKnownRevoked; ///< Whether the component has been revoked. |
|
395 TBool iOriginVerified; ///< Whether the installer has verified the originator of the component. |
|
396 }; |
|
397 |
|
398 class CPropertyEntry : public CBase |
|
399 /** |
|
400 Abstract base class for a software component property entry. |
|
401 Specifies the type of a software component property. Before getting a property value, |
|
402 the base property object must be converted to a derived property object (e.g. CIntPropertyEntry). |
|
403 */ |
|
404 { |
|
405 public: |
|
406 /** |
|
407 Enumeration to indicate the type of the property. |
|
408 */ |
|
409 enum TPropertyType |
|
410 { |
|
411 EBinaryProperty = 1, ///< The property value is binary data. See @see CBinaryPropertyEntry. |
|
412 EIntProperty, ///< The property value is integer. See @see CIntPropertyEntry. |
|
413 ELocalizedProperty, ///< The property is a localizable string. See @see CLocalizablePropertyEntry. |
|
414 }; |
|
415 |
|
416 public: |
|
417 /** |
|
418 Creates a base software component property object from a stream. |
|
419 @param aStream The stream to read the software property object from. |
|
420 @return A pointer to the newly allocated software property object, if creation is successful. |
|
421 @internalComponent |
|
422 */ |
|
423 IMPORT_C static CPropertyEntry* NewL(RReadStream& aStream); |
|
424 |
|
425 /** @return The name of the property. */ |
|
426 IMPORT_C const TDesC& PropertyName() const; |
|
427 |
|
428 /** Virtual destructor for the component property object*/ |
|
429 IMPORT_C virtual ~CPropertyEntry(); |
|
430 |
|
431 /** |
|
432 Externalises a base/derived property object to a write stream. |
|
433 @param aStream The stream to which the object is externalised. |
|
434 @internalComponent |
|
435 */ |
|
436 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
437 |
|
438 /** @return The type of the property object. Implemented by derived classes. */ |
|
439 virtual CPropertyEntry::TPropertyType PropertyType() const = 0; |
|
440 |
|
441 protected: |
|
442 CPropertyEntry(); |
|
443 void ConstructL(const TDesC& aPropertyName); |
|
444 |
|
445 private: |
|
446 virtual void DoExternalizeL(RWriteStream &aStream) const = 0; |
|
447 virtual void DoInternalizeL(RReadStream& aStream) = 0; |
|
448 |
|
449 private: |
|
450 HBufC* iPropertyName; ///< The name of the property entry. |
|
451 }; |
|
452 |
|
453 class CIntPropertyEntry : public CPropertyEntry |
|
454 /** |
|
455 Class that represents an integer component property. |
|
456 */ |
|
457 { |
|
458 public: |
|
459 /** |
|
460 Creates an integer component property object. |
|
461 |
|
462 @param aPropertyName The name of the property. |
|
463 @param aPropertyValue The value of the property. |
|
464 @return A pointer to the newly allocated component property object, if creation is successful. |
|
465 */ |
|
466 IMPORT_C static CIntPropertyEntry* NewL(const TDesC& aPropertyName, TInt64 aPropertyValue); |
|
467 |
|
468 /** |
|
469 Creates an integer component property object. |
|
470 |
|
471 @param aPropertyName The name of the property. |
|
472 @param aPropertyValue The value of the property. |
|
473 @return A pointer to the newly allocated component property object, if creation is successful. |
|
474 The pointer is also put onto the cleanup stack. |
|
475 */ |
|
476 IMPORT_C static CIntPropertyEntry* NewLC(const TDesC& aPropertyName, TInt64 aPropertyValue); |
|
477 |
|
478 IMPORT_C ~CIntPropertyEntry(); |
|
479 |
|
480 /** |
|
481 The implementation of pure virtual function from @see Usif::CPropertyEntry. |
|
482 @return The type of the property object. |
|
483 */ |
|
484 IMPORT_C CPropertyEntry::TPropertyType PropertyType() const; |
|
485 |
|
486 /** @return The 32-bit integer value. */ |
|
487 IMPORT_C TInt IntValue(); |
|
488 |
|
489 /** @return The 64-bit integer value. */ |
|
490 IMPORT_C TInt64 Int64Value(); |
|
491 |
|
492 private: |
|
493 void DoExternalizeL(RWriteStream& aStream) const; |
|
494 void DoInternalizeL(RReadStream& aStream); |
|
495 |
|
496 CIntPropertyEntry(); |
|
497 CIntPropertyEntry(TInt64 aPropertyIntValue); |
|
498 void ConstructL(const TDesC& aPropertyName); |
|
499 static CIntPropertyEntry* NewLC(); |
|
500 friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream); |
|
501 |
|
502 private: |
|
503 TInt64 iIntValue; ///< The integer property value. |
|
504 }; |
|
505 |
|
506 class CBinaryPropertyEntry : public CPropertyEntry |
|
507 /** |
|
508 Class that represents a binary non-localizable 8-bit descriptor component property. |
|
509 */ |
|
510 { |
|
511 public: |
|
512 /** |
|
513 Creates a binary component property object. |
|
514 |
|
515 @param aPropertyName The name of the property. |
|
516 @param aPropertyValue The value of the property. |
|
517 @return A pointer to the newly allocated component property object, if creation is successful. |
|
518 */ |
|
519 IMPORT_C static CBinaryPropertyEntry* NewL(const TDesC& aPropertyName, const TDesC8& aPropertyValue); |
|
520 |
|
521 /** |
|
522 Creates a binary component property object. |
|
523 |
|
524 @param aPropertyName The name of the property. |
|
525 @param aPropertyValue The value of the property. |
|
526 @return A pointer to the newly allocated component property object, if creation is successful. |
|
527 The pointer is also put onto the cleanup stack. |
|
528 */ |
|
529 IMPORT_C static CBinaryPropertyEntry* NewLC(const TDesC& aPropertyName, const TDesC8& aPropertyValue); |
|
530 |
|
531 IMPORT_C ~CBinaryPropertyEntry(); |
|
532 |
|
533 /** |
|
534 The implementation of pure virtual function from @see Usif::CPropertyEntry. |
|
535 @return The type of the property object. |
|
536 */ |
|
537 IMPORT_C TPropertyType PropertyType() const; |
|
538 |
|
539 /** @return The binary property value. */ |
|
540 IMPORT_C const TDesC8& BinaryValue(); |
|
541 |
|
542 private: |
|
543 CBinaryPropertyEntry(); |
|
544 void ConstructL(const TDesC& aPropertyName, const TDesC8& aPropertyValue); |
|
545 void DoExternalizeL(RWriteStream& aStream) const; |
|
546 void DoInternalizeL(RReadStream& aStream); |
|
547 |
|
548 static CBinaryPropertyEntry* NewLC(); |
|
549 friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream); |
|
550 |
|
551 private: |
|
552 HBufC8* iValue; ///< The value of the binary property. |
|
553 }; |
|
554 |
|
555 NONSHARABLE_CLASS(CLocalizablePropertyEntry) : public CPropertyEntry |
|
556 /** |
|
557 Class that represents a localizable string component property. |
|
558 |
|
559 A localized component property is a string property which can have different values |
|
560 for different locales. A particular instance of a localized component property includes |
|
561 both the localized string value and the locale in question. |
|
562 */ |
|
563 { |
|
564 public: |
|
565 /** |
|
566 Creates a localizable component property object. |
|
567 |
|
568 @param aPropertyName The name of the property. |
|
569 @param aPropertyValue The value of the property. |
|
570 @param aLocale The locale of the property. |
|
571 @return A pointer to the newly allocated component property object, if creation is successful. |
|
572 */ |
|
573 IMPORT_C static CLocalizablePropertyEntry* NewL(const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale); |
|
574 |
|
575 /** |
|
576 Creates a localizable component property object. |
|
577 |
|
578 @param aPropertyName The name of the property. |
|
579 @param aPropertyValue The value of the property. |
|
580 @param aLocale The locale of the property. |
|
581 @return A pointer to the newly allocated component property object, if creation is successful. |
|
582 The pointer is also put onto the cleanup stack. |
|
583 */ |
|
584 IMPORT_C static CLocalizablePropertyEntry* NewLC( const TDesC& aPropertyName, const TDesC& aPropertyValue, TLanguage aLocale); |
|
585 |
|
586 IMPORT_C ~CLocalizablePropertyEntry(); |
|
587 |
|
588 /** The locale of the localizable property object. */ |
|
589 IMPORT_C TLanguage LocaleL() const; |
|
590 |
|
591 /** |
|
592 The implementation of pure virtual function from @see Usif::CPropertyEntry. |
|
593 @return The type of the property object. |
|
594 */ |
|
595 IMPORT_C TPropertyType PropertyType() const; |
|
596 |
|
597 /** @return The string property value. */ |
|
598 IMPORT_C const TDesC& StrValue() const; |
|
599 |
|
600 private: |
|
601 CLocalizablePropertyEntry(); |
|
602 CLocalizablePropertyEntry(TLanguage aLocale); |
|
603 void DoExternalizeL(RWriteStream &aStream) const; |
|
604 void DoInternalizeL(RReadStream& aStream); |
|
605 static CLocalizablePropertyEntry* NewLC(); |
|
606 friend CPropertyEntry* CPropertyEntry::NewL(RReadStream& aStream); |
|
607 void ConstructL(const TDesC& aPropertyName, const TDesC& aPropertyValue); |
|
608 |
|
609 private: |
|
610 TLanguage iLocale; ///< The language code of the locale. |
|
611 HBufC* iStrValue; ///< The string value of the property |
|
612 }; |
|
613 |
|
614 NONSHARABLE_CLASS(CComponentFilter) : public CBase |
|
615 /** |
|
616 A filter class which is used to filter the software components stored in the SCR. |
|
617 An empty filter object is first created and then required filter keys are set separately. |
|
618 */ |
|
619 { |
|
620 friend class CScrRequestImpl; |
|
621 public: |
|
622 |
|
623 enum TDbOperator |
|
624 { |
|
625 EEqual = 1, |
|
626 ELike |
|
627 }; |
|
628 |
|
629 /** |
|
630 Creates an empty component filter object. |
|
631 @return A pointer to the newly allocated component filter object, if creation is successful. |
|
632 */ |
|
633 IMPORT_C static CComponentFilter* NewL(); |
|
634 |
|
635 /** |
|
636 Creates an empty component filter object. |
|
637 @return A pointer to the newly allocated component filter object, if creation is successful. |
|
638 The pointer is also put onto the cleanup stack. |
|
639 */ |
|
640 IMPORT_C static CComponentFilter* NewLC(); |
|
641 |
|
642 /** |
|
643 Creates a component filter object from a stream. |
|
644 @param aStream The stream to read the component filter object from |
|
645 @return A pointer to the newly allocated component filter object, if creation is successful. |
|
646 @internalComponent |
|
647 */ |
|
648 IMPORT_C static CComponentFilter* NewL(RReadStream& aStream); |
|
649 |
|
650 ~CComponentFilter(); |
|
651 |
|
652 /** |
|
653 Restricts the returned component names in the filter. |
|
654 Please note that wildcards are not supported and matching is case-sensitive. |
|
655 @param aName The name of the software component. |
|
656 */ |
|
657 IMPORT_C void SetNameL(const TDesC& aName); |
|
658 |
|
659 /** |
|
660 Restricts the returned component vendor names in the filter. |
|
661 Please note that wildcards are not supported and matching is case-sensitive. |
|
662 @param aVendor The vendor name of the software component. |
|
663 */ |
|
664 IMPORT_C void SetVendorL(const TDesC& aVendor); |
|
665 |
|
666 /** |
|
667 Restricts the returned component software types in the filter. |
|
668 @param aSwType The software type name of the software component (e.g. @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava). |
|
669 */ |
|
670 IMPORT_C void SetSoftwareTypeL(const TDesC& aSwType); |
|
671 |
|
672 /** |
|
673 Sets whether the software component which is being searched for is removable. |
|
674 @param aValue ETrue, if the software component is removable. Otherwise, EFalse. |
|
675 */ |
|
676 IMPORT_C void SetRemovable(TBool aValue); |
|
677 |
|
678 /** |
|
679 Sets whether the software component which is being searched for is DRM protected. |
|
680 @param aValue ETrue, if the software component is DRM protected. Otherwise, EFalse. |
|
681 */ |
|
682 IMPORT_C void SetDrmProtected(TBool aValue); |
|
683 |
|
684 /** |
|
685 Sets whether the software component which is being searched for is hidden. |
|
686 @param aValue ETrue, if the software component is hidden. Otherwise, EFalse. |
|
687 */ |
|
688 IMPORT_C void SetHidden(TBool aValue); |
|
689 |
|
690 /** |
|
691 Sets whether the software component which is being searched for is known-revoked. |
|
692 @param aValue ETrue, if the software component is known-revoked. Otherwise, EFalse. |
|
693 */ |
|
694 IMPORT_C void SetKnownRevoked(TBool aValue); |
|
695 |
|
696 /** |
|
697 Sets whether the software component which is being searched for is origin-verified. |
|
698 @param aValue ETrue, if the software component is origin-verified. Otherwise, EFalse. |
|
699 */ |
|
700 IMPORT_C void SetOriginVerified(TBool aValue); |
|
701 |
|
702 /** |
|
703 Restricts the returned component SCOMO states in the filter. |
|
704 See @see Usif::TScomoState for the list of SCOMO states. |
|
705 @param aScomoState The SCOMO state of the software component. |
|
706 */ |
|
707 IMPORT_C void SetScomoStateL(TScomoState aScomoState); |
|
708 |
|
709 /** |
|
710 Sets the set of drives that files of the software components were installed to. |
|
711 If more than one drive is supplied, all software components which files were installed to |
|
712 any of these drives are returned. |
|
713 */ |
|
714 IMPORT_C void SetInstalledDrivesL(const TDriveList& aDrives); |
|
715 |
|
716 /** |
|
717 Adds a localizable property to the filter. Only the software components having |
|
718 this property with the specified value are returned by the filter. It is possible to |
|
719 add more than one property. In this case, the software components possessing all provided |
|
720 properties with the specified values are returned by the filter. |
|
721 |
|
722 For more information about searching for current locale variant of properties look at |
|
723 @see RSoftwareComponentRegistry::GetComponentPropertyL. |
|
724 |
|
725 If the locale is provided, the component will be returned only if the property exists |
|
726 for the specified locale. If the locale is not provided, or is equal to KUnspecifiedLocale, |
|
727 then all software components which have the property with the specified value for any locale will |
|
728 match this condition. |
|
729 |
|
730 @param aName The name of the property. Please note that matching is case-insensitive. |
|
731 @param aValue The value of the property. |
|
732 @param aLocale Optional. The language code of the property value. |
|
733 @param aNameOperator The comparison operator (TDbOperator type) to be associated with the name. |
|
734 @param aValueOperator The comparison operator (TDbOperator type) to be associated with the value. |
|
735 |
|
736 */ |
|
737 IMPORT_C void AddPropertyL(const TDesC& aName, const TDesC& aValue, TLanguage aLocale=KUnspecifiedLocale, |
|
738 TDbOperator aNameOperator = EEqual, TDbOperator aValueOperator = EEqual); |
|
739 |
|
740 /** |
|
741 Adds an integer property to the filter. The software components having this |
|
742 property with the specified value are enumerated. It is possible to add more than one property. |
|
743 In this case, the software components possessing all provided properties with the specified |
|
744 values are enumerated. |
|
745 |
|
746 @param aName The name of the property. Please note that matching is case-insensitive. |
|
747 @param aValue The value of the property. |
|
748 @param aNameOperator The comparison operator (TDbOperator type) to be associated with the name. |
|
749 @param aValueOperator The comparison operator (TDbOperator type) to be associated with the value. |
|
750 |
|
751 */ |
|
752 IMPORT_C void AddPropertyL(const TDesC& aName, TInt64 aValue, TDbOperator aNameOperator = EEqual, |
|
753 TDbOperator aValueOperator = EEqual); |
|
754 |
|
755 /** |
|
756 Adds a binary 8-bit descriptor property to the filter. The software components having this |
|
757 property with the specified value are enumerated. It is possible to add more than one property. |
|
758 In this case, the software components possessing all provided properties with the specified |
|
759 values are enumerated. |
|
760 |
|
761 @param aName The name of the property. Please note that matching is case-insensitive. |
|
762 @param aValue The value of the property. |
|
763 @param aNameOperator The comparison operator (TDbOperator type) to be associated with the name. |
|
764 @param aValueOperator The comparison operator (TDbOperator type) to be associated with the value. |
|
765 |
|
766 */ |
|
767 IMPORT_C void AddPropertyL(const TDesC& aName, const TDesC8& aValue, TDbOperator aNameOperator = EEqual, |
|
768 TDbOperator aValueOperator = EEqual); |
|
769 |
|
770 /** |
|
771 Sets a file name to filter the software components having registered this file. |
|
772 Please note that wildcards are not supported and matching is case-insensitive. |
|
773 |
|
774 N.B. This call can be invoked multiple times for the same filter in order to request components which register a particular set of files. |
|
775 @param aFile The fully qualified file path. |
|
776 */ |
|
777 IMPORT_C void SetFileL(const TDesC& aFile); |
|
778 |
|
779 /** |
|
780 Externalises a component filter object to a write stream. |
|
781 @param aStream The stream to which the object is externalised. |
|
782 @internalComponent |
|
783 */ |
|
784 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
785 |
|
786 private: |
|
787 CComponentFilter(); |
|
788 void ConstructL(); |
|
789 void InternalizeL(RReadStream& aStream); |
|
790 |
|
791 enum TFieldsFlag |
|
792 { |
|
793 EName = 0x0001, |
|
794 EVendor = 0x0002, |
|
795 ESoftwareType = 0x0004, |
|
796 ERemovable = 0x0008, |
|
797 EScomoState = 0x0010, |
|
798 EInstalledDrive = 0x0020, |
|
799 EProperty = 0x0040, |
|
800 EFile = 0x0080, |
|
801 EDrmProtected = 0x0100, |
|
802 EHidden = 0x0200, |
|
803 EKnownRevoked = 0x0400, |
|
804 EOriginVerified = 0x0800 |
|
805 }; |
|
806 |
|
807 class TPropertyOperator |
|
808 { |
|
809 public: |
|
810 IMPORT_C TPropertyOperator(TDbOperator aNameOperator = EEqual, TDbOperator aValueOperator = EEqual); |
|
811 void ExternalizeL(RWriteStream& aStream) const; |
|
812 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
813 IMPORT_C TDbOperator NameOperator() const; |
|
814 IMPORT_C TDbOperator ValueOperator() const; |
|
815 |
|
816 private: |
|
817 TDbOperator iNameOperator; |
|
818 TDbOperator iValueOperator; |
|
819 }; |
|
820 |
|
821 private: |
|
822 TUint16 iSetFlag; ///< Flag variable that shows what fields have been set |
|
823 HBufC* iName; ///< Name for the software component |
|
824 HBufC* iVendor; ///< Vendor for the software component |
|
825 HBufC* iSwType; ///< Software type of the component. |
|
826 TBool iRemovable; ///< Whether the software component is removable |
|
827 TScomoState iScomoState; ///< SCOMO state for the software component |
|
828 TDriveList iInstalledDrives; ///< Installed drives for the software component |
|
829 RPointerArray<CPropertyEntry> iPropertyList; ///< The list of key properties |
|
830 HBufC* iFile; ///< The full name of the file owned by the component |
|
831 TBool iDrmProtected; ///< Whether the component is DRM protected. |
|
832 TBool iHidden; ///< Whether the component is displayed in the list of installed components. |
|
833 TBool iKnownRevoked; ///< Whether the component has been revoked. |
|
834 TBool iOriginVerified; ///< Whether the installer has verified the originator of the component. |
|
835 RArray<TPropertyOperator> iPropertyOperatorList; ///< The list of operators associated with each property. |
|
836 }; |
|
837 |
|
838 |
|
839 class CLocalizableCommonData : public CBase |
|
840 /** |
|
841 Base class which provides common functionality for localized information classes (e.g. CLocalizableComponentInfo). |
|
842 Please note that this class cannot be instantiated. |
|
843 */ |
|
844 { |
|
845 public: |
|
846 ~CLocalizableCommonData(); |
|
847 |
|
848 /** @return The locale of the data. */ |
|
849 IMPORT_C TLanguage Locale() const; |
|
850 |
|
851 protected: |
|
852 CLocalizableCommonData(); |
|
853 CLocalizableCommonData(TLanguage aLocale); |
|
854 |
|
855 void ExternalizeL(RWriteStream& aStream) const; |
|
856 void InternalizeL(RReadStream& aStream); |
|
857 |
|
858 private: |
|
859 TLanguage iLocale; ///< The language code of the locale. |
|
860 }; |
|
861 |
|
862 NONSHARABLE_CLASS(CLocalizableComponentInfo) : public CLocalizableCommonData |
|
863 /** |
|
864 This class contains the localizable information of a software component. |
|
865 Component names and vendor names are localizable names and transferred to the SCR |
|
866 with the objects of this class. |
|
867 */ |
|
868 { |
|
869 public: |
|
870 /** |
|
871 Creates a localizable component information object. |
|
872 @param aName The name of the component. |
|
873 @param aVendor The vendor of the component. |
|
874 @param aLocale The language code of the object's locale. |
|
875 @return A pointer to the newly allocated localizable component info object, if creation is successful. |
|
876 */ |
|
877 IMPORT_C static CLocalizableComponentInfo* NewL(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale); |
|
878 |
|
879 /** |
|
880 Creates a localizable component information object. |
|
881 @param aName The name of the component. |
|
882 @param aVendor The vendor of the component. |
|
883 @param aLocale The language code of the object's locale. |
|
884 @return A pointer to the newly allocated component information object, if creation is successful. |
|
885 The pointer is also put onto the cleanup stack. |
|
886 */ |
|
887 IMPORT_C static CLocalizableComponentInfo* NewLC(const TDesC& aName, const TDesC& aVendor, TLanguage aLocale); |
|
888 |
|
889 /** |
|
890 Creates a localizable component information from a stream. |
|
891 @param aStream The stream to read the component information object from. |
|
892 @return A pointer to the newly allocated component information object, if creation is successful. |
|
893 @internalComponent |
|
894 */ |
|
895 IMPORT_C static CLocalizableComponentInfo* NewL(RReadStream& aStream); |
|
896 |
|
897 ~CLocalizableComponentInfo(); |
|
898 |
|
899 /** |
|
900 Externalises a localizable component information object to a write stream. |
|
901 @param aStream The stream to which the object is externalised. |
|
902 @internalComponent |
|
903 */ |
|
904 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
905 |
|
906 /** @return The localizable name of the component. */ |
|
907 IMPORT_C const TDesC& NameL() const; |
|
908 |
|
909 /** @return The localizable vendor name of the component. */ |
|
910 IMPORT_C const TDesC& VendorL() const; |
|
911 |
|
912 private: |
|
913 CLocalizableComponentInfo(); |
|
914 CLocalizableComponentInfo(TLanguage aLocale); |
|
915 void ConstructL(const TDesC& aName, const TDesC& aVendor); |
|
916 void InternalizeL(RReadStream& aStream); |
|
917 |
|
918 private: |
|
919 HBufC* iName; ///< The localizable component name. |
|
920 HBufC* iVendor; ///< The localizable component vendor name. |
|
921 }; |
|
922 |
|
923 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
924 NONSHARABLE_CLASS(CLocalizedSoftwareTypeName) : public CLocalizableCommonData |
|
925 /** |
|
926 This class contains localized software type names. |
|
927 Software type names are localizable names and transferred to the SCR |
|
928 with the objects of this class. |
|
929 |
|
930 @internalTechnology |
|
931 */ |
|
932 { |
|
933 public: |
|
934 /** |
|
935 Creates a localized software type name object. |
|
936 @param aName The name of the software type. |
|
937 @param aLocale The language code of the object's locale. |
|
938 @return A pointer to the newly allocated localized software type name object, if creation is successful. |
|
939 */ |
|
940 IMPORT_C static CLocalizedSoftwareTypeName* NewL(const TDesC& aName, TLanguage aLocale); |
|
941 |
|
942 /** |
|
943 Creates a localized software type name object. |
|
944 @param aName The name of the software type. |
|
945 @param aLocale The language code of the object's locale. |
|
946 @return A pointer to the newly allocated localized software type name object, if creation is successful. |
|
947 The pointer is also put onto the cleanup stack. |
|
948 */ |
|
949 IMPORT_C static CLocalizedSoftwareTypeName* NewLC(const TDesC& aName, TLanguage aLocale); |
|
950 |
|
951 /** |
|
952 Creates a localized software type name object from a stream. |
|
953 @param aStream The stream to read the localized software type name object from. |
|
954 @return A pointer to the newly allocated localized software type name object, if creation is successful. |
|
955 @internalComponent |
|
956 */ |
|
957 IMPORT_C static CLocalizedSoftwareTypeName* NewL(RReadStream& aStream); |
|
958 |
|
959 ~CLocalizedSoftwareTypeName(); |
|
960 |
|
961 /** |
|
962 Externalises a localized software type name object to a write stream. |
|
963 @param aStream The stream to which the object is externalised. |
|
964 @internalComponent |
|
965 */ |
|
966 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
967 |
|
968 /** @return The localized software type name. */ |
|
969 IMPORT_C const TDesC& NameL() const; |
|
970 |
|
971 private: |
|
972 CLocalizedSoftwareTypeName(); |
|
973 CLocalizedSoftwareTypeName(TLanguage aLocale); |
|
974 void ConstructL(const TDesC& aName); |
|
975 void InternalizeL(RReadStream& aStream); |
|
976 |
|
977 private: |
|
978 HBufC* iName; ///< The localized software type name. |
|
979 }; |
|
980 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
|
981 |
|
982 enum TScrComponentOperationType |
|
983 /** |
|
984 The type of the operation being performed on an SCR component. |
|
985 */ |
|
986 { |
|
987 EScrCompInstall =0, ///< A new SCR component is added. |
|
988 EScrCompUnInstall, ///< A existing SCR component is removed. |
|
989 EScrCompUpgrade, ///< An existing SCR component is updated. |
|
990 EScrCompHidden ///< The component operation is hidden to the user. N.B. SCR doesn't save logs for this type of operation. |
|
991 }; |
|
992 |
|
993 NONSHARABLE_CLASS (CScrLogEntry) : public CBase |
|
994 /** |
|
995 Class that represents a software component log record generated by the SCR. |
|
996 */ |
|
997 { |
|
998 friend class CScrRequestImpl; |
|
999 public: |
|
1000 /** |
|
1001 Creates a log entry object. |
|
1002 @param aComponentName The name of the component. |
|
1003 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
|
1004 @param aGlobalId The global Id of the component. |
|
1005 @param aVersion The version of the component. |
|
1006 @param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType |
|
1007 @return A pointer to the newly allocated log entry object, if creation is successful. |
|
1008 @internalComponent |
|
1009 */ |
|
1010 IMPORT_C static CScrLogEntry* NewL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType); |
|
1011 |
|
1012 /** |
|
1013 Creates a log entry object. |
|
1014 @param aComponentName The name of the component. |
|
1015 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
|
1016 @param aGlobalId The global Id of the component. |
|
1017 @param aVersion The version of the component. |
|
1018 @param aCompOpType The type of the component operation. @see Usif::TScrComponentOperationType |
|
1019 @return A pointer to the newly allocated log entry object, if creation is successful. |
|
1020 The pointer is also put onto the cleanup stack. |
|
1021 @internalComponent |
|
1022 */ |
|
1023 IMPORT_C static CScrLogEntry* NewLC(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType); |
|
1024 |
|
1025 /** |
|
1026 Creates a log entry object from a stream. |
|
1027 @param aStream The stream to read the log entry object from. |
|
1028 @return A pointer to the newly allocated log entry object, if creation is successful. |
|
1029 The pointer is also put onto the cleanup stack. |
|
1030 @internalComponent |
|
1031 */ |
|
1032 IMPORT_C static CScrLogEntry* NewLC(RReadStream& aStream); |
|
1033 |
|
1034 ~CScrLogEntry(); |
|
1035 |
|
1036 /** |
|
1037 Write the object to a stream |
|
1038 |
|
1039 @param aStream The stream to write to |
|
1040 @internalComponent |
|
1041 */ |
|
1042 IMPORT_C void ExternalizeL(RWriteStream& aStream) const; |
|
1043 |
|
1044 /** |
|
1045 Read the object from a stream |
|
1046 |
|
1047 @param aStream The stream to read from. |
|
1048 @internalComponent |
|
1049 */ |
|
1050 IMPORT_C void InternalizeL(RReadStream& aStream) ; |
|
1051 |
|
1052 /** |
|
1053 @return The name of the component for which the log was generated. |
|
1054 */ |
|
1055 IMPORT_C const TDesC& ComponentName() const; |
|
1056 |
|
1057 /** |
|
1058 @return The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava. |
|
1059 */ |
|
1060 IMPORT_C const TDesC& SoftwareTypeName() const; |
|
1061 |
|
1062 /** |
|
1063 The UID. |
|
1064 @return The global ID of the component. |
|
1065 */ |
|
1066 IMPORT_C const TDesC& GlobalId() const; |
|
1067 |
|
1068 /** |
|
1069 @return The version of the component. |
|
1070 */ |
|
1071 IMPORT_C const TDesC& ComponentVersion() const; |
|
1072 |
|
1073 /** |
|
1074 @return The time when the operation occured. |
|
1075 */ |
|
1076 IMPORT_C const TTime OperationTime() const; |
|
1077 |
|
1078 /** |
|
1079 @return The type of the component operation for the log record. |
|
1080 */ |
|
1081 IMPORT_C TScrComponentOperationType OperationType() const; |
|
1082 |
|
1083 /** |
|
1084 @return The component id of the log record. |
|
1085 @internalComponent |
|
1086 */ |
|
1087 IMPORT_C TComponentId ComponentId() const; |
|
1088 |
|
1089 private: |
|
1090 CScrLogEntry(); |
|
1091 void ConstructL(const TDesC& aComponentName, const TDesC& aUniqueSwTypeName, const TDesC& aGlobalId, const TDesC& aVersion, const TScrComponentOperationType aCompOpType); |
|
1092 |
|
1093 private: |
|
1094 HBufC* iComponentName ; |
|
1095 HBufC* iSwTypeName; |
|
1096 HBufC* iVersion; |
|
1097 TScrComponentOperationType iOpType ; |
|
1098 TTime iRecordTime ; |
|
1099 HBufC* iGlobalId; |
|
1100 TComponentId iComponentId; |
|
1101 }; |
|
1102 |
|
1103 } // End of namespace Usif |
|
1104 |
|
1105 #endif // SCRENTRIES_H |