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 * RSoftwareComponentRegistry provides interfaces allowing install, uninstall, and update |
|
16 * of software components . |
|
17 * Software Components Registry interface is designed to be used by installers, application managers, device managers and the software install framework (SIF). |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 /** |
|
23 @file |
|
24 @publishedAll |
|
25 @released |
|
26 */ |
|
27 |
|
28 #ifndef SOFTWARECOMPONENTREGISTRY_H |
|
29 #define SOFTWARECOMPONENTREGISTRY_H |
|
30 |
|
31 #include <e32base.h> |
|
32 #include <usif/usifcommon.h> |
|
33 #include <usif/scr/screntries.h> |
|
34 #include <usif/scr/appregentries.h> |
|
35 #include <scs/scsclient.h> |
|
36 #include <usif/scr/appreginfo.h> |
|
37 #include <usif/scr/screntries_platform.h> |
|
38 |
|
39 namespace Usif |
|
40 { |
|
41 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
42 class CScrLogEntry; |
|
43 class CLocalizedSoftwareTypeName; |
|
44 #endif SYMBIAN_ENABLE_SPLIT_HEADERS |
|
45 |
|
46 NONSHARABLE_CLASS(RSoftwareComponentRegistry) : public RScsClientBase |
|
47 /* |
|
48 The clients of Software Component Registry (SCR) use this class to communicate |
|
49 with the SCR server. |
|
50 |
|
51 This class provides several sets of functionality: |
|
52 (i) Components' management, such as adding and removing components, registering files and other operations |
|
53 (ii) Transaction management, which allows rolling back or committing a set of mutating operations together. |
|
54 (iii) Read-only queries, such as getting component properties, or component information. |
|
55 |
|
56 Operations which update or create new components in the SCR are restricted to the registered installers or layered execution |
|
57 environments (LEE). For example, only a Java installer or the Java Virtual Machine (JVM) can create new Java components. Additionally, |
|
58 only the same entities can change properties of or delete already existing Java components. |
|
59 |
|
60 Please note that mutating functions of this class can be used if any of the following conditions applies: |
|
61 - There is no active transaction or reading operation with component or file views. |
|
62 - A transaction exists and has been started by this connection. |
|
63 |
|
64 Additionally, please note that SCR limits the size of strings it receives in input to 512 characters, e.g. supplying component names, property names longer than that |
|
65 will result in KErrArgument. |
|
66 */ |
|
67 { |
|
68 |
|
69 public: |
|
70 /** |
|
71 Default constructor of SCR session. |
|
72 */ |
|
73 IMPORT_C RSoftwareComponentRegistry(); |
|
74 |
|
75 /** |
|
76 Opens a connection to the SCR server. |
|
77 @return KErrNone, if the connection is successful. Otherwise, a system-wide error code. |
|
78 */ |
|
79 IMPORT_C TInt Connect(); |
|
80 |
|
81 /** |
|
82 Closes the connection with the SCR server. |
|
83 */ |
|
84 IMPORT_C void Close(); |
|
85 |
|
86 /** |
|
87 The SCR allows its clients to perform all mutable operations related to a software component management operation |
|
88 (e.g. install, uninstall, upgrade, and replace) within a single transaction. If a software component management operation |
|
89 fails or is aborted then the SCR will revert to a consistent state. If mutating operations are not done under a transaction, |
|
90 it will be impossible to roll them back automatically in conjunction with other operations. |
|
91 |
|
92 A transaction is started and persists throughout the connection until the next commit/rollback function call. |
|
93 The transaction automatically rolls back if the server connection is closed without commit/rollback functions |
|
94 being invoked. If the device unexpectedly shuts down while a transaction is in progress, the SCR server will |
|
95 revert to consistent state on next usage. |
|
96 |
|
97 Please note that nested/concurrent transactions are NOT supported. |
|
98 |
|
99 N.B. It is impossible to start a transaction if at least one component or file view (e.g. RSoftwareComponentRegistryView and |
|
100 RSoftwareComponentRegistryFilesList) owned by another SCR session is in progress. |
|
101 |
|
102 N.B. Transaction operations are permitted only to registered installers or execution environments. |
|
103 |
|
104 @leave KErrScrWriteOperationInProgress If a transaction is already in progress on the SCR server. |
|
105 @leave KErrScrReadOperationInProgress If one or more component views or file lists owned by other SCR sessions are open. |
|
106 @leave KErrPermissionDenied An unauthorised process attempted a transaction operation. |
|
107 @leave Or system-wide error codes. |
|
108 */ |
|
109 IMPORT_C void CreateTransactionL(); |
|
110 |
|
111 /** |
|
112 Rolls back the transaction started by this session by reverting all the changes made during the transaction. |
|
113 |
|
114 N.B. Transaction operations are permitted only to registered installers or execution environments. |
|
115 |
|
116 @leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection. |
|
117 @leave KErrPermissionDenied An unauthorised process attempted a transaction operation. |
|
118 @leave Or system-wide error codes. |
|
119 */ |
|
120 IMPORT_C void RollbackTransactionL(); |
|
121 |
|
122 /** |
|
123 Commits the transaction started by this session. |
|
124 |
|
125 N.B. Transaction operations are permitted only to registered installers or execution environments. |
|
126 |
|
127 @leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection. |
|
128 @leave KErrPermissionDenied An unauthorised process attempted a transaction operation. |
|
129 @leave Or system-wide error codes. |
|
130 */ |
|
131 IMPORT_C void CommitTransactionL(); |
|
132 |
|
133 /** |
|
134 Adds a new software component entry to the SCR database. |
|
135 |
|
136 If the component and vendor names of the software component being installed are NOT localizable, |
|
137 then this API should be used to add a new component. |
|
138 |
|
139 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
140 |
|
141 @param aName The non-localizable name of the component being added. |
|
142 @param aVendor The non-localizable vendor name of the component being added. |
|
143 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
|
144 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
|
145 that is unique within the context of that software type. The global component id might be |
|
146 the package UID for native applications or the MIDlet name/vendor pair for Java MIDLets, etc. |
|
147 Note that if KNullDesC is provided, the global identifier will be empty. |
|
148 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see TScrComponentOperationType |
|
149 @return The component ID of the newly added entry. |
|
150 |
|
151 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
152 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
153 @leave Or system-wide error codes. |
|
154 */ |
|
155 IMPORT_C TComponentId AddComponentL(const TDesC& aName, const TDesC& aVendor, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall); |
|
156 |
|
157 /** |
|
158 Adds a new software component entry to the SCR database. |
|
159 If the component and vendor names of the software component being installed are localizable, |
|
160 then this API should be used to add a new component. |
|
161 |
|
162 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
163 |
|
164 @param aComponentInfo The list of localizable component information (such as vendor and name) with one entry per each supported locale. |
|
165 @param aUniqueSwTypeName The non-localized, unique software type name, e.g. "Native". |
|
166 @param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component |
|
167 that is unique within the context of that software type. The global component id would be |
|
168 the package UID for native applications or the midlet-names for Java, etc. |
|
169 Note that if KNullDesC is provided, the global identifier will be empty. |
|
170 @param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see TScrComponentOperationType |
|
171 @return The component ID of the newly added entry. |
|
172 |
|
173 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
174 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
175 @leave Or system-wide error codes. |
|
176 */ |
|
177 IMPORT_C TComponentId AddComponentL(const RPointerArray<CLocalizableComponentInfo>& aComponentInfo, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall); |
|
178 |
|
179 /** |
|
180 Adds a new dependency between two software components (supplier and dependant) of any type. |
|
181 For example, if VNC Viewer is ported to the Symbian OS using the POSIX library, VNC Viewer |
|
182 depends on the POSIX library. Here, VNC Viewer is dependant, whereas the POSIX library is supplier. |
|
183 |
|
184 A dependency exists on global component ids, since a dependency is a global relation between |
|
185 two components, regardless to their status on a particular system. While local component ids |
|
186 (@see TComponentId) are private to a particular device and can change for the same global id |
|
187 in the case of upgrades or reinstalls, global component ids are unique and equal for the same |
|
188 component on any device. |
|
189 |
|
190 Since a dependency is defined using global ids, it can be added even if the participant |
|
191 components don't exist in the system. |
|
192 N.B. A duplicate dependency is not allowed. |
|
193 |
|
194 @param aSupplierVerCompId The versioned software component identifier of the supplier component. |
|
195 @param aDependantGlobalCompId The global software component identifier of the dependant component. |
|
196 @leave KErrAlreadyExists If the dependency is already defined in the SCR. |
|
197 @leave Or other system-wide error codes. |
|
198 */ |
|
199 IMPORT_C void AddComponentDependencyL(const CVersionedComponentId& aSupplierVerCompId, const CGlobalComponentId& aDependantGlobalCompId); |
|
200 |
|
201 /** |
|
202 Adds a new named 8-bit descriptor property to the registry for a given software component and locale. |
|
203 If the property already exits, then its value is updated. |
|
204 |
|
205 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
206 |
|
207 @param aComponentId The unique ID of the given software component. |
|
208 @param aName The name of the software component property. |
|
209 @param aValue The value of the software component property. |
|
210 |
|
211 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
212 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
213 @leave Or system-wide error codes. |
|
214 */ |
|
215 |
|
216 IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC8& aValue); |
|
217 |
|
218 /** |
|
219 Adds a new named localizable 16-bit string property to the registry for a given software component and locale. |
|
220 If the property already exists, then its value is updated. |
|
221 |
|
222 N.B. If the property exists with the same value but for a different locale, it is NOT replaced, but instead added for the new locale. |
|
223 N.B. This API should not be used for raw binary data. For binary data, the TDesC8 variant of SetComponentProperty should be used instead. |
|
224 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
225 |
|
226 @param aComponentId The unique ID of the given software component. |
|
227 @param aName The name of the software component property. |
|
228 @param aValue The value of the software component property. |
|
229 @param aLocale The language code of the property. The default value is non-localized property. |
|
230 |
|
231 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
232 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
233 @leave Or system-wide error codes. |
|
234 */ |
|
235 |
|
236 IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC& aValue, TLanguage aLocale=KNonLocalized); |
|
237 |
|
238 /** |
|
239 Adds a new named numeric property to the registry for a given software component. If the property already |
|
240 exits, then its value is updated. Signed values from -2^63+1 to +2^63-1 are supported. |
|
241 |
|
242 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
243 |
|
244 @param aComponentId The unique ID of the given software component. |
|
245 @param aName The name of the software component property. |
|
246 @param aValue The value of the software component property. Can be TInt; if the value cannot exceed 32-bit range, as TInt64 provides automatic casting from TInt. |
|
247 |
|
248 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
249 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
250 @leave Or system-wide error codes. |
|
251 */ |
|
252 IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, TInt64 aValue); |
|
253 |
|
254 /** |
|
255 Registers a file to a given software component. |
|
256 |
|
257 Before registration, tests whether the provided filename is syntactically correct. |
|
258 For more information about the syntax, check @see RFs::IsValidName. |
|
259 |
|
260 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
261 |
|
262 @param aComponentId The unique ID of the given software component. |
|
263 @param aFileName The fully qualified name of the file being registered. |
|
264 @param aConsiderForInstalledDrives This parameter specifies whether the list of installed drives ( @see CComponentEntry::InstalledDrives) should be maintained as a result of this operation. |
|
265 In most cases, this should be left at the default setting, unless a file is registered for uninstall purposes only and is not actually present on the system, for example a possible temporary file which might be created later by the component's application(s) |
|
266 Please note that if UnregisterComponentFileL is later used on the component, this parameter will not apply, and the file registration may still affect the list of installed drives. |
|
267 |
|
268 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
269 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
270 @leave KErrArgument If the file name is invalid or is not fully qualified |
|
271 @leave Or system-wide error codes. |
|
272 */ |
|
273 IMPORT_C void RegisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName, TBool aConsiderForInstalledDrives = ETrue); |
|
274 |
|
275 /** |
|
276 Adds a new named 8-bit descriptor property to the registry for a given file and software component. If the property already |
|
277 exits, then its value is updated. |
|
278 |
|
279 A file property allows adding custom information about a component’s file ownership, for example, a native installer |
|
280 may associate custom operations to be done on uninstall for a particular file. |
|
281 |
|
282 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
283 |
|
284 @param aComponentId The unique ID of the given software component. |
|
285 @param aFileName The fully qualified name of the file. |
|
286 @param aPropName The name of the file property being added. |
|
287 @param aPropValue The value of the file property being set. |
|
288 |
|
289 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
290 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
291 @leave Or system-wide error codes. |
|
292 */ |
|
293 IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, const TDesC8& aPropValue); |
|
294 |
|
295 /** |
|
296 Adds a new named numeric property to the registry for a given file and software component. |
|
297 If the property already exists, it is just updated. |
|
298 |
|
299 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
300 |
|
301 @param aComponentId The unique ID of the given software component. |
|
302 @param aFileName The fully qualified name of the file. |
|
303 @param aPropName The name of the file property being added. |
|
304 @param aPropValue The value of the file property being added. |
|
305 |
|
306 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
307 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
308 @leave Or system-wide error codes. |
|
309 */ |
|
310 IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, TInt aPropValue); |
|
311 |
|
312 /** |
|
313 Adds a new localized component name for a given software component. |
|
314 If the localized name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL), |
|
315 then it is updated. |
|
316 If no locale is specified, then the default component name is updated (or added if no default name exists). |
|
317 |
|
318 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
319 |
|
320 @param aComponentId The unique ID of the given software component. |
|
321 @param aName The new value of the component name for a given locale. |
|
322 @param aLocale The language code of the requested locale. The default value is non-localized. |
|
323 |
|
324 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
325 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
326 @leave Or system-wide error codes. |
|
327 */ |
|
328 IMPORT_C void SetComponentNameL(TComponentId aComponentId, const TDesC& aName, TLanguage aLocale=KNonLocalized); |
|
329 |
|
330 /** |
|
331 Adds a new localized component vendor for a given software component. |
|
332 If the localized vendor name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL), |
|
333 then it is updated. |
|
334 If no locale is specified, then the default vendor name is updated (or added if no default vendor name exists). |
|
335 |
|
336 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
337 |
|
338 @param aComponentId The unique ID of the given software component. |
|
339 @param aVendor The new value of the vendor name for a given locale. |
|
340 @param aLocale The language code of the requested locale. The default value is non-localized. |
|
341 |
|
342 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
343 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
344 @leave Or system-wide error codes. |
|
345 */ |
|
346 IMPORT_C void SetVendorNameL(TComponentId aComponentId, const TDesC& aVendor, TLanguage aLocale=KNonLocalized); |
|
347 |
|
348 /** |
|
349 Updates the version of a given software component. |
|
350 |
|
351 N.B. The default value of component version is NULL. |
|
352 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
353 |
|
354 @param aComponentId The unique ID of the given software component. |
|
355 @param aVersion The new value of the version attribute. |
|
356 |
|
357 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
358 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
359 @leave Or system-wide error codes. |
|
360 */ |
|
361 IMPORT_C void SetComponentVersionL(TComponentId aComponentId, const TDesC& aVersion); |
|
362 |
|
363 /** |
|
364 Sets whether the component is removable. |
|
365 When a component is added, this is set to True by default (i.e. all non-ROM components are removable unless stated otherwise). |
|
366 |
|
367 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
368 |
|
369 @param aComponentId The unique ID of the given software component. |
|
370 @param aValue ETrue to set component as removable. EFalse to set component as unremovable. |
|
371 |
|
372 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
373 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
374 @leave Or system-wide error codes. |
|
375 |
|
376 @capability AllFiles Creating non-removable components requires AllFiles. |
|
377 */ |
|
378 IMPORT_C void SetIsComponentRemovableL(TComponentId aComponentId, TBool aValue); |
|
379 |
|
380 /** |
|
381 Sets whether the component is DRM protected. |
|
382 When a component is added, this is set to False by default (i.e. all components are non-DRM protected unless stated otherwise). |
|
383 |
|
384 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
385 |
|
386 @param aComponentId The unique ID of the given software component. |
|
387 @param aValue ETrue to set component as DRM protected. EFalse to set component as non-DRM protected. |
|
388 |
|
389 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
390 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
391 @leave Or system-wide error codes. |
|
392 |
|
393 @capability WriteDeviceData Creating DRM protected components requires WriteDeviceData. |
|
394 */ |
|
395 IMPORT_C void SetIsComponentDrmProtectedL(TComponentId aComponentId, TBool aValue); |
|
396 |
|
397 /** |
|
398 Sets the hidden attribute of a component indicating that the component shouldn't be displayed in the list of installed components. |
|
399 When a component is added, this is set to False by default (i.e. all components are visible unless stated otherwise). |
|
400 |
|
401 N.B. SCR does not enforce usage of this flag, and application managers may ignore it, e.g. in an admin view. |
|
402 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
403 |
|
404 @param aComponentId The unique ID of the given software component. |
|
405 @param aValue ETrue to set component as hidden. EFalse to set component as non-hidden. |
|
406 |
|
407 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
408 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
409 @leave Or system-wide error codes. |
|
410 |
|
411 @capability WriteDeviceData Creating hidden components requires WriteDeviceData. |
|
412 */ |
|
413 IMPORT_C void SetIsComponentHiddenL(TComponentId aComponentId, TBool aValue); |
|
414 |
|
415 /** |
|
416 Sets the Known-Revoked attribute of a component. If this attribute is true, then it indicates |
|
417 a revocation check was performed during or after the installation and the component |
|
418 was found to be revoked. When a component is added, this is set to False by default. |
|
419 |
|
420 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
421 |
|
422 @param aComponentId The unique ID of the given software component. |
|
423 @param aValue ETrue to set component as known-revoked. EFalse to set component as known-unrevoked. |
|
424 |
|
425 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
426 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
427 @leave Or system-wide error codes. |
|
428 |
|
429 @capability WriteDeviceData Creating known-revoked components requires WriteDeviceData. |
|
430 */ |
|
431 IMPORT_C void SetIsComponentKnownRevokedL(TComponentId aComponentId, TBool aValue); |
|
432 |
|
433 /** |
|
434 Sets the Origin-Verified attribute of a component. If this attribute is true, then it indicates that |
|
435 the installer has verified the originator of the software component by using appropriate checking mechanisms (e.g. certificates). |
|
436 If the attribute is false, it means that such a verification has not been performed, or that the installer does not support origin verification. |
|
437 When a component is added, this is set to False by default. |
|
438 |
|
439 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
440 |
|
441 @param aComponentId The unique ID of the given software component. |
|
442 @param aValue ETrue to set component as origin-verified EFalse to set component as origin-non-verified. |
|
443 |
|
444 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
445 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
446 @leave Or system-wide error codes. |
|
447 |
|
448 @capability WriteDeviceData Creating origin verified components requires WriteDeviceData. |
|
449 */ |
|
450 IMPORT_C void SetIsComponentOriginVerifiedL(TComponentId aComponentId, TBool aValue); |
|
451 |
|
452 /** |
|
453 Sets the total size in bytes of the files owned by a given component. Note that SCR doesn't maintain this value. |
|
454 |
|
455 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
456 |
|
457 @param aComponentId The unique ID of the given software component. |
|
458 @param aComponentSizeInBytes The size of the component's files in bytes. |
|
459 |
|
460 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
461 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
462 @leave Or system-wide error codes. |
|
463 */ |
|
464 IMPORT_C void SetComponentSizeL(TComponentId aComponentId, TInt64 aComponentSizeInBytes); |
|
465 |
|
466 /** |
|
467 Deletes a specific property entry of a given software component. |
|
468 |
|
469 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
470 N.B. If the component or property doesn't exist, the function completes successfully. |
|
471 N.B. If the property is specified for multiple locales, it is deleted for all of them. |
|
472 |
|
473 @param aComponentId The unique ID of the given software component. |
|
474 @param aPropName The name of the component property being deleted. |
|
475 |
|
476 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
477 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
478 @leave Or system-wide error codes. |
|
479 */ |
|
480 IMPORT_C void DeleteComponentPropertyL(TComponentId aComponentId, const TDesC& aPropName); |
|
481 |
|
482 /** |
|
483 Deletes a specific file property entry for a given file and software component. |
|
484 |
|
485 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
486 |
|
487 @param aComponentId The unique ID of the given software component. |
|
488 @param aFileName The fully qualified name of the file. |
|
489 @param aPropName The name of the file property being deleted. |
|
490 |
|
491 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
492 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
493 @leave Or system-wide error codes. |
|
494 */ |
|
495 IMPORT_C void DeleteFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName); |
|
496 |
|
497 /** |
|
498 Unregisters a specific file entry from a given software component. |
|
499 Note that all associated file properties for the same component are removed as well. |
|
500 |
|
501 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
502 N.B. This operation also deletes all the corresponding file properties. |
|
503 |
|
504 @param aComponentId The unique ID of the given software component. |
|
505 @param aFileName The fully qualified name of the file being deregistered. |
|
506 |
|
507 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
508 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
509 @leave Or system-wide error codes. |
|
510 */ |
|
511 IMPORT_C void UnregisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName); |
|
512 |
|
513 /** |
|
514 Deletes a sofware component entry and all its data from the registry, including properties and file registration records. |
|
515 |
|
516 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
517 N.B. If the component doesn't exist, the function completes successfully. |
|
518 |
|
519 @param aComponentId The unique ID of the given software component. |
|
520 |
|
521 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
522 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
523 @leave Or system-wide error codes. |
|
524 */ |
|
525 IMPORT_C void DeleteComponentL(TComponentId aComponentId); |
|
526 |
|
527 /** |
|
528 Deletes an existing dependency between two software components (supplier and dependant) of any type. |
|
529 (@see RSoftwareComponentRegistry::AddComponentDependencyL for more information about component dependency.) |
|
530 |
|
531 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
532 N.B. If the dependency doesn't exist, the function completes successfully. |
|
533 |
|
534 @param aSupplierGlobalCompId The global software component identifier of the supplier component. |
|
535 @param aDependantGlobalCompId The global software component identifier of the dependant component. |
|
536 @leave System-wide error codes. |
|
537 */ |
|
538 IMPORT_C void DeleteComponentDependencyL(const CGlobalComponentId& aSupplierGlobalCompId, const CGlobalComponentId& aDependantGlobalCompId); |
|
539 |
|
540 /** |
|
541 Retrieves a specific software component entry with the component name and vendor for a particular locale. |
|
542 |
|
543 @param aComponentId The unique ID of the given software component. |
|
544 @param aEntry An output parameter for returning information for the component matching the given id. |
|
545 If no such component is present, this parameter remains unchanged. |
|
546 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
547 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
548 the names. If it fails, then the non-localized names are returned. If non-localized versions |
|
549 couldn't be found too, the first available language for the component is retrieved. |
|
550 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
|
551 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
|
552 If a particular language is provided, then the names are searched for this particular language |
|
553 and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale. |
|
554 @return If the requested component is found, then ETrue is returned. Otherwise, EFalse. |
|
555 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
|
556 @leave System-wide error codes. |
|
557 */ |
|
558 IMPORT_C TBool GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
|
559 |
|
560 /** |
|
561 Retrieves the localized information from ComponentLocalizable table for a given component id. |
|
562 |
|
563 @param aComponentId The unique ID of the given software component. |
|
564 @param aCompLocalizedInfoArray An output parameter for returning localized information for a given component id. |
|
565 @leave System-wide error codes. |
|
566 @capability ReadUserData Accessing a component's localized information requires ReadUserData |
|
567 */ |
|
568 IMPORT_C void GetComponentLocalizedInfoL(TComponentId aComponentId, RPointerArray<CLocalizableComponentInfo>& aCompLocalizedInfoArray) const; |
|
569 |
|
570 /** |
|
571 Retrieves the array of all software component IDs in the SCR, optionally matching a particular filter. |
|
572 |
|
573 @param aComponentIdList The component Id list of all sofwtare components. |
|
574 @param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components. |
|
575 If no filter is provided, all software components in the SCR are listed. |
|
576 |
|
577 @leave System-wide error codes. |
|
578 |
|
579 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
|
580 */ |
|
581 IMPORT_C void GetComponentIdsL(RArray<TComponentId>& aComponentIdList, CComponentFilter* aFilter=NULL) const; |
|
582 |
|
583 /** |
|
584 Retrieves the local component id of a given global component id. |
|
585 |
|
586 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
|
587 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
|
588 @return The local unique component id. |
|
589 |
|
590 @leave KErrNotFound Software component with this global id is not present in the system. |
|
591 @leave System-wide error codes. |
|
592 */ |
|
593 IMPORT_C TComponentId GetComponentIdL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName) const; |
|
594 |
|
595 /** |
|
596 Retrieves a specific software component entry with the specified global id and software type name for a given locale. |
|
597 |
|
598 @param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type. |
|
599 @param aUniqueSwTypeName The non-localized, unique software type name, such as @see KSoftwareTypeNative and @see KSoftwareTypeJava. |
|
600 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
601 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
602 the names. If it fails, then the non-localized names are returned. If non-localized versions |
|
603 couldn't be found too, the first available language for the component is retrieved. |
|
604 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
|
605 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
|
606 If a particular language is provided, then the names are searched for this particular language |
|
607 and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale. |
|
608 @return aEntry A pointer to the component entry object for the given global component id. |
|
609 |
|
610 @leave KErrScrUnsupportedLocale The component requested with the global id couldn't be found for the specified locale. |
|
611 @leave System-wide error codes. |
|
612 */ |
|
613 IMPORT_C CComponentEntry* GetComponentL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName, TLanguage aLocale=KUnspecifiedLocale) const; |
|
614 |
|
615 /** |
|
616 Retrieves the list of supplier components with the range of versions on which a given |
|
617 component depends. The range of versions here indicates specific versions of the returned |
|
618 components (suppliers) which the given component (dependant) depend on. |
|
619 |
|
620 @param aDependantGlobalId The global component id of the given software component. |
|
621 @param aSupplierList The versioned component id list of supplier components for the given dependant component. |
|
622 @leave System-wide error codes. |
|
623 */ |
|
624 IMPORT_C void GetSupplierComponentsL(const CGlobalComponentId& aDependantGlobalId, RPointerArray<CVersionedComponentId>& aSupplierList) const; |
|
625 |
|
626 /** |
|
627 Retrieves the list of components (dependants) with the range of versions that depend on |
|
628 a given component (supplier). The range of versions here indicates specific versions of |
|
629 the given component which the returned components depend on. |
|
630 |
|
631 @param aSupplierGlobalId The global component id of the given software component. |
|
632 @param aDependantList The versioned component id list of dependant components for the given supplier component. |
|
633 @leave System-wide error codes. |
|
634 */ |
|
635 IMPORT_C void GetDependantComponentsL(const CGlobalComponentId& aSupplierGlobalId, RPointerArray<CVersionedComponentId>& aDependantList) const; |
|
636 |
|
637 /** |
|
638 Retrieves the array of properties owned by a specific file registered to a given component. |
|
639 |
|
640 @param aComponentId The unique ID of the given software component. |
|
641 @param aFileName The fully qualified name of the file. |
|
642 @param aProperties An output parameter for returning the list of properties owned by the given file. |
|
643 @leave System-wide error codes. |
|
644 */ |
|
645 IMPORT_C void GetFilePropertiesL(TComponentId aComponentId, const TDesC& aFileName, RPointerArray<CPropertyEntry>& aProperties) const; |
|
646 |
|
647 /** |
|
648 Retrieves a specified property entry for a given file and software component. |
|
649 |
|
650 @param aComponentId The unique ID of the given software component. |
|
651 @param aFileName The fully qualified name of the file. |
|
652 @param aPropertyName The name of the requested property. |
|
653 @return Returns a pointer to the property object containing the requested file property. |
|
654 The ownership is transferred. If the property couldn't be found, then NULL is returned. |
|
655 @leave System-wide error codes. |
|
656 */ |
|
657 IMPORT_C CPropertyEntry* GetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropertyName) const; |
|
658 |
|
659 /** |
|
660 Retrieves the number of files registered by a component. |
|
661 |
|
662 @param aComponentId The unique ID of the given software component. |
|
663 @return The number of registered files. |
|
664 @leave System-wide error codes. |
|
665 */ |
|
666 IMPORT_C TUint GetComponentFilesCountL(TComponentId aComponentId) const; |
|
667 |
|
668 /** |
|
669 Retrieves the set of components which register a given file. |
|
670 |
|
671 @param aFileName The fully qualified name of the file. |
|
672 @param aComponents An output parameter for returning for the list of components which own the given file. |
|
673 @leave System-wide error codes. |
|
674 */ |
|
675 IMPORT_C void GetComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const; |
|
676 |
|
677 /** |
|
678 Retrieves a specified property for a given component, property name and locale. |
|
679 |
|
680 When searching for localizable properties, it is possible that the requested language |
|
681 variant is not available, however, there may be other language variants that are acceptable. |
|
682 Therefore, a language downgrade path that starts with the language associated with the requested |
|
683 locale and ends with the least best match is first created. Then the downgrade path is used to |
|
684 search for a language specific property and the first match is returned to the user. |
|
685 |
|
686 @param aComponentId The unique ID of the given software component. |
|
687 @param aPropertyName The name of the component property. |
|
688 @param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale. |
|
689 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used |
|
690 as explained above to find the property. If it fails, then the non-localized version is looked up. |
|
691 If non-localized version couldn't be found too, the function leaves with KErrNotFound. |
|
692 If KNonLocalized is provided, then the non-localized version of the property is returned, |
|
693 If non-localized version doesn't exist, then the function will leave with KErrNotFound. |
|
694 If a particular language is provided, then the property is searched for this particular language |
|
695 and its downgraded languages. If there is no property with the provided language, then the function |
|
696 leaves with KErrNotFound. |
|
697 @return Returns a pointer to the property object containing the requested component property entry. |
|
698 The ownership is transferred. If the property couldn't be found, then NULL is returned. |
|
699 @leave A system-wide error code. |
|
700 */ |
|
701 IMPORT_C CPropertyEntry* GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale=KUnspecifiedLocale) const; |
|
702 |
|
703 /** |
|
704 Retrieves the set of properties for a particular locale belonging to the given component. |
|
705 if no locale is specified, then the current locale is used as default. |
|
706 |
|
707 For more information about searching for localized properties look at @see RSoftwareComponentRegistry::GetComponentPropertyL. |
|
708 |
|
709 @param aComponentId The unique ID of the given software component. |
|
710 @param aProperties An output parameter for returning the list of properties which owned by the given component. |
|
711 @param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale. |
|
712 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used |
|
713 as explained above to find properties. If it fails, then the non-localized version is looked up. |
|
714 If non-localized versions couldn't be found too, the function leaves with KErrNotFound. |
|
715 If KNonLocalized is provided, then the non-localized versions of properties are returned, |
|
716 If non-localized versions don't exist, then the function will leave with KErrNotFound. |
|
717 If a particular language is provided, then the properties are searched for this particular language |
|
718 and its downgraded languages. Otherwise, the function leaves with KErrNotFound. |
|
719 @leave A system-wide error code. |
|
720 */ |
|
721 IMPORT_C void GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale=KUnspecifiedLocale) const; |
|
722 |
|
723 /** |
|
724 Returns whether all drives registered for the given component are present. |
|
725 The list of drives is derived using the set of files registered by the component. |
|
726 |
|
727 N.B. For removable media, this method does NOT check that the actual media matches the one which contains the component's files. |
|
728 It just verifies that any media is present in the drive. |
|
729 |
|
730 @param aComponentId The unique ID of the software component. |
|
731 @return ETrue, if all drives registered for the component are present; otherwise EFalse. |
|
732 @publishedPartner |
|
733 */ |
|
734 IMPORT_C TBool IsMediaPresentL(TComponentId aComponentId) const; |
|
735 |
|
736 /** |
|
737 Sets the SCOMO state of a given component. |
|
738 |
|
739 @param aComponentId The unique ID of the given software component. |
|
740 @param aScomoState The new SCOMO state of the component. |
|
741 @leave A system-wide error code. |
|
742 */ |
|
743 IMPORT_C void SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const; |
|
744 |
|
745 /** |
|
746 Retrieves the UID of the plug-in which is responsible for a given MIME type. |
|
747 |
|
748 @param aMimeType The MIME type. |
|
749 @return The UID of the plug-in. |
|
750 @leave KErrSifUnsupportedSoftwareType There is no corresponding plug-in for this MIME type. |
|
751 @leave A system-wide error code. |
|
752 @internalTechnology |
|
753 */ |
|
754 IMPORT_C TUid GetPluginUidL(const TDesC& aMimeType) const; |
|
755 |
|
756 /** |
|
757 Retrieves the UID of the plug-in that installed a given component. |
|
758 |
|
759 @param aComponentId Component's local identifier. |
|
760 @return The UID of the plug-in. |
|
761 @leave A system-wide error code. |
|
762 @internalTechnology |
|
763 */ |
|
764 IMPORT_C TUid GetPluginUidL(TComponentId aComponentId) const; |
|
765 |
|
766 /** |
|
767 Add a new software type name to the SCR database. |
|
768 |
|
769 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
770 This can be called only by sisregistry. |
|
771 |
|
772 @param aUniqueSwTypeName Non-localized unique software type name. |
|
773 @param aSifPluginUid The SIF plug-in UID of the installer which is responsible for installing components with this software type |
|
774 @param aInstallerSecureId The secure id of the installer which is responsible for installing components with this software type |
|
775 @param aExecutionLayerSecureId The secure id of the installer's execution layer which refers to an executable that interprets or |
|
776 executes byte code for programs written in a high level language Java, Python, Widgets, etc. |
|
777 This paramater is optional. If it doesn't exist, it should be equal to the installer's secure id. |
|
778 @param aMimeTypes The list of MIME types associated with this software type. |
|
779 @param aLocalizedSwTypeNames A pointer to the list of optional localized software type names. |
|
780 @leave A system-wide error code. |
|
781 @internalTechnology |
|
782 */ |
|
783 IMPORT_C void AddSoftwareTypeL(const Usif::CSoftwareTypeRegInfo& aSwTypeRegInfo); |
|
784 |
|
785 /** |
|
786 Deletes a sofware type name entry and all its mime types from the registry. |
|
787 |
|
788 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
789 N.B. If the software type doesn't exist, the function completes successfully. |
|
790 |
|
791 @param aUniqueSwTypeName Non-localized unique software type name. |
|
792 @param aDeletedMimeTypes An output parameter, where the MIME types deleted from SCR as a result of this operation will be stored. |
|
793 @leave A system-wide error code. |
|
794 @internalTechnology |
|
795 */ |
|
796 IMPORT_C void DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes); |
|
797 |
|
798 /** |
|
799 Returns whether the software installer of a given component is present. |
|
800 |
|
801 @param aComponentId The unique ID of the given software component. |
|
802 @return ETrue, if the software installer of the given component is present; otherwise EFalse. |
|
803 @leave A system-wide error code. |
|
804 */ |
|
805 IMPORT_C TBool IsComponentOrphanedL(TComponentId aComponentId); |
|
806 |
|
807 /** |
|
808 Retrieve the log entries recorded by SCR. A log entry (@see Usif::CScrLogEntry) contains information |
|
809 about the component operation (installation, uninstallation or upgrade) made by SCR. |
|
810 |
|
811 @param aLogEntries The caller supplies an empty array of CScrLogEntry which is loaded |
|
812 with the log entries from the SCR. If the SCR Log is empty then the array count |
|
813 will be zero. The caller is responsible for deleting all memory. |
|
814 @param aUniqueSwTypeName Optional parameter for non-localized unique software type name. |
|
815 If provided, only the log entries of the given software type are returned. |
|
816 @leave A system-wide error code. |
|
817 @capability ReadUserData |
|
818 */ |
|
819 IMPORT_C void RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName=NULL) const; |
|
820 |
|
821 /** |
|
822 Compares two generic, arbitrary length, dotted decimal version numbers. e.g. "1.2.32.4" < "1.3" |
|
823 |
|
824 @param aVersionLeft The version on the left side of the equality. |
|
825 @param aVersionRight The version on the right side of the equality. |
|
826 @return A positive value indicates that the left version is greater than the right version. |
|
827 A negative value indicates that the left version is less than the right version. |
|
828 Zero indicates that the left and right versions are equal. |
|
829 @leave A system-wide error code. |
|
830 */ |
|
831 IMPORT_C static TInt CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight); |
|
832 |
|
833 /** |
|
834 Returns whether the component is on a read-only drive. |
|
835 |
|
836 @param aComponentId The unique ID of the software component. |
|
837 @return ETrue, if the component is present on a read only drive; otherwise EFalse. |
|
838 @leave A system-wide error code. |
|
839 */ |
|
840 IMPORT_C TBool IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const; |
|
841 |
|
842 /** |
|
843 Returns whether the component is present on the device. As a component might be |
|
844 installed to a media card which was later removed, not all components registered are |
|
845 necessarily present. Please note that IsMediaPresentL does not check whether the media |
|
846 card containing the component is present. |
|
847 |
|
848 N.B. This function relies on values reported by installers, and thus, component presence |
|
849 might not be updated immediately when a media card is replaced. |
|
850 |
|
851 @param aComponentId The unique ID of the component. |
|
852 @return ETrue, if the component is present; otherwise EFalse. |
|
853 |
|
854 @leave A system-wide error code. |
|
855 */ |
|
856 IMPORT_C TBool IsComponentPresentL(TComponentId aComponentId) const; |
|
857 |
|
858 /** |
|
859 Sets whether the software component is present fully after being installed on to a |
|
860 removable drive. |
|
861 |
|
862 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
863 |
|
864 @param aComponentId The unique ID of the given software component. |
|
865 @param aValue ETrue to set component as present. EFalse to set component as not present. |
|
866 |
|
867 @leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress. |
|
868 @leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress. |
|
869 @leave Or a system-wide error code. |
|
870 */ |
|
871 IMPORT_C void SetIsComponentPresentL(TComponentId aComponentId, TBool aValue); |
|
872 |
|
873 /** |
|
874 Gets the installed supported language ID's array. |
|
875 |
|
876 @param aComponentId The unique ID of the given software component. |
|
877 @param aMatchingSupportedLanguages RArray containing the list of installed supported languages |
|
878 |
|
879 @leave A system-wide error code. |
|
880 @capability ReadUserData Accessing the installed supported language ID's array requires ReadUserData |
|
881 */ |
|
882 IMPORT_C void GetComponentSupportedLocalesListL(TComponentId aComponentId, RArray<TLanguage>& aMatchingSupportedLanguages) const; |
|
883 |
|
884 /** |
|
885 Adds a new application entry to the SCR database. |
|
886 |
|
887 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
888 |
|
889 @param aComponentId The componentId associated to the application |
|
890 @param aApplicationRegistrationData The information associated with the application. |
|
891 @leave KErrArgument If the AppUid or AppFile in aApplicationRegistrationData is NULL |
|
892 Or a system-wide error code. |
|
893 */ |
|
894 |
|
895 IMPORT_C void AddApplicationEntryL(const TComponentId aComponentId, const CApplicationRegistrationData& aApplicationRegistrationData); |
|
896 |
|
897 /** |
|
898 Deletes the information of all applications associated to an existing component entry from the SCR database. |
|
899 |
|
900 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
901 |
|
902 @param aComponentId The componentId, associated to which, all applications are deleted. |
|
903 @leave A system-wide error code. |
|
904 */ |
|
905 IMPORT_C void DeleteApplicationEntriesL(TComponentId aComponentId); |
|
906 |
|
907 /** |
|
908 Deletes an application entry from the SCR database. |
|
909 |
|
910 N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry. |
|
911 |
|
912 @param aApplicationUid Uid of the application to be deleted. |
|
913 @leave A system-wide error code. |
|
914 */ |
|
915 IMPORT_C void DeleteApplicationEntryL(TUid aApplicationUid); |
|
916 |
|
917 /** |
|
918 Gets the Component Id associated to a given Application Uid |
|
919 |
|
920 @param aAppUid The AppUid of an application. |
|
921 @return The componentId associated with the given application. |
|
922 @leave A system-wide error code. |
|
923 */ |
|
924 IMPORT_C TComponentId GetComponentIdForAppL(TUid aAppUid) const; |
|
925 |
|
926 /** |
|
927 Gets the array of Application Uids associated to a given Component. |
|
928 |
|
929 @param aCompId ComponentId of a component whose associated applications need to be fetched. |
|
930 @param aAppUids Returns the array of application Uids associated with the component. |
|
931 @leave A system-wide error code. |
|
932 */ |
|
933 IMPORT_C void GetAppUidsForComponentL(TComponentId aCompId, RArray<TUid>& aAppUids) const; |
|
934 |
|
935 /** |
|
936 Returns the array of application launchers. |
|
937 N.B. This function can only be used by AppArc to determine the launcher associated with |
|
938 an application. |
|
939 |
|
940 @param aLaunchers The current list of launchers present on the device. |
|
941 @leave A system-wide error code. |
|
942 */ |
|
943 IMPORT_C void GetApplicationLaunchersL(RPointerArray<CLauncherExecutable>& aLaunchers) const; |
|
944 |
|
945 private: |
|
946 |
|
947 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
948 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
|
949 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
950 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
951 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
952 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
953 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
954 }; |
|
955 |
|
956 |
|
957 NONSHARABLE_CLASS(RSoftwareComponentRegistryView) : public RScsClientSubsessionBase |
|
958 /** |
|
959 This class opens a sub-session to the SCR server and sends a request to create a component view |
|
960 by using the supplied filter on the server side. |
|
961 */ |
|
962 { |
|
963 public: |
|
964 /** |
|
965 Default constructor of registry view sub-session. |
|
966 */ |
|
967 IMPORT_C RSoftwareComponentRegistryView(); |
|
968 |
|
969 /** |
|
970 Closes the registry view on the SCR server. |
|
971 */ |
|
972 IMPORT_C void Close(); |
|
973 |
|
974 /** |
|
975 Opens a view of the installed software components in the SCR. |
|
976 The SCR initializes the view by enumerating the components with the given filter. |
|
977 |
|
978 If the call to this function completes successfully, then the interface client will access |
|
979 the enumerated records by using @see RSoftwareComponentRegistryView::NextComponentL. |
|
980 |
|
981 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
982 will be rejected. |
|
983 |
|
984 N.B. After this function completes successfully, NextComponentLor NextComponentSetL functions |
|
985 can be used together. However, GetComponentIdsL function cannot be called before or after |
|
986 these functions. |
|
987 |
|
988 @param aCompReg An active SCR connection. |
|
989 @param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components. |
|
990 If no filter is provided, all software components in the SCR are enumerated. |
|
991 @leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress. |
|
992 @leave Or a system-wide error code. |
|
993 |
|
994 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
|
995 */ |
|
996 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, CComponentFilter* aFilter=NULL); |
|
997 |
|
998 /** |
|
999 Retrieves the next software component entry from the view which has already been |
|
1000 created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL. |
|
1001 |
|
1002 The locale for the component name and vendor of the retrieved component can be specified. |
|
1003 |
|
1004 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1005 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1006 the names. If it fails, then the non-localized names are returned. If non-localized versions |
|
1007 couldn't be found too, the first available language for the component is retrieved. |
|
1008 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
|
1009 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
|
1010 If a particular language is provided, then the names are searched for this particular language |
|
1011 and its downgraded languages. If there is no name and vendor with the provided language, |
|
1012 then the function leaves with KErrScrUnsupportedLocale. |
|
1013 @return Returns the next component matching the given filter. If no more components can be found, returns NULL. |
|
1014 The ownership is transferred to the calling client. |
|
1015 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
|
1016 @leave Or a system-wide error code. |
|
1017 |
|
1018 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
|
1019 */ |
|
1020 IMPORT_C CComponentEntry* NextComponentL(TLanguage aLocale=KUnspecifiedLocale) const; |
|
1021 |
|
1022 /** |
|
1023 Retrieves the next software component entry from the view which has already been |
|
1024 created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL. |
|
1025 |
|
1026 The locale for the component name and vendor of the retrieved component can be specified. |
|
1027 |
|
1028 @param aEntry An output parameter for returning the current component registry entry of the view. |
|
1029 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1030 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1031 the names. If it fails, then the non-localized names are returned. If non-localized versions |
|
1032 couldn't be found too, the first available language for the component is retrieved. |
|
1033 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
|
1034 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
|
1035 If a particular language is provided, then the names are searched for this particular language |
|
1036 and its downgraded languages. If there is no name and vendor with the provided language, |
|
1037 then the function leaves with KErrScrUnsupportedLocale. |
|
1038 @return EFalse, if the end of the view has been reached. Otherwise, ETrue. |
|
1039 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
|
1040 @leave Or a system-wide error code. |
|
1041 |
|
1042 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
|
1043 */ |
|
1044 IMPORT_C TBool NextComponentL(CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const; |
|
1045 |
|
1046 /** |
|
1047 Retrieves the set of software component records from a given view which has already been |
|
1048 created in the SCR. The number of returned records is limited by the size of the component |
|
1049 list. |
|
1050 |
|
1051 The locale for the component names and vendors of the retrieved components can be specified. |
|
1052 |
|
1053 @param aMaxCount The maximum size of the returned components array. |
|
1054 @param aComponentList The list of component entry objects retrieved from the given view. |
|
1055 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1056 If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1057 the names. If it fails, then the non-localized names are returned. If non-localized versions |
|
1058 couldn't be found too, the first available language for the component is retrieved. |
|
1059 If KNonLocalized is provided, then the non-localized component and vendor names are returned, |
|
1060 and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale. |
|
1061 If a particular language is provided, then the names are searched for this particular language |
|
1062 and its downgraded languages. If there is no name and vendor with the provided language, |
|
1063 then the function leaves with KErrScrUnsupportedLocale. |
|
1064 @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale. |
|
1065 @leave Or a system-wide error code. |
|
1066 |
|
1067 @capability ReadUserData Accessing list of components installed by the user requires ReadUserData |
|
1068 */ |
|
1069 IMPORT_C void NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale=KUnspecifiedLocale) const; |
|
1070 |
|
1071 private: |
|
1072 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1073 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1074 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1075 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1076 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1077 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1078 }; |
|
1079 |
|
1080 NONSHARABLE_CLASS(RSoftwareComponentRegistryFilesList) : public RScsClientSubsessionBase |
|
1081 /** |
|
1082 This class supports listing of files registered to a particular component. |
|
1083 */ |
|
1084 { |
|
1085 public: |
|
1086 /** |
|
1087 Default constructor of registry file list sub-session. |
|
1088 */ |
|
1089 IMPORT_C RSoftwareComponentRegistryFilesList(); |
|
1090 |
|
1091 /** |
|
1092 Closes the registry view on the SCR server. |
|
1093 */ |
|
1094 IMPORT_C void Close(); |
|
1095 |
|
1096 /** |
|
1097 Opens the list of files in the SCR owned by a given software component. |
|
1098 The SCR initializes the list by enumerating the files of the given component Id. |
|
1099 |
|
1100 If the call to this function completes successfully, then the interface client will access |
|
1101 to the enumerated files by using NextFileL/NextFileSetL interface functions. |
|
1102 |
|
1103 If a transaction owned by another session is in progress on the SCR server, the open list request |
|
1104 will be rejected. |
|
1105 |
|
1106 @param aCompReg An active SCR connection. |
|
1107 @param aComponentId The unique ID of the given software component. |
|
1108 |
|
1109 @leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress. |
|
1110 @leave Or a system-wide error code. |
|
1111 */ |
|
1112 IMPORT_C void OpenListL(const RSoftwareComponentRegistry& aCompReg, TComponentId aComponentId); |
|
1113 |
|
1114 /** |
|
1115 Retrieves the next file name from the list which has already been created in the SCR with OpenListL. |
|
1116 |
|
1117 @return Returns the next file name. If no more files can be found, returns NULL |
|
1118 @leave A system-wide error code. |
|
1119 */ |
|
1120 IMPORT_C HBufC* NextFileL() const; |
|
1121 |
|
1122 /** |
|
1123 Retrieves the set of records from a given file list which has already been created in the SCR. |
|
1124 |
|
1125 @param aMaxCount The maximum size of the files array returned. |
|
1126 @param aFileList The list of file names retrieved from the given list. |
|
1127 @leave A system-wide error code. |
|
1128 */ |
|
1129 IMPORT_C void NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const; |
|
1130 |
|
1131 private: |
|
1132 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1133 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1134 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1135 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1136 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1137 }; |
|
1138 |
|
1139 |
|
1140 NONSHARABLE_CLASS(RApplicationRegistryView) : public RScsClientSubsessionBase |
|
1141 /** |
|
1142 This class opens a sub-session to the SCR server and sends a request to create a complete Application Registration view. |
|
1143 This class can only be used by Apparc. |
|
1144 */ |
|
1145 { |
|
1146 public: |
|
1147 /** |
|
1148 Default constructor of registry view sub-session. |
|
1149 */ |
|
1150 IMPORT_C RApplicationRegistryView(); |
|
1151 |
|
1152 /** |
|
1153 Closes the registry view on the SCR server. |
|
1154 */ |
|
1155 IMPORT_C void Close(); |
|
1156 |
|
1157 |
|
1158 /** |
|
1159 Opens a complete view of Application Registration in the SCR. |
|
1160 |
|
1161 If the call to this function completes successfully, then the interface client will access |
|
1162 the enumerated records by using @see RApplicationRegistryView::GetNextApplicationRegistrationInfoL. |
|
1163 |
|
1164 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1165 will be rejected. |
|
1166 |
|
1167 N.B. After this function completes successfully, GetNextApplicationRegistrationInfoL function |
|
1168 can be used |
|
1169 |
|
1170 @param aCompReg An active SCR connection. |
|
1171 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1172 if aLocale is provided, then Application Registration Info for that locale is returned(if present in SCR). |
|
1173 If aLocale is provided but the localizable info for that locale is not present in the SCR then |
|
1174 its(aLocale) downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1175 the reg details. If it fails, then application registration info for that application is not returned. |
|
1176 If alocale is not provided i.e. KUnspecifiedLocale then it takes the current locale or its downgradables. |
|
1177 @leave A system-wide error code. |
|
1178 */ |
|
1179 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, TLanguage aLocale=KUnspecifiedLocale); |
|
1180 |
|
1181 /** |
|
1182 Opens a view of the Application Registration information for a list of AppUids. |
|
1183 |
|
1184 If the call to this function completes successfully, then the interface client will access |
|
1185 the enumerated records by using @see RApplicationRegistryView::GetNextApplicationRegistrationInfoL. |
|
1186 |
|
1187 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1188 will be rejected. |
|
1189 |
|
1190 N.B. After this function completes successfully, GetNextApplicationRegistrationInfoL function |
|
1191 can be used |
|
1192 |
|
1193 @param aCompReg An active SCR connection. |
|
1194 @param aAppRegAppUids Array of AppUids to be fetched. |
|
1195 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1196 if aLocale is provided, then Application Registration Info for that locale is returned(if present in SCR). |
|
1197 If aLocale is provided but the localizable info for that locale is not present in the SCR then |
|
1198 its(aLocale) downgraded path (@see BaflUtils::GetDowngradePathL) is used to find |
|
1199 the reg details. If it fails, then application registration info for that application is not returned. |
|
1200 If alocale is not provided i.e. KUnspecifiedLocale then it takes the current locale or its downgradables. |
|
1201 @leave A system-wide error code. |
|
1202 */ |
|
1203 |
|
1204 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, const RArray<TUid>& aAppRegAppUids, TLanguage aLocale=KUnspecifiedLocale); |
|
1205 |
|
1206 /** |
|
1207 Retrieves the next Application Registration entry from the view which has already been |
|
1208 created in the SCR with @see RApplicationRegistryView::OpenApplicationRegistrationViewL. |
|
1209 |
|
1210 @param aNoOfEntries Number of AppInfo Entries to be fetched in a single call. |
|
1211 @param aApplicationRegistration An output parameter for returning the array of CApplicationRegistrationData. |
|
1212 @leave A system-wide error code |
|
1213 */ |
|
1214 IMPORT_C void GetNextApplicationRegistrationInfoL(TInt aNoOfEntries, RPointerArray<CApplicationRegistrationData>& aApplicationRegistration) const; |
|
1215 |
|
1216 private: |
|
1217 TInt iNoOfEntries; |
|
1218 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1219 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1220 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1221 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1222 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1223 |
|
1224 }; //End of RApplicationRegistryView |
|
1225 |
|
1226 |
|
1227 |
|
1228 NONSHARABLE_CLASS(RApplicationInfoView) : public RScsClientSubsessionBase |
|
1229 /** |
|
1230 This class opens a sub-session to the SCR server and sends a request to create a AppInfo view |
|
1231 by using the supplied filter on the server side. |
|
1232 It returns information associated to a list of applications, information includes the full pathname to the application and the application's caption and short caption informtion @see TAppRegInfo, |
|
1233 however localizable specific information is retrieved only if the app has localizable information |
|
1234 matching the locale with which the subsession was opened or matching the current device language. |
|
1235 It is different from class RApplicationRegistryView in the following ways: |
|
1236 1. This subsession has the ability to filter the applciations based on certain parameters @see CAppInfoFilter. |
|
1237 2. This returns specific information contained in TAppRegInfo, however class RApplicationRegistryView returns all the information associated with an app in CApplicationRegistrationData. |
|
1238 3. Functionality provided by this class can be used by all, however class RApplicationRegistryView can be used only by AppArc. |
|
1239 |
|
1240 */ |
|
1241 { |
|
1242 public: |
|
1243 /** |
|
1244 Default constructor of AppInfo sub-session. |
|
1245 */ |
|
1246 IMPORT_C RApplicationInfoView(); |
|
1247 |
|
1248 /** |
|
1249 Closes the registry view on the SCR server. |
|
1250 */ |
|
1251 IMPORT_C void Close(); |
|
1252 |
|
1253 /** |
|
1254 Opens a view of Application Info in the SCR. |
|
1255 |
|
1256 If the call to this function completes successfully, then the interface client can access |
|
1257 the enumerated records by using @see RAppInfoView::GetNextAppInfoL. |
|
1258 |
|
1259 If a transaction owned by another session is in progress on the SCR server, the open view request |
|
1260 will be rejected. |
|
1261 |
|
1262 N.B. After this function completes successfully, GetNextAppInfoL function |
|
1263 can be used |
|
1264 |
|
1265 @param aCompReg An active SCR connection. |
|
1266 @param aAppInfoFilter Pointer to the filter object which will be used by the SCR to enumerate the Application Info. Also @see CAppInfoFilter. |
|
1267 |
|
1268 @leave A system-wide error code. |
|
1269 @capability ReadUserData, Accessing list of App Info requires ReadUserData |
|
1270 */ |
|
1271 IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, CAppInfoFilter* aAppInfoFilter = NULL,TLanguage aLocale = KUnspecifiedLocale); |
|
1272 |
|
1273 /** |
|
1274 Retrieves the next AppInfo entry from the view which has already been |
|
1275 created in the SCR with @see RSoftwareComponentRegistryView::OpenAppInfoViewL. |
|
1276 |
|
1277 @param aNoOfEntries Number of AppInfo Entries to be fetched in a single call. |
|
1278 @param aAppInfo An output parameter for returning the array of AppInfo. |
|
1279 @leave A system-wide error code. |
|
1280 */ |
|
1281 IMPORT_C void GetNextAppInfoL(TInt aNoOfEntries, RPointerArray<TAppRegInfo>& aAppInfo) const; |
|
1282 |
|
1283 private: |
|
1284 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1285 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1286 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1287 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1288 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1289 |
|
1290 };//End of RApplicationInfoView |
|
1291 |
|
1292 NONSHARABLE_CLASS(RRegistrationInfoForApplication) : public RScsClientSubsessionBase |
|
1293 /** |
|
1294 This class opens a sub-session to the SCR server with a particular application uid |
|
1295 and fetches the respective details for this particular application only. |
|
1296 */ |
|
1297 { |
|
1298 public: |
|
1299 /** |
|
1300 Default constructor of registry view sub-session. |
|
1301 */ |
|
1302 IMPORT_C RRegistrationInfoForApplication(); |
|
1303 |
|
1304 /** |
|
1305 Closes the registry view on the SCR server. |
|
1306 */ |
|
1307 IMPORT_C void Close(); |
|
1308 |
|
1309 /** |
|
1310 Creates a new subsession for the given App Uid. |
|
1311 @param aCompReg An active SCR connection. |
|
1312 @param aAppUid The Application ID to be used for further queries. |
|
1313 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1314 If KUnspecifiedLocale is provided, the current locale with its nearest language |
|
1315 (@see BaflUtils::GetEquivalentLanguageList) will be used . |
|
1316 @leave KErrNotFound If aAppUid is not found. |
|
1317 Or a system-wide error code. |
|
1318 */ |
|
1319 IMPORT_C void OpenL(const RSoftwareComponentRegistry& aCompReg,const TUid aAppUid,TLanguage aLocale=KUnspecifiedLocale); |
|
1320 |
|
1321 /** |
|
1322 Returns the list of Service Uids for the application. |
|
1323 |
|
1324 @param aServiceUids The list of Service Uids retrieved for the application. |
|
1325 @leave A system-wide error code. |
|
1326 */ |
|
1327 IMPORT_C void GetAppServicesUidsL(RArray<TUid>& aServiceUids) const; |
|
1328 |
|
1329 /** |
|
1330 Returns the Application Language(Locale) for the application. |
|
1331 This is identified after mapping the Application languages to the nearest device language. |
|
1332 @return TLanguage The Application Language(Locale) retrieved for the application. |
|
1333 @leave A system-wide error code. |
|
1334 */ |
|
1335 IMPORT_C TLanguage ApplicationLanguageL() const; |
|
1336 |
|
1337 /** |
|
1338 Returns the default Screen Number for the application. |
|
1339 |
|
1340 @return The default Screen Number retrieved for the application. |
|
1341 @leave A system-wide error code. |
|
1342 */ |
|
1343 IMPORT_C TInt DefaultScreenNumberL() const; |
|
1344 |
|
1345 /** |
|
1346 Returns the number of defined icons for the application and locale. |
|
1347 |
|
1348 @return The number of defined icons retrieved for the given locale of the application. |
|
1349 @leave A system-wide error code. |
|
1350 */ |
|
1351 IMPORT_C TInt NumberOfOwnDefinedIconsL() const; |
|
1352 |
|
1353 /** |
|
1354 Returns the array of files owned by the application . |
|
1355 |
|
1356 @param aAppOwnedFiles returns array of Files owned by the application. |
|
1357 @leave A system-wide error code. |
|
1358 */ |
|
1359 IMPORT_C void GetAppOwnedFilesL(RPointerArray<HBufC>& aAppOwnedFiles) const; |
|
1360 |
|
1361 /** |
|
1362 Returns the characteristics of the application. |
|
1363 |
|
1364 @param aApplicationCharacteristics returns capabilty of the application. |
|
1365 @leave A system-wide error code. |
|
1366 */ |
|
1367 IMPORT_C void GetAppCharacteristicsL(TApplicationCharacteristics& aApplicationCharacteristics) const; |
|
1368 /** |
|
1369 Returns the file name of the icon associated with the application. |
|
1370 |
|
1371 @param aFullFileName returns file name of the icon associated with the application. |
|
1372 @leave A system-wide error code. |
|
1373 */ |
|
1374 IMPORT_C void GetAppIconL(HBufC*& aFullFileName) const; |
|
1375 |
|
1376 /** |
|
1377 Returns the file name of the icon associated with the application, given a View Uid. |
|
1378 |
|
1379 @param aViewUid view Uid of the app |
|
1380 @param aFullFileName returns file name of the icon of the application. |
|
1381 @leave A system-wide error code. |
|
1382 */ |
|
1383 IMPORT_C void GetAppViewIconL(TUid aViewUid,HBufC*& aFullFileName) const; |
|
1384 |
|
1385 /** Returns the view information published by the application for the current locale. |
|
1386 |
|
1387 @param aAppViewInfoArray On return, the array contains information on all of the views |
|
1388 published by the specified application for the current locale. |
|
1389 @see CAppViewData |
|
1390 @leave A system-wide error code. |
|
1391 **/ |
|
1392 |
|
1393 IMPORT_C void GetAppViewsL(RPointerArray<CAppViewData>& aAppViewInfoArray) const; |
|
1394 |
|
1395 private: |
|
1396 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1397 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1398 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
|
1399 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1400 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1401 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1402 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1403 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1404 |
|
1405 }; //End of RRegistrationInfoForApplication |
|
1406 |
|
1407 NONSHARABLE_CLASS(RApplicationRegistrationInfo) : public RScsClientSubsessionBase |
|
1408 /** |
|
1409 This class opens a sub-session to the SCR server and is used to retrieve application information. |
|
1410 |
|
1411 */ |
|
1412 { |
|
1413 public: |
|
1414 /** |
|
1415 Default constructor of registry view sub-session. |
|
1416 */ |
|
1417 IMPORT_C RApplicationRegistrationInfo(); |
|
1418 |
|
1419 /** |
|
1420 Closes the registry view sub-session on the SCR server. |
|
1421 */ |
|
1422 IMPORT_C void Close(); |
|
1423 |
|
1424 /** |
|
1425 Creates a new subsession with SCR. |
|
1426 |
|
1427 Once the call to this function succeeds, the client will be able to query SCR for various information |
|
1428 such as data type and service information. |
|
1429 |
|
1430 If a transaction is owned by another session is in progress on the SCR server, then this request |
|
1431 will be rejected. |
|
1432 |
|
1433 @param aCompReg An active SCR connection. |
|
1434 @leave A system-wide error code. |
|
1435 */ |
|
1436 IMPORT_C void OpenL(const RSoftwareComponentRegistry& aCompReg); |
|
1437 |
|
1438 /** |
|
1439 Returns the App Uid for a given Service Uid that handles the specified datatype with the highest priority. |
|
1440 |
|
1441 @param aName The Data Type Text. |
|
1442 @param aServiceUid The Service Uid. |
|
1443 @return The App Uid for the given Data type and Service Uid. |
|
1444 @leave A system-wide error code. |
|
1445 */ |
|
1446 IMPORT_C TUid GetAppForDataTypeAndServiceL(const TDesC &aName,const TUid aServiceUid) const; |
|
1447 |
|
1448 /** |
|
1449 Return the App Uid for the given Data type with the highest priority. |
|
1450 |
|
1451 @param aName The Data Type Text. |
|
1452 @return The App Uid for the given Data type. |
|
1453 @leave KErrNotFound If the AppUid is not found |
|
1454 Or a system-wide error code. |
|
1455 */ |
|
1456 IMPORT_C TUid GetAppForDataTypeL(const TDesC &aName) const; |
|
1457 |
|
1458 /** |
|
1459 Return the Service Info details for the set parameters of the filter. |
|
1460 |
|
1461 @param aAppServiceInfoFilter A pointer to AppServiceInfoFilter enumerating the parameters on the basis of which serviceinfo details are to be fetched. |
|
1462 @param aAppServiceInfoArray On return contains the service info details assoicated with the parameters set in the filter. |
|
1463 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1464 If KUnspecifiedLocale is provided, the current locale with its nearest language (@see BaflUtils::GetEquivalentLanguageList) is used to find |
|
1465 the names. |
|
1466 @leave KErrNotFound If the Service Info details are not found |
|
1467 Or a system-wide error code. |
|
1468 */ |
|
1469 IMPORT_C void GetServiceInfoL(CAppServiceInfoFilter* aAppServiceInfoFilter, RPointerArray<CServiceInfo>& aAppServiceInfoArray, TLanguage aLocale=KUnspecifiedLocale) const; |
|
1470 |
|
1471 /** |
|
1472 Return the basic application information contained in TAppRegInfo for a given application present in the SCR DB. |
|
1473 |
|
1474 @param aAppUid An application's Uid. |
|
1475 @param aAppInfo An output parameter for returning the array of AppInfo. |
|
1476 @param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale. |
|
1477 If KUnspecifiedLocale is provided, the current locale with its nearest language (@see BaflUtils::GetEquivalentLanguageList) is used to find |
|
1478 the names. |
|
1479 @return ETrue if found, EFalse if application is not found |
|
1480 |
|
1481 @leave A system-wide error code. |
|
1482 */ |
|
1483 IMPORT_C TBool GetAppInfoL(TUid aAppUid, TAppRegInfo& aAppInfo, TLanguage aLocale=KUnspecifiedLocale); |
|
1484 |
|
1485 |
|
1486 private: |
|
1487 void CheckSubSessionHandleL() const; //Checks for Valid SubSessionHandle |
|
1488 TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const; |
|
1489 template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId); |
|
1490 template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize); |
|
1491 template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1492 template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs); |
|
1493 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray); |
|
1494 template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray); |
|
1495 |
|
1496 }; //End of RApplicationRegistrationInfo |
|
1497 |
|
1498 }// End of namespace Usif |
|
1499 #endif // SOFTWARECOMPONENTREGISTRY_H |
|