installationservices/swcomponentregistry/inc/scr.h
changeset 24 84a16765cd86
child 25 98b66e4fb0be
equal deleted inserted replaced
6:aba6b8104af3 24:84a16765cd86
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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 <scs/scsclient.h>
       
    35 
       
    36 namespace Usif
       
    37 	{	 
       
    38 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    39 	class CScrLogEntry;
       
    40 	class CLocalizedSoftwareTypeName;
       
    41 #endif SYMBIAN_ENABLE_SPLIT_HEADERS
       
    42 
       
    43 	NONSHARABLE_CLASS(RSoftwareComponentRegistry) : public RScsClientBase
       
    44 	/*
       
    45 		The clients of Software Component Registry (SCR) use this class to communicate 
       
    46 		with the SCR server. 
       
    47 		
       
    48 		This class provides several sets of functionality:
       
    49 		(i) Components' management, such as adding and removing components, registering files and other operations
       
    50 		(ii) Transaction management, which allows rolling back or committing a set of mutating operations together.
       
    51 		(iii) Read-only queries, such as getting component properties, or component information. 
       
    52 		
       
    53 		Operations which update or create new components in the SCR are restricted to the registered installers or layered execution
       
    54 		environments (LEE). For example, only a Java installer or the Java Virtual Machine (JVM) can create new Java components. Additionally,
       
    55 		only the same entities can change properties of or delete already existing Java components.
       
    56 		
       
    57 		Please note that mutating functions of this class can be used if any of the following conditions applies:
       
    58 		- There is no active transaction or reading operation with component or file views.
       
    59 		- A transaction exists and has been started by this connection.
       
    60 		
       
    61 		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
       
    62 		will result in KErrArgument.
       
    63 	 */
       
    64 		{
       
    65 	
       
    66 	public:
       
    67 		/**
       
    68 			Default constructor of SCR session.
       
    69 		 */
       
    70 		IMPORT_C RSoftwareComponentRegistry();
       
    71 		
       
    72 		/**
       
    73 			Opens a connection to the SCR server.
       
    74 			@return KErrNone, if the connection is successful. Otherwise, a system-wide error code.  
       
    75 		 */
       
    76 		IMPORT_C TInt Connect();
       
    77 		
       
    78 		/**
       
    79 			Closes the connection with the SCR server.
       
    80 		 */
       
    81 		IMPORT_C void Close();
       
    82 		
       
    83 		/**
       
    84 			The SCR allows its clients to perform all mutable operations related to a software component management operation
       
    85 			(e.g. install, uninstall, upgrade, and replace) within a single transaction. If a software component management operation 
       
    86 			fails or is aborted then the SCR will revert to a consistent state.  If mutating operations are not done under a transaction, 
       
    87 			it will be impossible to roll them back automatically in conjunction with other operations.
       
    88 
       
    89 			A transaction is started and persists throughout the connection until the next commit/rollback function call.
       
    90 			The transaction automatically rolls back if the server connection is closed without commit/rollback functions 
       
    91 			being invoked.  If the device unexpectedly shuts down while a transaction is in progress, the SCR server will 
       
    92 			revert to consistent state on next usage. 
       
    93 			 
       
    94 			Please note that nested/concurrent transactions are NOT supported. 
       
    95 			 
       
    96 			N.B. It is impossible to start a transaction if at least one component or file view (e.g. RSoftwareComponentRegistryView and
       
    97 			RSoftwareComponentRegistryFilesList) owned by another SCR session is in progress. 
       
    98 			
       
    99 			N.B. Transaction operations are permitted only to registered installers or execution environments.
       
   100 			
       
   101 			@leave KErrScrWriteOperationInProgress If a transaction is already in progress on the SCR server.
       
   102 			@leave KErrScrReadOperationInProgress If one or more component views or file lists owned by other SCR sessions are open.
       
   103 			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation. 
       
   104 			@leave Or system-wide error codes.
       
   105 		 */
       
   106 		IMPORT_C void CreateTransactionL();
       
   107 		
       
   108 		/**
       
   109 			Rolls back the transaction started by this session by reverting all the changes made during the transaction. 
       
   110 			
       
   111 			N.B. Transaction operations are permitted only to registered installers or execution environments.			
       
   112 			
       
   113 			@leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection.
       
   114 			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation.
       
   115 			@leave Or system-wide error codes.
       
   116 		 */ 
       
   117 		IMPORT_C void RollbackTransactionL();
       
   118 		
       
   119 		/**
       
   120 			Commits the transaction started by this session.
       
   121 			
       
   122 			N.B. Transaction operations are permitted only to registered installers or execution environments.			
       
   123 			
       
   124 			@leave KErrScrNoActiveTransaction There is no active transaction on the SCR Server started by this connection.
       
   125 			@leave KErrPermissionDenied An unauthorised process attempted a transaction operation.
       
   126 			@leave Or system-wide error codes.
       
   127 		 */
       
   128 		IMPORT_C void CommitTransactionL();
       
   129 		
       
   130 		/**
       
   131 			Adds a new software component entry to the SCR database.
       
   132 			
       
   133 			If the component and vendor names of the software component being installed are NOT localizable, 
       
   134 			then this API should be used to add a new component.
       
   135 			
       
   136 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   137 				
       
   138 			@param aName The non-localizable name of the component being added.
       
   139 			@param aVendor The non-localizable vendor name of the component being added.
       
   140 			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   141 			@param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component 
       
   142 						that is unique within the context of that software type. The global component id might be 
       
   143 						the package UID for native applications or the MIDlet name/vendor pair for Java MIDLets, etc. 
       
   144 						Note that if KNullDesC is provided, the global identifier will be empty.
       
   145 			@param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType
       
   146 			@return  The component ID of the newly added entry.
       
   147 			
       
   148 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   149 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   150 			@leave Or system-wide error codes.
       
   151 		 */
       
   152 		IMPORT_C TComponentId AddComponentL(const TDesC& aName, const TDesC& aVendor, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall);
       
   153 		
       
   154 		/**
       
   155 			Adds a new software component entry to the SCR database.
       
   156 			If the component and vendor names of the software component being installed are localizable,
       
   157 			then this API should be used to add a new component.
       
   158 			
       
   159 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   160 					
       
   161 			@param aComponentInfo The list of localizable component information (such as vendor and name) with one entry per each supported locale.
       
   162 			@param aUniqueSwTypeName The non-localized, unique software type name, e.g. "Native".
       
   163 			@param aGlobalId A named, nullable, case-sensitive string used to specify a deterministic identifier for the component 
       
   164 							that is unique within the context of that software type. The global component id would be 
       
   165 							the package UID for native applications or the midlet-names for Java, etc. 
       
   166 							Note that if KNullDesC is provided, the global identifier will be empty.
       
   167 			@param aCompOpType The type of the component operation. Typical operations are install or upgrade. @see Usif::TScrComponentOperationType
       
   168 			@return  The component ID of the newly added entry. 
       
   169 			
       
   170 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   171 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   172 			@leave Or system-wide error codes.
       
   173 		 */
       
   174 		IMPORT_C TComponentId AddComponentL(const RPointerArray<CLocalizableComponentInfo>& aComponentInfo, const TDesC& aUniqueSwTypeName, const TDesC* aGlobalId=NULL, TScrComponentOperationType aCompOpType=EScrCompInstall);
       
   175 		
       
   176 		/** 
       
   177 			Adds a new dependency between two software components (supplier and dependant) of any type.
       
   178 			For example, if VNC Viewer is ported to the Symbian OS using the POSIX library, VNC Viewer
       
   179 			depends on the POSIX library. Here, VNC Viewer is dependant, whereas the POSIX library is supplier. 
       
   180 			
       
   181 			A dependency exists on global component ids, since a dependency is a global relation between 
       
   182 			two components, regardless to their status on a particular system. While local component ids 
       
   183 			(@see TComponentId) are private to a particular device and can change for the same global id 
       
   184 			in the case of upgrades or reinstalls, global component ids are unique and equal for the same 
       
   185 			component on any device.
       
   186 			
       
   187 			Since a dependency is defined using global ids, it can be added even if the participant
       
   188 			components don't exist in the system. 
       
   189 			N.B. A duplicate dependency is not allowed. 
       
   190 					
       
   191 			@param aSupplierVerCompId The versioned software component identifier of the supplier component. 
       
   192 			@param aDependantGlobalCompId The global software component identifier of the dependant component.
       
   193 			@leave KErrAlreadyExists If the dependency is already defined in the SCR.
       
   194 			@leave Or other system-wide error codes.
       
   195 		 */
       
   196 		IMPORT_C void AddComponentDependencyL(const CVersionedComponentId& aSupplierVerCompId, const CGlobalComponentId& aDependantGlobalCompId);
       
   197 
       
   198 		/**
       
   199 			Adds a new named 8-bit descriptor property to the registry for a given software component and locale. 
       
   200 			If the property already exits, then its value is updated.
       
   201 						
       
   202 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   203 			 	
       
   204 			@param aComponentId The unique ID of the given software component.
       
   205 			@param aName The name of the software component property.
       
   206 			@param aValue The value of the software component property.
       
   207 			
       
   208 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   209 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   210 			@leave Or system-wide error codes. 
       
   211 		 */
       
   212 		
       
   213 		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC8& aValue);		
       
   214 		
       
   215 		/**
       
   216 			Adds a new named localizable 16-bit string property to the registry for a given software component and locale. 
       
   217 			If the property already exists, then its value is updated.
       
   218 			
       
   219 			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.
       
   220 			N.B. This API should not be used for raw binary data. For binary data, the TDesC8 variant of SetComponentProperty should be used instead.
       
   221 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   222 			 	
       
   223 			@param aComponentId The unique ID of the given software component.
       
   224 			@param aName The name of the software component property.
       
   225 			@param aValue The value of the software component property.
       
   226 			@param aLocale The language code of the property. The default value is non-localized property.
       
   227 			
       
   228 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   229 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   230 			@leave Or system-wide error codes. 
       
   231 		 */
       
   232 		
       
   233 		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, const TDesC& aValue, TLanguage aLocale=KNonLocalized);
       
   234 		
       
   235 		/**
       
   236 			Adds a new named numeric property to the registry for a given software component. If the property already
       
   237 			exits, then its value is updated. Signed values from -2^63+1 to +2^63-1 are supported. 
       
   238 			
       
   239 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   240 					 	
       
   241 			@param aComponentId The unique ID of the given software component.
       
   242 			@param aName The name of the software component property.
       
   243 			@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.
       
   244 			
       
   245 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   246 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   247 			@leave Or system-wide error codes.
       
   248 	     */
       
   249 		IMPORT_C void SetComponentPropertyL(TComponentId aComponentId, const TDesC& aName, TInt64 aValue);
       
   250 						
       
   251 		/**
       
   252 			Registers a file to a given software component.
       
   253 			
       
   254 			Before registration, tests whether the provided filename is syntactically correct. 
       
   255 			For more information about the syntax, check @see RFs::IsValidName.
       
   256 			
       
   257 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   258 			    
       
   259 			@param aComponentId The unique ID of the given software component.
       
   260 			@param aFileName The fully qualified name of the file being registered.
       
   261 			@param aConsiderForInstalledDrives This parameter specifies whether the list of installed drives ( @see CComponentEntry::InstalledDrives) should be maintained as a result of this operation. 
       
   262 			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)
       
   263 			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.
       
   264 			
       
   265 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   266 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   267 			@leave KErrArgument If the file name is invalid or is not fully qualified
       
   268 			@leave Or system-wide error codes.
       
   269 		 */	
       
   270 		IMPORT_C void RegisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName, TBool aConsiderForInstalledDrives = ETrue); 
       
   271 		
       
   272 		/**
       
   273 			Adds a new named 8-bit descriptor property to the registry for a given file and software component. If the property already
       
   274 			exits, then its value is updated.
       
   275 			
       
   276 			A file property allows adding custom information about a component’s file ownership, for example, a native installer 
       
   277 			may associate custom operations to be done on uninstall for a particular file.
       
   278 			
       
   279 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   280 			
       
   281 			@param aComponentId The unique ID of the given software component.
       
   282 			@param aFileName  The fully qualified name of the file.
       
   283 			@param aPropName  The name of the file property being added.
       
   284 			@param aPropValue The value of the file property being set.
       
   285 			
       
   286 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   287 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   288 			@leave Or system-wide error codes.
       
   289 		*/
       
   290 		IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, const TDesC8& aPropValue);
       
   291 		
       
   292 		/**
       
   293 			Adds a new named numeric property to the registry for a given file and software component. 
       
   294 			If the property already exists, it is just updated.
       
   295 			
       
   296 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   297 				
       
   298 			@param aComponentId The unique ID of the given software component.	 	
       
   299 			@param aFileName  The fully qualified name of the file.
       
   300 			@param aPropName  The name of the file property being added.
       
   301 			@param aPropValue The value of the file property being added.
       
   302 			
       
   303 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   304 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   305 			@leave Or system-wide error codes.
       
   306 		 */
       
   307 		IMPORT_C void SetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName, TInt aPropValue);
       
   308 		
       
   309 		/**
       
   310 			Adds a new localized component name for a given software component. 
       
   311 			If the localized name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL),
       
   312 			then it is updated. 
       
   313 			If no locale is specified, then the default component name is updated (or added if no default name exists).
       
   314 			
       
   315 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   316 			
       
   317 			@param aComponentId The unique ID of the given software component.
       
   318 			@param aName The new value of the component name for a given locale.
       
   319 			@param aLocale The language code of the requested locale. The default value is non-localized.
       
   320 			
       
   321 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   322 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   323 			@leave Or system-wide error codes.
       
   324 		*/
       
   325 		IMPORT_C void SetComponentNameL(TComponentId aComponentId, const TDesC& aName, TLanguage aLocale=KNonLocalized);
       
   326 		
       
   327 		/**
       
   328 			Adds a new localized component vendor for a given software component. 
       
   329 			If the localized vendor name already exists for the specified locale, or one of the locales in its downgrade path (@see BaflUtils::GetDowngradePathL),
       
   330 			then it is updated. 
       
   331 			If no locale is specified, then the default vendor name is updated (or added if no default vendor name exists).
       
   332 			
       
   333 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   334 						
       
   335 			@param aComponentId The unique ID of the given software component.
       
   336 			@param aVendor The new value of the vendor name for a given locale.
       
   337 			@param aLocale The language code of the requested locale. The default value is non-localized.
       
   338 			
       
   339 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   340 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   341 			@leave Or system-wide error codes.
       
   342 	    */
       
   343 		IMPORT_C void SetVendorNameL(TComponentId aComponentId, const TDesC& aVendor, TLanguage aLocale=KNonLocalized);
       
   344 		
       
   345 		/**
       
   346 			Updates the version of a given software component.
       
   347 			
       
   348 			N.B. The default value of component version is NULL.
       
   349 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   350 						
       
   351 			@param aComponentId The unique ID of the given software component.
       
   352 			@param aVersion The new value of the version attribute.
       
   353 			
       
   354 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   355 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   356 			@leave Or system-wide error codes.
       
   357 		 */
       
   358 		IMPORT_C void SetComponentVersionL(TComponentId aComponentId, const TDesC& aVersion);
       
   359 		
       
   360 		/**
       
   361 			Sets whether the component is removable.
       
   362 			When a component is added, this is set to True by default (i.e. all non-ROM components are removable unless stated otherwise).
       
   363 			
       
   364 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   365 			 
       
   366 			@param aComponentId The unique ID of the given software component.
       
   367 			@param aValue ETrue to set component as removable. EFalse to set component as unremovable.
       
   368 			
       
   369 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   370 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   371 			@leave Or system-wide error codes.
       
   372 			
       
   373 			@capability AllFiles Creating non-removable components requires AllFiles.
       
   374 		 */
       
   375 		IMPORT_C void SetIsComponentRemovableL(TComponentId aComponentId, TBool aValue);
       
   376 		
       
   377 		/**
       
   378 			Sets whether the component is DRM protected.
       
   379 			When a component is added, this is set to False by default (i.e. all components are non-DRM protected unless stated otherwise).
       
   380 					
       
   381 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   382 					 
       
   383 			@param aComponentId The unique ID of the given software component.
       
   384 			@param aValue ETrue to set component as DRM protected. EFalse to set component as non-DRM protected.
       
   385 					
       
   386 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   387 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   388 			@leave Or system-wide error codes.
       
   389 					
       
   390 			@capability WriteDeviceData Creating DRM protected components requires WriteDeviceData.
       
   391 		 */
       
   392 		IMPORT_C void SetIsComponentDrmProtectedL(TComponentId aComponentId, TBool aValue);
       
   393 		
       
   394 		/**
       
   395 			Sets the hidden attribute of a component indicating that the component shouldn't be displayed in the list of installed components.
       
   396 			When a component is added, this is set to False by default (i.e. all components are visible unless stated otherwise).
       
   397 			
       
   398 			N.B. SCR does not enforce usage of this flag, and application managers may ignore it, e.g. in an admin view.
       
   399 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   400 							 
       
   401 			@param aComponentId The unique ID of the given software component.
       
   402 			@param aValue ETrue to set component as hidden. EFalse to set component as non-hidden.
       
   403 							
       
   404 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   405 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   406 			@leave Or system-wide error codes.
       
   407 							
       
   408 			@capability WriteDeviceData Creating hidden components requires WriteDeviceData.
       
   409 		 */
       
   410 		IMPORT_C void SetIsComponentHiddenL(TComponentId aComponentId, TBool aValue);
       
   411 		
       
   412 		/**
       
   413 			Sets the Known-Revoked attribute of a component. If this attribute is true, then it indicates 
       
   414 			a revocation check was performed during or after the installation and the component
       
   415 			was found to be revoked. When a component is added, this is set to False by default.
       
   416 							
       
   417 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   418 							 
       
   419 			@param aComponentId The unique ID of the given software component.
       
   420 			@param aValue ETrue to set component as known-revoked. EFalse to set component as known-unrevoked.
       
   421 							
       
   422 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   423 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   424 			@leave Or system-wide error codes.
       
   425 							
       
   426 			@capability WriteDeviceData Creating known-revoked components requires WriteDeviceData.
       
   427 		 */
       
   428 		IMPORT_C void SetIsComponentKnownRevokedL(TComponentId aComponentId, TBool aValue);
       
   429 		
       
   430 		/**
       
   431 			Sets the Origin-Verified attribute of a component. If this attribute is true, then it indicates that 
       
   432 			the installer has verified the originator of the software component by using appropriate checking mechanisms (e.g. certificates). 
       
   433 			If the attribute is false, it means that such a verification has not been performed, or that the installer does not support origin verification. 
       
   434 			When a component is added, this is set to False by default.
       
   435 							
       
   436 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   437 							 
       
   438 			@param aComponentId The unique ID of the given software component.
       
   439 			@param aValue ETrue to set component as origin-verified EFalse to set component as origin-non-verified.
       
   440 							
       
   441 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   442 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   443 			@leave Or system-wide error codes.
       
   444 							
       
   445 			@capability WriteDeviceData Creating origin verified components requires WriteDeviceData.
       
   446 		 */
       
   447 		IMPORT_C void SetIsComponentOriginVerifiedL(TComponentId aComponentId, TBool aValue);
       
   448 
       
   449 		/**
       
   450 			Sets the total size in bytes of the files owned by a given component. Note that SCR doesn't maintain this value.
       
   451 			
       
   452 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   453 									 	
       
   454 			@param aComponentId The unique ID of the given software component.
       
   455 			@param aComponentSizeInBytes The size of the component's files in bytes.
       
   456 			
       
   457 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   458 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   459 			@leave Or system-wide error codes.
       
   460 		 */
       
   461 		IMPORT_C void SetComponentSizeL(TComponentId aComponentId, TInt64 aComponentSizeInBytes);
       
   462 		
       
   463 		/**
       
   464 			Deletes a specific property entry of a given software component.
       
   465 			
       
   466 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   467 			N.B. If the component or property doesn't exist, the function completes successfully.
       
   468 			N.B. If the property is specified for multiple locales, it is deleted for all of them.
       
   469 			 	
       
   470 			@param aComponentId The unique ID of the given software component.
       
   471 			@param aPropName The name of the component property being deleted.
       
   472 			
       
   473 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   474 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   475 			@leave Or system-wide error codes.
       
   476 	     */
       
   477 		IMPORT_C void DeleteComponentPropertyL(TComponentId aComponentId, const TDesC& aPropName);
       
   478 		
       
   479 		/** 
       
   480 			Deletes a specific file property entry for a given file and software component.
       
   481 						
       
   482 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   483 			
       
   484 			@param aComponentId The unique ID of the given software component.
       
   485 			@param aFileName The fully qualified name of the file.
       
   486 			@param aPropName The name of the file property being deleted.
       
   487 			
       
   488 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   489 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   490 			@leave Or system-wide error codes.
       
   491 		 */
       
   492 		IMPORT_C void DeleteFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropName);
       
   493 		
       
   494 		/**
       
   495 			Unregisters a specific file entry from a given software component.
       
   496 			Note that all associated file properties for the same component are removed as well.
       
   497 			
       
   498 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   499 			N.B. This operation also deletes all the corresponding file properties.
       
   500 			  	
       
   501 			@param aComponentId The unique ID of the given software component.
       
   502 			@param aFileName The fully qualified name of the file being deregistered.
       
   503 			
       
   504 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   505 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   506 			@leave Or system-wide error codes.
       
   507 	     */
       
   508 		IMPORT_C void UnregisterComponentFileL(TComponentId aComponentId, const TDesC& aFileName);
       
   509 		
       
   510 		/**
       
   511 			Deletes a sofware component entry and all its data from the registry, including properties and file registration records.
       
   512 			
       
   513 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   514 			N.B. If the component doesn't exist, the function completes successfully.
       
   515 				
       
   516 			@param aComponentId The unique ID of the given software component.
       
   517 			
       
   518 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   519 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   520 			@leave Or system-wide error codes.
       
   521 		*/
       
   522 		IMPORT_C void DeleteComponentL(TComponentId aComponentId);
       
   523 		
       
   524 		/** 
       
   525 			Deletes an existing dependency between two software components (supplier and dependant) of any type.
       
   526 			(@see RSoftwareComponentRegistry::AddComponentDependencyL for more information about component dependency.)
       
   527 			
       
   528 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   529 			N.B. If the dependency doesn't exist, the function completes successfully.
       
   530 							
       
   531 			@param aSupplierGlobalCompId The global software component identifier of the supplier component. 
       
   532 			@param aDependantGlobalCompId The global software component identifier of the dependant component.
       
   533 			@leave System-wide error codes.
       
   534 		 */
       
   535 		IMPORT_C void DeleteComponentDependencyL(const CGlobalComponentId& aSupplierGlobalCompId, const CGlobalComponentId& aDependantGlobalCompId);
       
   536 		
       
   537 		/**
       
   538 			Retrieves a specific software component entry with the component name and vendor for a particular locale. 
       
   539 							
       
   540 			@param aComponentId The unique ID of the given software component.
       
   541 			@param aEntry An output parameter for returning information for the component matching the given id. 
       
   542 				          If no such component is present, this parameter remains unchanged.
       
   543 			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
       
   544 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
       
   545 						   the names. If it fails, then the non-localized names are returned. If non-localized versions
       
   546 						   couldn't be found too, the first available language for the component is retrieved.
       
   547 						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
       
   548 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
       
   549 						   If a particular language is provided, then the names are searched for this particular language
       
   550 						   and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale.
       
   551 		    @return If the requested component is found, then ETrue is returned. Otherwise, EFalse.
       
   552 		    @leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
       
   553 		    @leave System-wide error codes.
       
   554 	     */
       
   555 		IMPORT_C TBool GetComponentL(TComponentId aComponentId, CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const;							
       
   556 		
       
   557 		/**
       
   558 			Retrieves the localized information from ComponentLocalizable table for a given component id.
       
   559 							
       
   560 			@param aComponentId The unique ID of the given software component.
       
   561 			@param aCompLocalizedInfoArray An output parameter for returning localized information for a given component id. 
       
   562 			@leave System-wide error codes.
       
   563 			@capability  ReadUserData Accessing a component's localized information requires ReadUserData
       
   564 		*/
       
   565 		IMPORT_C void GetComponentLocalizedInfoL(TComponentId aComponentId, RPointerArray<CLocalizableComponentInfo>& aCompLocalizedInfoArray) const;
       
   566 		
       
   567 		/**
       
   568 			Retrieves the array of all software component IDs in the SCR, optionally matching a particular filter.
       
   569 				
       
   570 			@param aComponentIdList The component Id list of all sofwtare components.
       
   571 			@param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components.
       
   572 						   If no filter is provided, all software components in the SCR are listed.
       
   573 		
       
   574 			@leave System-wide error codes.
       
   575 
       
   576 			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
       
   577 		 */
       
   578 		IMPORT_C void GetComponentIdsL(RArray<TComponentId>& aComponentIdList, CComponentFilter* aFilter=NULL) const;
       
   579 		
       
   580 		/**
       
   581 			Retrieves the local component id of a given global component id.
       
   582 			
       
   583 			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
       
   584 			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   585 			@return The local unique component id.
       
   586 			
       
   587 			@leave KErrNotFound Software component with this global id is not present in the system.
       
   588 			@leave System-wide error codes.
       
   589 		 */
       
   590 		IMPORT_C TComponentId GetComponentIdL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName) const;
       
   591 					
       
   592 		/**
       
   593 			Retrieves a specific software component entry with the specified global id and software type name for a given locale. 
       
   594 							
       
   595 			@param aGlobalIdName A deterministic identifier for the component that is unique within the context of that software type.
       
   596 			@param aUniqueSwTypeName The non-localized, unique software type name, such as @see Usif::KSoftwareTypeNative and @see Usif::KSoftwareTypeJava.
       
   597 			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
       
   598 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
       
   599 						   the names. If it fails, then the non-localized names are returned. If non-localized versions
       
   600 						   couldn't be found too, the first available language for the component is retrieved.
       
   601 						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
       
   602 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
       
   603 						   If a particular language is provided, then the names are searched for this particular language
       
   604 						   and its downgraded languages. If there is no name and vendor with the provided language, then the function leaves with KErrScrUnsupportedLocale.
       
   605 		    @return aEntry A pointer to the component entry object for the given global component id. 
       
   606 		    
       
   607 		    @leave KErrScrUnsupportedLocale The component requested with the global id couldn't be found for the specified locale.
       
   608 		    @leave System-wide error codes.
       
   609 		 */
       
   610 		IMPORT_C CComponentEntry* GetComponentL(const TDesC& aGlobalIdName, const TDesC& aUniqueSwTypeName, TLanguage aLocale=KUnspecifiedLocale) const;
       
   611 		
       
   612 		/**
       
   613 			Retrieves the list of supplier components with the range of versions on which a given 
       
   614 			component depends. The range of versions here indicates specific versions of the returned 
       
   615 			components (suppliers) which the given component (dependant) depend on.
       
   616 
       
   617 			@param aDependantGlobalId The global component id of the given software component.
       
   618 			@param aSupplierList The versioned component id list of supplier components for the given dependant component.
       
   619 			@leave System-wide error codes.
       
   620 		 */
       
   621 		IMPORT_C void GetSupplierComponentsL(const CGlobalComponentId& aDependantGlobalId, RPointerArray<CVersionedComponentId>& aSupplierList) const;
       
   622 				
       
   623 		/**
       
   624 			Retrieves the list of components (dependants) with the range of versions that depend on 
       
   625 			a given component (supplier). The range of versions here indicates specific versions of 
       
   626 			the given component which the returned components depend on.
       
   627 					
       
   628 			@param aSupplierGlobalId The global component id of the given software component.
       
   629 			@param aDependantList The versioned component id list of dependant components for the given supplier component.
       
   630 			@leave System-wide error codes.
       
   631 		 */
       
   632 		IMPORT_C void GetDependantComponentsL(const CGlobalComponentId& aSupplierGlobalId, RPointerArray<CVersionedComponentId>& aDependantList) const;
       
   633 
       
   634 		/**
       
   635 			Retrieves the array of properties owned by a specific file registered to a given component.
       
   636 			
       
   637 			@param aComponentId The unique ID of the given software component.	
       
   638 			@param aFileName The fully qualified name of the file.
       
   639 			@param aProperties An output parameter for returning the list of properties owned by the given file.
       
   640 			@leave System-wide error codes.
       
   641 		 */
       
   642 		IMPORT_C void GetFilePropertiesL(TComponentId aComponentId, const TDesC& aFileName, RPointerArray<CPropertyEntry>& aProperties) const;
       
   643 		
       
   644 		/**
       
   645 			Retrieves a specified property entry for a given file and software component.
       
   646 					
       
   647 			@param aComponentId The unique ID of the given software component.
       
   648 			@param aFileName The fully qualified name of the file.
       
   649 			@param aPropertyName The name of the requested property.
       
   650 			@return Returns a pointer to the property object containing the requested file property.
       
   651 				    The ownership is transferred. If the property couldn't be found, then NULL is returned.
       
   652 			@leave System-wide error codes.	    
       
   653 		 */
       
   654 		IMPORT_C CPropertyEntry* GetFilePropertyL(TComponentId aComponentId, const TDesC& aFileName, const TDesC& aPropertyName) const;
       
   655 		
       
   656 		/**
       
   657 			Retrieves the number of files registered by a component.
       
   658 					
       
   659 			@param aComponentId The unique ID of the given software component.
       
   660 			@return The number of registered files.
       
   661 			@leave System-wide error codes.	    
       
   662 		 */
       
   663 		IMPORT_C TUint GetComponentFilesCountL(TComponentId aComponentId) const;		
       
   664 		
       
   665 		/**
       
   666 			Retrieves the set of components which register a given file.
       
   667 				
       
   668 			@param aFileName The fully qualified name of the file.
       
   669 			@param aComponents An output parameter for returning for the list of components which own the given file.
       
   670 			@leave System-wide error codes.	
       
   671 		 */ 
       
   672 		IMPORT_C void GetComponentsL(const TDesC& aFileName, RArray<TComponentId>& aComponents) const;
       
   673 		
       
   674 		/**
       
   675 			Retrieves a specified property for a given component, property name and locale. 
       
   676 			
       
   677 			When searching for localizable properties, it is possible that the requested language 
       
   678 			variant is not available, however, there may be other language variants that are acceptable.
       
   679 			Therefore, a language downgrade path that starts with the language associated with the requested 
       
   680 			locale and ends with the least best match is first created. Then the downgrade path is used to
       
   681 			search for a language specific property and the first match is returned to the user.
       
   682 	
       
   683 			@param aComponentId The unique ID of the given software component.
       
   684 			@param aPropertyName The name of the component property.
       
   685 			@param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale.
       
   686 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used 
       
   687 						   as explained above to find the property.  If it fails, then the non-localized version is looked up.
       
   688 						   If non-localized version couldn't be found too, the function leaves with KErrNotFound.
       
   689 						   If KNonLocalized is provided, then the non-localized version of the property is returned,
       
   690 						   If non-localized version doesn't exist, then the function will leave with KErrNotFound.
       
   691 						   If a particular language is provided, then the property is searched for this particular language
       
   692 						   and its downgraded languages. If there is no property with the provided language, then the function 
       
   693 						   leaves with KErrNotFound.
       
   694 			@return Returns a pointer to the property object containing the requested component property entry.
       
   695 					The ownership is transferred. If the property couldn't be found, then NULL is returned.
       
   696 			@leave System-wide error codes.
       
   697 		 */
       
   698 		IMPORT_C CPropertyEntry* GetComponentPropertyL(TComponentId aComponentId, const TDesC& aPropertyName, TLanguage aLocale=KUnspecifiedLocale) const;
       
   699 		
       
   700 		/**
       
   701 			Retrieves the set of properties for a particular locale belonging to the given component.
       
   702 			if no locale is specified, then the current locale is used as default.
       
   703 			
       
   704 			For more information about searching for localized properties look at @see RSoftwareComponentRegistry::GetComponentPropertyL.
       
   705 				
       
   706 			@param aComponentId The unique ID of the given software component.
       
   707 			@param aProperties An output parameter for returning the list of properties which owned by the given component.
       
   708 			@param aLocale The optional language code of the requested locale. The default value is KUnspecifiedLocale.
       
   709 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used 
       
   710 						   as explained above to find properties.  If it fails, then the non-localized version is looked up.
       
   711 						   If non-localized versions couldn't be found too, the function leaves with KErrNotFound.
       
   712 						   If KNonLocalized is provided, then the non-localized versions of properties are returned,
       
   713 						   If non-localized versions don't exist, then the function will leave with KErrNotFound.
       
   714 						   If a particular language is provided, then the properties are searched for this particular language
       
   715 						   and its downgraded languages. Otherwise, the function leaves with KErrNotFound.
       
   716 			@leave System-wide error codes.
       
   717 		*/
       
   718 		IMPORT_C void GetComponentPropertiesL(TComponentId aComponentId, RPointerArray<CPropertyEntry>& aProperties, TLanguage aLocale=KUnspecifiedLocale) const;
       
   719 				
       
   720 		/**
       
   721 			Returns whether all drives registered for the given component are present.
       
   722 			The list of drives is derived using the set of files registered by the component.
       
   723 			
       
   724 			N.B. For removable media, this method does NOT check that the actual media matches the one which contains the component's files.
       
   725 			It just verifies that any media is present in the drive.
       
   726 			
       
   727 			@param aComponentId The unique ID of the software component.
       
   728 			@return ETrue, if all drives registered for the component are present; otherwise EFalse.
       
   729 			@publishedPartner
       
   730 		 */
       
   731 		IMPORT_C TBool IsMediaPresentL(TComponentId aComponentId) const;
       
   732 		
       
   733 		/** 
       
   734 			Sets the SCOMO state of a given component.
       
   735 			
       
   736 			@param aComponentId The unique ID of the given software component. 	
       
   737 			@param aScomoState The new SCOMO state of the component.
       
   738 			@leave System-wide error codes.
       
   739 		 */
       
   740 		IMPORT_C void SetScomoStateL(TComponentId aComponentId, TScomoState aScomoState) const;
       
   741 		
       
   742 		/** 
       
   743 			Retrieves the UID of the plug-in which is responsible for a given MIME type.
       
   744 					
       
   745 			@param aMimeType The MIME type. 	
       
   746 			@return The UID of the plug-in.
       
   747 			@leave KErrSifUnsupportedSoftwareType There is no corresponding plug-in for this MIME type.
       
   748 			@leave System-wide error codes.			
       
   749 			@internalTechnology
       
   750 		 */
       
   751 		IMPORT_C TUid GetPluginUidL(const TDesC& aMimeType) const;
       
   752 		
       
   753 		/** 
       
   754 			Retrieves the UID of the plug-in that installed a given component.
       
   755 							
       
   756 			@param aComponentId Component's local identifier. 	
       
   757 			@return The UID of the plug-in.
       
   758 			@leave System-wide error codes.
       
   759 			@internalTechnology
       
   760 		 */
       
   761 		IMPORT_C TUid GetPluginUidL(TComponentId aComponentId) const;
       
   762 		
       
   763 		/**
       
   764 			Add a new software type name to the SCR database.
       
   765 			
       
   766 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   767 			
       
   768 			@param aUniqueSwTypeName Non-localized unique software type name.
       
   769 			@param aSifPluginUid The SIF plug-in UID of the installer which is responsible for installing components with this software type
       
   770 			@param aInstallerSecureId The secure id of the installer which is responsible for installing components with this software type
       
   771 			@param aExecutionLayerSecureId The secure id of the installer's execution layer which refers to an executable that interprets or  
       
   772 			                               executes byte code for programs written in a high level language Java, Python, Widgets, etc.
       
   773 			                               This paramater is optional. If it doesn't exist, it should be equal to the installer's secure id.                                
       
   774 			@param aMimeTypes The list of MIME types associated with this software type.
       
   775 			@param aLocalizedSwTypeNames A pointer to the list of optional localized software type names.
       
   776 			@leave System-wide error codes.
       
   777 			@internalTechnology
       
   778 		 */
       
   779 		IMPORT_C void AddSoftwareTypeL(const TDesC& aUniqueSwTypeName, TUid aSifPluginUid, TSecureId aInstallerSecureId, TSecureId aExecutionLayerSecureId, const RPointerArray<HBufC>& aMimeTypes, const RPointerArray<CLocalizedSoftwareTypeName>* aLocalizedSwTypeNames = NULL);
       
   780 		
       
   781 		/**
       
   782 			Deletes a sofware type name entry and all its mime types from the registry.
       
   783 			
       
   784 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   785 			N.B. If the software type doesn't exist, the function completes successfully.
       
   786 			
       
   787 			@param aUniqueSwTypeName Non-localized unique software type name.
       
   788 			@param aDeletedMimeTypes An output parameter, where the MIME types deleted from SCR as a result of this operation will be stored.
       
   789 			@leave System-wide error codes.
       
   790 			@internalTechnology
       
   791 		 */
       
   792 		IMPORT_C void DeleteSoftwareTypeL(const TDesC& aUniqueSwTypeName, RPointerArray<HBufC>& aDeletedMimeTypes);
       
   793 	
       
   794 		/**
       
   795 			Returns whether the software installer of a given component is present.
       
   796 					
       
   797 			@param aComponentId The unique ID of the given software component. 
       
   798 			@return ETrue, if the software installer of the given component is present; otherwise EFalse.
       
   799 			@leave System-wide error codes.
       
   800 		 */
       
   801 		IMPORT_C TBool IsComponentOrphanedL(TComponentId aComponentId);
       
   802 		
       
   803 		 /**
       
   804 			Retrieve the log entries recorded by SCR. A log entry (@see Usif::CScrLogEntry) contains information 
       
   805 			about the component operation (installation, uninstallation or upgrade) made by SCR.
       
   806 		
       
   807 			@param aLogEntries The caller supplies an empty array of CScrLogEntry which is loaded
       
   808 					with the log entries from the SCR. If the SCR Log is empty then the array count 
       
   809 					will be zero. The caller is responsible for deleting all memory.
       
   810 			@param aUniqueSwTypeName Optional parameter for non-localized unique software type name.
       
   811 									 If provided, only the log entries of the given software type are returned.
       
   812 			@leave System-wide error codes.
       
   813 			@capability ReadUserData
       
   814 		 */
       
   815 		IMPORT_C void RetrieveLogEntriesL(RPointerArray<CScrLogEntry>& aLogEntries, const TDesC* aUniqueSwTypeName=NULL) const;
       
   816 		
       
   817 		/**
       
   818 			Compares two generic, arbitrary length, dotted decimal version numbers. e.g. "1.2.32.4" < "1.3"
       
   819 			
       
   820 			@param aVersionLeft The version on the left side of the equality.
       
   821 			@param aVersionRight The version on the right side of the equality.
       
   822 			@return A positive value indicates that the left version is greater than the right version. 
       
   823 				    A negative value indicates that the left version is less than the right version. 
       
   824 				    Zero indicates that the left and right versions are equal. 
       
   825 			@leave System-wide error codes.
       
   826 		 */
       
   827 		IMPORT_C static TInt CompareVersionsL(const TDesC& aVersionLeft, const TDesC& aVersionRight);
       
   828 
       
   829 		/**
       
   830 			Returns whether the component is on a read-only drive.
       
   831 
       
   832 			@param aComponentId The unique ID of the software component. 
       
   833 			@return ETrue, if the component is present on a read only drive; otherwise EFalse.
       
   834 			@leave System-wide error codes.
       
   835 		 */
       
   836 		IMPORT_C TBool IsComponentOnReadOnlyDriveL(TComponentId aComponentId) const;
       
   837 		
       
   838 		/**
       
   839 			Returns whether the component is present on the device. As a component might be 
       
   840 			installed to a media card which was later removed, not all components registered are 
       
   841 			necessarily present. Please note that IsMediaPresentL does not check whether the media 
       
   842 			card containing the component is present. 
       
   843 			
       
   844 			N.B. This function relies on values reported by installers, and thus, component presence 
       
   845 			might not be updated immediately when a media card is replaced.
       
   846 			
       
   847 			@param aComponentId The unique ID of the component.
       
   848 			@return ETrue, if the component is present; otherwise EFalse.
       
   849 			
       
   850 			@leave System-wide error codes.
       
   851 		 */
       
   852 		IMPORT_C TBool IsComponentPresentL(TComponentId aComponentId) const;
       
   853 		
       
   854 		/**
       
   855 			Sets whether the software component is present fully after being installed on to a 
       
   856 			removable drive.
       
   857 
       
   858 			N.B. This is a mutating function. Please see @see Usif::RSoftwareComponentRegistry.
       
   859 					 
       
   860 			@param aComponentId The unique ID of the given software component.
       
   861 			@param aValue ETrue to set component as present. EFalse to set component as not present.
       
   862 			
       
   863 			@leave KErrScrWriteOperationInProgress If a transaction started by another session is in progress.
       
   864 			@leave KErrScrReadOperationInProgress If a read operation with component or file views is in progress.
       
   865 			@leave Or system-wide error codes.
       
   866 		 */
       
   867 		IMPORT_C void SetIsComponentPresentL(TComponentId aComponentId, TBool aValue);
       
   868 		
       
   869 		/**
       
   870 			Gets the installed supported language ID's array.
       
   871 
       
   872 			@param aComponentId The unique ID of the given software component.
       
   873 			@param aMatchingSupportedLanguages RArray containing the list of installed supported languages
       
   874 			
       
   875 			@leave Or system-wide error codes.
       
   876 			@capability  ReadUserData Accessing the installed supported language ID's array requires ReadUserData
       
   877 		 */
       
   878 		IMPORT_C void GetComponentSupportedLocalesListL(TComponentId aComponentId, RArray<TLanguage>& aMatchingSupportedLanguages) const;
       
   879 		
       
   880 	private:
       
   881 
       
   882 		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
       
   883 		template <class C> void SendDependencyArgsL(TInt aFunction, const C& aSupplierId, const CGlobalComponentId& aDependantGlobalCompId);
       
   884 		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
       
   885 		template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
       
   886 		template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
       
   887 		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray);
       
   888 		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
       
   889 		};
       
   890 	
       
   891 	
       
   892 	NONSHARABLE_CLASS(RSoftwareComponentRegistryView) : public RScsClientSubsessionBase
       
   893 	/**
       
   894 		This class opens a sub-session to the SCR server and sends a request to create a component view
       
   895 		by using the supplied filter on the server side.
       
   896 	 */
       
   897 		{
       
   898 	public:
       
   899 		/**
       
   900 			Default constructor of registry view sub-session.
       
   901 		 */
       
   902 		IMPORT_C RSoftwareComponentRegistryView();
       
   903 		
       
   904 		/**
       
   905 			Closes the registry view on the SCR server.
       
   906 		 */
       
   907 		IMPORT_C void Close();
       
   908 		
       
   909 		/**
       
   910 	    	Opens a view of the installed software components in the SCR.
       
   911 			The SCR initializes the view by enumerating the components with the given filter.
       
   912 		
       
   913 			If the call to this function completes successfully, then the interface client will access 
       
   914 			the enumerated records by using @see RSoftwareComponentRegistryView::NextComponentL.
       
   915 			
       
   916 			If a transaction owned by another session is in progress on the SCR server, the open view request 
       
   917 			will be rejected.
       
   918 			
       
   919 			N.B. After this function completes successfully, NextComponentLor NextComponentSetL functions 
       
   920 			can be used together. However, GetComponentIdsL function cannot be called before or after
       
   921 			these functions. 
       
   922 			
       
   923 			@param aCompReg An active SCR connection.
       
   924 			@param aFilter Pointer to the filter object which will be used by the SCR to enumerate the software components.
       
   925 						   If no filter is provided, all software components in the SCR are enumerated.
       
   926 			@leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress.
       
   927 			@leave Or a system-wide error code.
       
   928 
       
   929 			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
       
   930 		*/
       
   931 		IMPORT_C void OpenViewL(const RSoftwareComponentRegistry& aCompReg, CComponentFilter* aFilter=NULL);		
       
   932 		
       
   933 		/**
       
   934 			Retrieves the next software component entry from the view which has already been 
       
   935 			created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL.
       
   936 			
       
   937 			The locale for the component name and vendor of the retrieved component can be specified.
       
   938 				
       
   939 			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
       
   940 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
       
   941 						   the names. If it fails, then the non-localized names are returned. If non-localized versions
       
   942 						   couldn't be found too, the first available language for the component is retrieved.
       
   943 						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
       
   944 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
       
   945 						   If a particular language is provided, then the names are searched for this particular language
       
   946 						   and its downgraded languages. If there is no name and vendor with the provided language, 
       
   947 						   then the function leaves with KErrScrUnsupportedLocale.
       
   948 			@return Returns the next component matching the given filter. If no more components can be found, returns NULL.
       
   949 				     The ownership is transferred to the calling client.	     
       
   950 			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
       
   951 			@leave A system-wide error code.
       
   952 
       
   953 			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
       
   954 		 */
       
   955 		IMPORT_C CComponentEntry* NextComponentL(TLanguage aLocale=KUnspecifiedLocale) const;
       
   956 		
       
   957 		/**
       
   958 			Retrieves the next software component entry from the view which has already been 
       
   959 			created in the SCR with @see RSoftwareComponentRegistryView::OpenViewL.
       
   960 			
       
   961 			The locale for the component name and vendor of the retrieved component can be specified.
       
   962 			
       
   963 			@param aEntry An output parameter for returning the current component registry entry of the view.	
       
   964 			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
       
   965 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
       
   966 						   the names. If it fails, then the non-localized names are returned. If non-localized versions
       
   967 						   couldn't be found too, the first available language for the component is retrieved.
       
   968 						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
       
   969 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
       
   970 						   If a particular language is provided, then the names are searched for this particular language
       
   971 						   and its downgraded languages. If there is no name and vendor with the provided language, 
       
   972 						   then the function leaves with KErrScrUnsupportedLocale.		
       
   973 			@return EFalse, if the end of the view has been reached. Otherwise, ETrue.  		
       
   974 			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
       
   975 			@leave A system-wide error code.
       
   976 
       
   977 			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
       
   978 	     */
       
   979 		IMPORT_C TBool NextComponentL(CComponentEntry& aEntry, TLanguage aLocale=KUnspecifiedLocale) const;				
       
   980 		
       
   981 		/**
       
   982 			Retrieves the set of software component records from a given view which has already been 
       
   983 			created in the SCR. The number of returned records is limited by the size of the component
       
   984 			list.  
       
   985 			
       
   986 			The locale for the component names and vendors of the retrieved components can be specified.
       
   987 						
       
   988 			@param aMaxCount The maximum size of the returned components array.
       
   989 			@param aComponentList The list of component entry objects retrieved from the given view. 
       
   990 			@param aLocale The language code of the requested locale. The default value is KUnspecifiedLocale.
       
   991 						   If KUnspecifiedLocale is provided, the current locale with its downgraded path (@see BaflUtils::GetDowngradePathL) is used to find
       
   992 						   the names. If it fails, then the non-localized names are returned. If non-localized versions
       
   993 						   couldn't be found too, the first available language for the component is retrieved.
       
   994 						   If KNonLocalized is provided, then the non-localized component and vendor names are returned,
       
   995 						   and if non-localized versions don't exist, the function will leave with KErrScrUnsupportedLocale.
       
   996 						   If a particular language is provided, then the names are searched for this particular language
       
   997 						   and its downgraded languages. If there is no name and vendor with the provided language, 
       
   998 						   then the function leaves with KErrScrUnsupportedLocale.		
       
   999 			@leave KErrScrUnsupportedLocale The requested component name/vendor couldn't be found for the specified locale.
       
  1000 			@leave A system-wide error code.
       
  1001 
       
  1002 			@capability  ReadUserData Accessing list of components installed by the user requires ReadUserData
       
  1003 		 */
       
  1004 		IMPORT_C void NextComponentSetL(TInt aMaxCount, RPointerArray<CComponentEntry>& aComponentList, TLanguage aLocale=KUnspecifiedLocale) const;
       
  1005 	
       
  1006 	private:
       
  1007 		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
       
  1008 		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
       
  1009 		template <class T, class C> friend TBool GetObjectL(const C& aConnection, T& aObject, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
       
  1010 		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RArray<T>& aArray);
       
  1011 		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
       
  1012 		};
       
  1013 	
       
  1014 	NONSHARABLE_CLASS(RSoftwareComponentRegistryFilesList) : public RScsClientSubsessionBase
       
  1015 	/**
       
  1016 		This class supports listing of files registered to a particular component.
       
  1017 	 */
       
  1018 		{
       
  1019 	public:
       
  1020 		/**
       
  1021 			Default constructor of registry file list sub-session.
       
  1022 		 */
       
  1023 		IMPORT_C RSoftwareComponentRegistryFilesList();
       
  1024 		
       
  1025 		/**
       
  1026 			Closes the registry view on the SCR server.
       
  1027 		 */
       
  1028 		IMPORT_C void Close();
       
  1029 		
       
  1030 		/**
       
  1031 			Opens the list of files in the SCR owned by a given software component.
       
  1032 			The SCR initializes the list by enumerating the files of the given component Id.
       
  1033 				
       
  1034 			If the call to this function completes successfully, then the interface client will access 
       
  1035 			to the enumerated files by using NextFileL/NextFileSetL interface functions.
       
  1036 			
       
  1037 			If a transaction owned by another session is in progress on the SCR server, the open list request 
       
  1038 			will be rejected.
       
  1039 			
       
  1040 			@param aCompReg An active SCR connection.	
       
  1041 			@param aComponentId The unique ID of the given software component.
       
  1042 			 
       
  1043 			@leave KErrScrWriteOperationInProgress If a transaction owned by another session is in progress.
       
  1044 			@leave Or a system-wide error code.
       
  1045 		 */
       
  1046 		IMPORT_C void OpenListL(const RSoftwareComponentRegistry& aCompReg, TComponentId aComponentId);		
       
  1047 		
       
  1048 		/**
       
  1049 			Retrieves the next file name from the list which has already been created in the SCR with OpenListL.
       
  1050 										
       
  1051 			@return Returns the next file name. If no more files can be found, returns NULL
       
  1052 			@leave A system-wide error code.	
       
  1053 	     */
       
  1054 		IMPORT_C HBufC* NextFileL() const;	
       
  1055 		
       
  1056 		/**
       
  1057 			Retrieves the set of records from a given file list which has already been created in the SCR. 
       
  1058 								
       
  1059 			@param aMaxCount The maximum size of the files array returned.
       
  1060 			@param aFileList The list of file names retrieved from the given list. 
       
  1061 			@leave A system-wide error code.
       
  1062 		 */
       
  1063 		IMPORT_C void NextFileSetL(TInt aMaxCount, RPointerArray<HBufC>& aFileList) const;
       
  1064 	
       
  1065 	private:
       
  1066 		TInt SendSyncMessage(TInt aFunction, const TIpcArgs& aArgs) const;
       
  1067 		template <class C> friend HBufC8* GetObjectDataLC(const C& aConnection, TInt aFunction, TInt aDataSize);
       
  1068 		template <class T, class C> friend T* GetObjectL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs);
       
  1069 		template <class C, class T> friend void GetObjectArrayL(const C& aConnection, TInt aSizeFunction, TInt aDataFunction, TInt aArgNum, TIpcArgs& aArgs, RPointerArray<T>& aArray);
       
  1070 		};
       
  1071 			
       
  1072 	}// End of namespace Usif
       
  1073 
       
  1074 #endif // SOFTWARECOMPONENTREGISTRY_H