backupandrestore/backupengine/src/sbeclient.cpp
changeset 47 63cf70d3ecd8
parent 33 883e91c086aa
equal deleted inserted replaced
44:a5deb6b96675 47:63cf70d3ecd8
    21 */
    21 */
    22 
    22 
    23 #include "sbeclient.h"
    23 #include "sbeclient.h"
    24 #include "sbeclientsession.h"
    24 #include "sbeclientsession.h"
    25 #include "sbepanic.h"
    25 #include "sbepanic.h"
       
    26 #include "OstTraceDefinitions.h"
       
    27 #include "sbtrace.h"
       
    28 #ifdef OST_TRACE_COMPILER_IN_USE
       
    29 #include "sbeclientTraces.h"
       
    30 #endif
    26 
    31 
    27 namespace conn
    32 namespace conn
    28 	{
    33 	{
    29 
       
    30 	CSBEClient::CSBEClient()
    34 	CSBEClient::CSBEClient()
    31 	/** Class constructor. */
    35 	/** Class constructor. */
    32 		{
    36 		{
       
    37 		OstTraceFunctionEntry0( CSBECLIENT_CSBECLIENT_CONS_ENTRY );
       
    38 		OstTraceFunctionExit0( CSBECLIENT_CSBECLIENT_CONS_EXIT );
    33 		}
    39 		}
    34 
    40 
    35 
    41 
    36 	EXPORT_C CSBEClient* CSBEClient::NewL()
    42 	EXPORT_C CSBEClient* CSBEClient::NewL()
    37 	/**
    43 	/**
    38 	Standard creation method.
    44 	Standard creation method.
    39 
    45 
    40 	@return a new CSBEClient.
    46 	@return a new CSBEClient.
    41 	*/
    47 	*/
    42 		{
    48 		{
       
    49 		OstTraceFunctionEntry0( CSBECLIENT_NEWL_ENTRY );
    43 		CSBEClient* self = new (ELeave) CSBEClient();
    50 		CSBEClient* self = new (ELeave) CSBEClient();
    44 		CleanupStack::PushL(self);
    51 		CleanupStack::PushL(self);
    45 		self->ConstructL();
    52 		self->ConstructL();
    46 		CleanupStack::Pop(self);
    53 		CleanupStack::Pop(self);
       
    54 		OstTraceFunctionExit0( CSBECLIENT_NEWL_EXIT );
    47 		return self;
    55 		return self;
    48 		}
    56 		}
    49 
    57 
    50 	void CSBEClient::ConstructL()
    58 	void CSBEClient::ConstructL()
    51 	/**
    59 	/**
    52 	Construct this instance of CSBEClient
    60 	Construct this instance of CSBEClient
    53 	*/
    61 	*/
    54 		{
    62 		{
       
    63 		OstTraceFunctionEntry0( CSBECLIENT_CONSTRUCTL_ENTRY );
    55 		iClientSession = RSBEClientSession::NewL();
    64 		iClientSession = RSBEClientSession::NewL();
    56 		
    65 		
    57 		User::LeaveIfError(iClientSession->Connect());
    66 		TInt err = iClientSession->Connect();
       
    67 		LEAVEIFERROR(err, OstTrace1(TRACE_ERROR, CSBECLIENT_CONSTRUCTL, "Leave: %d", err));
       
    68 		OstTraceFunctionExit0( CSBECLIENT_CONSTRUCTL_EXIT );
    58 		}
    69 		}
    59 
    70 
    60 
    71 
    61 	EXPORT_C CSBEClient::~CSBEClient()
    72 	EXPORT_C CSBEClient::~CSBEClient()
    62 	/**
    73 	/**
    63 	Standard destructor
    74 	Standard destructor
    64 	*/
    75 	*/
    65 		{
    76 		{
       
    77 		OstTraceFunctionEntry0( CSBECLIENT_CSBECLIENT_DES_ENTRY );
    66 		if (iClientSession)
    78 		if (iClientSession)
    67 			{
    79 			{
    68 			iClientSession->Close();
    80 			iClientSession->Close();
    69 			}
    81 			}
    70 		
    82 		
    71 		delete iClientSession;
    83 		delete iClientSession;
    72 		iClientSession = NULL;
    84 		iClientSession = NULL;
       
    85 		OstTraceFunctionExit0( CSBECLIENT_CSBECLIENT_DES_EXIT );
    73 		}
    86 		}
    74 
    87 
    75 
    88 
    76 	EXPORT_C void CSBEClient::ListOfDataOwnersL(RPointerArray<CDataOwnerInfo>& aDataOwners)
    89 	EXPORT_C void CSBEClient::ListOfDataOwnersL(RPointerArray<CDataOwnerInfo>& aDataOwners)
    77 	/**
    90 	/**
    84 	will trigger scanning and parsing.
    97 	will trigger scanning and parsing.
    85 
    98 
    86 	@param aDataOwners on return an array of information about backup data owners.
    99 	@param aDataOwners on return an array of information about backup data owners.
    87 	*/
   100 	*/
    88 		{
   101 		{
       
   102 		OstTraceFunctionEntry0( CSBECLIENT_LISTOFDATAOWNERSL_ENTRY );
    89 		iClientSession->ListOfDataOwnersL(aDataOwners);
   103 		iClientSession->ListOfDataOwnersL(aDataOwners);
       
   104 		OstTraceFunctionExit0( CSBECLIENT_LISTOFDATAOWNERSL_EXIT );
    90 		}
   105 		}
    91 
   106 
    92 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, RFileArray& aFiles)
   107 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, RFileArray& aFiles)
    93 	/**
   108 	/**
    94 	Gets a list of actual public files associated with an SID for partial backup. This allows
   109 	Gets a list of actual public files associated with an SID for partial backup. This allows
   104 	@param aDrive the drive concerned.
   119 	@param aDrive the drive concerned.
   105 	@param aGenericDataType reference to the data type.
   120 	@param aGenericDataType reference to the data type.
   106 	@param aFiles on return an array of information about files.
   121 	@param aFiles on return an array of information about files.
   107 	*/
   122 	*/
   108 		{
   123 		{
       
   124 		OstTraceFunctionEntry0( CSBECLIENT_PUBLICFILELISTL_ENTRY );
   109 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFiles);
   125 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFiles);
       
   126 		OstTraceFunctionExit0( CSBECLIENT_PUBLICFILELISTL_EXIT );
   110 		}
   127 		}
   111 
   128 
   112 	EXPORT_C void CSBEClient::RawPublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType,
   129 	EXPORT_C void CSBEClient::RawPublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType,
   113 									RRestoreFileFilterArray& aFileFilter)
   130 									RRestoreFileFilterArray& aFileFilter)
   114 	/**
   131 	/**
   130 	@param aDrive the drive concerned.
   147 	@param aDrive the drive concerned.
   131 	@param aGenericDataType reference to the data type.
   148 	@param aGenericDataType reference to the data type.
   132 	@param aFileFilter on return an array of names of files or directories for restore.
   149 	@param aFileFilter on return an array of names of files or directories for restore.
   133 	*/
   150 	*/
   134 		{
   151 		{
       
   152 		OstTraceFunctionEntry0( CSBECLIENT_RAWPUBLICFILELISTL_ENTRY );
   135 		iClientSession->RawPublicFileListL(aDrive, aGenericDataType, aFileFilter);
   153 		iClientSession->RawPublicFileListL(aDrive, aGenericDataType, aFileFilter);
       
   154 		OstTraceFunctionExit0( CSBECLIENT_RAWPUBLICFILELISTL_EXIT );
   136 		}
   155 		}
   137 
   156 
   138 	EXPORT_C void CSBEClient::PublicFileListXMLL(TDriveNumber aDrive, TSecureId aSID, HBufC*& aFileList)
   157 	EXPORT_C void CSBEClient::PublicFileListXMLL(TDriveNumber aDrive, TSecureId aSID, HBufC*& aFileList)
   139 	/**
   158 	/**
   140 	Gets a list of public files and directories associated with an SID for partial backup or restore.
   159 	Gets a list of public files and directories associated with an SID for partial backup or restore.
   150 	@param aDrive the drive concerned.
   169 	@param aDrive the drive concerned.
   151 	@param aSID the data owner.
   170 	@param aSID the data owner.
   152 	@param aFileList on return a description of the list of files and directories. Must be NULL
   171 	@param aFileList on return a description of the list of files and directories. Must be NULL
   153 	*/
   172 	*/
   154 		{
   173 		{
       
   174 		OstTraceFunctionEntry0( CSBECLIENT_PUBLICFILELISTXMLL_ENTRY );
   155 		__ASSERT_DEBUG(aFileList == NULL, Panic(KErrArgument));
   175 		__ASSERT_DEBUG(aFileList == NULL, Panic(KErrArgument));
   156 		iClientSession->PublicFileListXMLL(aDrive, aSID, aFileList);
   176 		iClientSession->PublicFileListXMLL(aDrive, aSID, aFileList);
       
   177 		OstTraceFunctionExit0( CSBECLIENT_PUBLICFILELISTXMLL_EXIT );
   157 		}
   178 		}
   158 
   179 
   159 	EXPORT_C void CSBEClient::SetBURModeL(const TDriveList& aDriveList, TBURPartType aBURType, 
   180 	EXPORT_C void CSBEClient::SetBURModeL(const TDriveList& aDriveList, TBURPartType aBURType, 
   160 						  TBackupIncType aBackupIncType)
   181 						  TBackupIncType aBackupIncType)
   161 	/**
   182 	/**
   164 	@param aDriveList the drives affected.
   185 	@param aDriveList the drives affected.
   165 	@param aBURType is a full or partial backup or restore desired or normal operation.
   186 	@param aBURType is a full or partial backup or restore desired or normal operation.
   166 	@param aBackupIncType is a backup base or incremental (ignored for restore operations).
   187 	@param aBackupIncType is a backup base or incremental (ignored for restore operations).
   167 	*/
   188 	*/
   168 		{
   189 		{
       
   190 		OstTraceFunctionEntry0( CSBECLIENT_SETBURMODEL_ENTRY );
   169 		iClientSession->SetBURModeL(aDriveList, aBURType, aBackupIncType);
   191 		iClientSession->SetBURModeL(aDriveList, aBURType, aBackupIncType);
       
   192 		OstTraceFunctionExit0( CSBECLIENT_SETBURMODEL_EXIT );
   170 		}
   193 		}
   171 
   194 
   172 	EXPORT_C void CSBEClient::SetSIDListForPartialBURL(RSIDArray& aSIDs)
   195 	EXPORT_C void CSBEClient::SetSIDListForPartialBURL(RSIDArray& aSIDs)
   173 	/**
   196 	/**
   174 	If a partial backup is required then this sets the list of data owners.
   197 	If a partial backup is required then this sets the list of data owners.
   176 	It must only be called once for a backup or restore operation.
   199 	It must only be called once for a backup or restore operation.
   177 
   200 
   178 	@param aSIDs array of affected data owners.
   201 	@param aSIDs array of affected data owners.
   179 	*/
   202 	*/
   180 		{
   203 		{
       
   204 		OstTraceFunctionEntry0( CSBECLIENT_SETSIDLISTFORPARTIALBURL_ENTRY );
   181 		iClientSession->SetSIDListForPartialBURL(aSIDs);
   205 		iClientSession->SetSIDListForPartialBURL(aSIDs);
       
   206 		OstTraceFunctionExit0( CSBECLIENT_SETSIDLISTFORPARTIALBURL_EXIT );
   182 		}
   207 		}
   183 
   208 
   184 
   209 
   185 	EXPORT_C void CSBEClient::SIDStatusL(RSIDStatusArray& aSIDStatus)
   210 	EXPORT_C void CSBEClient::SIDStatusL(RSIDStatusArray& aSIDStatus)
   186 	/**
   211 	/**
   192 	
   217 	
   193 	@param aSIDStatus an array of structures for information about data owners. On return
   218 	@param aSIDStatus an array of structures for information about data owners. On return
   194 	the status information is filled in.
   219 	the status information is filled in.
   195 	*/
   220 	*/
   196 		{
   221 		{
       
   222 		OstTraceFunctionEntry0( CSBECLIENT_SIDSTATUSL_ENTRY );
   197 		iClientSession->SIDStatusL(aSIDStatus);
   223 		iClientSession->SIDStatusL(aSIDStatus);
       
   224 		OstTraceFunctionExit0( CSBECLIENT_SIDSTATUSL_EXIT );
   198 		}
   225 		}
   199 
   226 
   200 
   227 
   201 	// Data Access Methods //
   228 	// Data Access Methods //
   202 
   229 
   217 	be requested whenever required rather than being cached.
   244 	be requested whenever required rather than being cached.
   218 
   245 
   219 	@return Pointer to the start of the buffer for writing
   246 	@return Pointer to the start of the buffer for writing
   220 	*/
   247 	*/
   221 		{
   248 		{
   222 		return iClientSession->TransferDataAddressL();
   249 		OstTraceFunctionEntry0( CSBECLIENT_TRANSFERDATAADDRESSL_ENTRY );
       
   250 		TPtr8& ptr = iClientSession->TransferDataAddressL(); 
       
   251 		OstTraceFunctionExit0( CSBECLIENT_TRANSFERDATAADDRESSL_EXIT );
       
   252 		return ptr;
   223 		}
   253 		}
   224 		
   254 		
   225 	EXPORT_C TPtrC8& CSBEClient::TransferDataInfoL(CSBGenericTransferType*& aGenericTransferType,
   255 	EXPORT_C TPtrC8& CSBEClient::TransferDataInfoL(CSBGenericTransferType*& aGenericTransferType,
   226 												   TBool& aFinished)
   256 												   TBool& aFinished)
   227 	/**
   257 	/**
   233 	@param aGenericTransferType  Reference to a CSBGenericTransferType pointer. Must be NULL
   263 	@param aGenericTransferType  Reference to a CSBGenericTransferType pointer. Must be NULL
   234 	@param aFinished ETrue if the data is the last chunk, EFalse if there is more to request.
   264 	@param aFinished ETrue if the data is the last chunk, EFalse if there is more to request.
   235 	@return read only pointer to the global heap.
   265 	@return read only pointer to the global heap.
   236 	*/
   266 	*/
   237 		{
   267 		{
       
   268 		OstTraceFunctionEntry0( CSBECLIENT_TRANSFERDATAINFOL_ENTRY );
   238 		__ASSERT_DEBUG(aGenericTransferType == NULL, Panic(KErrArgument));
   269 		__ASSERT_DEBUG(aGenericTransferType == NULL, Panic(KErrArgument));
   239 		return iClientSession->TransferDataInfoL(aGenericTransferType, aFinished);
   270 		TPtrC8& ptr = iClientSession->TransferDataInfoL(aGenericTransferType, aFinished);
       
   271 		OstTraceFunctionExit0( CSBECLIENT_TRANSFERDATAINFOL_EXIT );
       
   272 		return ptr;
   240 		}
   273 		}
   241 
   274 
   242 	EXPORT_C void CSBEClient::RequestDataL(CSBGenericTransferType& aGenericTransferType,
   275 	EXPORT_C void CSBEClient::RequestDataL(CSBGenericTransferType& aGenericTransferType,
   243 										   TRequestStatus& aStatus)
   276 										   TRequestStatus& aStatus)
   244 	/**
   277 	/**
   251 
   284 
   252 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   285 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   253 	@param aStatus the request status of an Active Object to be completed when the data has been received
   286 	@param aStatus the request status of an Active Object to be completed when the data has been received
   254 	*/
   287 	*/
   255 		{
   288 		{
       
   289 		OstTraceFunctionEntry0( CSBECLIENT_REQUESTDATAL_ENTRY );
   256 		iClientSession->RequestDataL(aGenericTransferType, aStatus);
   290 		iClientSession->RequestDataL(aGenericTransferType, aStatus);
       
   291 		OstTraceFunctionExit0( CSBECLIENT_REQUESTDATAL_EXIT );
   257 		}
   292 		}
   258 		
   293 		
   259 	EXPORT_C void CSBEClient::RequestDataL(CSBGenericTransferType& aGenericTransferType)
   294 	EXPORT_C void CSBEClient::RequestDataL(CSBGenericTransferType& aGenericTransferType)
   260 	/**
   295 	/**
   261 	This synchronous method requests backup data from the Secure Backup Engine.
   296 	This synchronous method requests backup data from the Secure Backup Engine.
   266 	method should be called again with the same arguments until all data is signalled as supplied.
   301 	method should be called again with the same arguments until all data is signalled as supplied.
   267 
   302 
   268 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   303 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   269 	*/
   304 	*/
   270 		{
   305 		{
       
   306 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_REQUESTDATAL_ENTRY );
   271 		iClientSession->RequestDataL(aGenericTransferType);
   307 		iClientSession->RequestDataL(aGenericTransferType);
       
   308 		OstTraceFunctionExit0( DUP1_CSBECLIENT_REQUESTDATAL_EXIT );
   272 		}
   309 		}
   273 	
   310 	
   274 	EXPORT_C void CSBEClient::SupplyDataL(CSBGenericTransferType& aGenericTransferType,
   311 	EXPORT_C void CSBEClient::SupplyDataL(CSBGenericTransferType& aGenericTransferType,
   275 									 	  TBool aFinished, TRequestStatus& aStatus)
   312 									 	  TBool aFinished, TRequestStatus& aStatus)
   276 	/**
   313 	/**
   286 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   323 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   287 	@param aFinished ETrue if this buffer is the last one for this package uid, drive and data type
   324 	@param aFinished ETrue if this buffer is the last one for this package uid, drive and data type
   288 	@param aStatus the request status of an Active Object to be completed when the data has been transferred
   325 	@param aStatus the request status of an Active Object to be completed when the data has been transferred
   289 	*/
   326 	*/
   290 		{
   327 		{
       
   328 		OstTraceFunctionEntry0( CSBECLIENT_SUPPLYDATAL_ENTRY );
   291 		iClientSession->SupplyDataL(aGenericTransferType, aFinished, aStatus);
   329 		iClientSession->SupplyDataL(aGenericTransferType, aFinished, aStatus);
       
   330 		OstTraceFunctionExit0( CSBECLIENT_SUPPLYDATAL_EXIT );
   292 		}
   331 		}
   293 		
   332 		
   294 	EXPORT_C void CSBEClient::SupplyDataL(CSBGenericTransferType& aGenericTransferType,
   333 	EXPORT_C void CSBEClient::SupplyDataL(CSBGenericTransferType& aGenericTransferType,
   295 									 	  TBool aFinished)
   334 									 	  TBool aFinished)
   296 	/**
   335 	/**
   304 
   343 
   305 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   344 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   306 	@param aFinished ETrue if this buffer is the last one for this package uid, drive and data type
   345 	@param aFinished ETrue if this buffer is the last one for this package uid, drive and data type
   307 	*/
   346 	*/
   308 		{
   347 		{
       
   348 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_SUPPLYDATAL_ENTRY );
   309 		iClientSession->SupplyDataL(aGenericTransferType, aFinished);
   349 		iClientSession->SupplyDataL(aGenericTransferType, aFinished);
       
   350 		OstTraceFunctionExit0( DUP1_CSBECLIENT_SUPPLYDATAL_EXIT );
   310 		}
   351 		}
   311 
   352 
   312 	EXPORT_C void CSBEClient::AllSnapshotsSuppliedL()								  
   353 	EXPORT_C void CSBEClient::AllSnapshotsSuppliedL()								  
   313 	/**
   354 	/**
   314 	This method sets the type of backup to base for this particular data owner.
   355 	This method sets the type of backup to base for this particular data owner.
   318 
   359 
   319 	This method must only be called when the device has just been put into backup mode.
   360 	This method must only be called when the device has just been put into backup mode.
   320 	It must only be called once for a SID for a backup operation.
   361 	It must only be called once for a SID for a backup operation.
   321 	*/
   362 	*/
   322 		{
   363 		{
       
   364 		OstTraceFunctionEntry0( CSBECLIENT_ALLSNAPSHOTSSUPPLIEDL_ENTRY );
   323 		iClientSession->AllSnapshotsSuppliedL();
   365 		iClientSession->AllSnapshotsSuppliedL();
       
   366 		OstTraceFunctionExit0( CSBECLIENT_ALLSNAPSHOTSSUPPLIEDL_EXIT );
   324 		}
   367 		}
   325 		
   368 		
   326 	EXPORT_C TUint CSBEClient::ExpectedDataSizeL(CSBGenericTransferType& aGenericTransferType)
   369 	EXPORT_C TUint CSBEClient::ExpectedDataSizeL(CSBGenericTransferType& aGenericTransferType)
   327 	/**
   370 	/**
   328 	This method returns the expected size of package data that will be supplied.  The size
   371 	This method returns the expected size of package data that will be supplied.  The size
   335 
   378 
   336 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   379 	@param aGenericTransferType  Reference to a CSBGenericTransferType object
   337 	@return KErrNone if successful.
   380 	@return KErrNone if successful.
   338 	*/
   381 	*/
   339 		{
   382 		{
   340 		return (iClientSession->ExpectedDataSizeL(aGenericTransferType));
   383 		OstTraceFunctionEntry0( CSBECLIENT_EXPECTEDDATASIZEL_ENTRY );
       
   384 		TUint ret = (iClientSession->ExpectedDataSizeL(aGenericTransferType));
       
   385 		OstTraceFunctionExit0( CSBECLIENT_EXPECTEDDATASIZEL_EXIT );
       
   386 		return ret;
   341 		}
   387 		}
   342 										 
   388 										 
   343 	EXPORT_C void CSBEClient::AllSystemFilesRestored()
   389 	EXPORT_C void CSBEClient::AllSystemFilesRestored()
   344 	/**
   390 	/**
   345 	This method is called when all system files have been provided to allow the Secure
   391 	This method is called when all system files have been provided to allow the Secure
   346 	Backup Engine to start active data owners.
   392 	Backup Engine to start active data owners.
   347 	*/
   393 	*/
   348 		{
   394 		{
       
   395 		OstTraceFunctionEntry0( CSBECLIENT_ALLSYSTEMFILESRESTORED_ENTRY );
   349 		iClientSession->AllSystemFilesRestored();
   396 		iClientSession->AllSystemFilesRestored();
       
   397 		OstTraceFunctionExit0( CSBECLIENT_ALLSYSTEMFILESRESTORED_EXIT );
   350 		}
   398 		}
   351 	
   399 	
   352 	/**
   400 	/**
   353 	Gets a list of all registered data owners asynchronously.
   401 	Gets a list of all registered data owners asynchronously.
   354 	This method can be called regardless of backup or restore mode.
   402 	This method can be called regardless of backup or restore mode.
   361 	@param aDataOwners on return an array of information about backup data owners.
   409 	@param aDataOwners on return an array of information about backup data owners.
   362 	@param aStatus is TRequestStatus&
   410 	@param aStatus is TRequestStatus&
   363 	*/	
   411 	*/	
   364 	EXPORT_C void CSBEClient::ListOfDataOwnersL(RPointerArray<CDataOwnerInfo>& aDataOwners, TRequestStatus& aStatus)
   412 	EXPORT_C void CSBEClient::ListOfDataOwnersL(RPointerArray<CDataOwnerInfo>& aDataOwners, TRequestStatus& aStatus)
   365 		{
   413 		{
       
   414 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_LISTOFDATAOWNERSL_ENTRY );
   366 		iClientSession->ListOfDataOwnersL(aDataOwners, aStatus);
   415 		iClientSession->ListOfDataOwnersL(aDataOwners, aStatus);
       
   416 		OstTraceFunctionExit0( DUP1_CSBECLIENT_LISTOFDATAOWNERSL_EXIT );
   367 		}
   417 		}
   368 	
   418 	
   369 	/**
   419 	/**
   370 	Gets a list of actual public files associated with an SID for partial backup asynchronously.
   420 	Gets a list of actual public files associated with an SID for partial backup asynchronously.
   371 	This allows	a client to backup only the public files associated with an SID.
   421 	This allows	a client to backup only the public files associated with an SID.
   382 	@param aFiles on return an array of information about files.
   432 	@param aFiles on return an array of information about files.
   383 	@param aStatus is TRequestStatus&
   433 	@param aStatus is TRequestStatus&
   384 	*/	
   434 	*/	
   385 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, RFileArray& aFiles, TRequestStatus& aStatus)
   435 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, RFileArray& aFiles, TRequestStatus& aStatus)
   386 		{
   436 		{
       
   437 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_PUBLICFILELISTL_ENTRY );
   387 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFiles, aStatus);
   438 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFiles, aStatus);
       
   439 		OstTraceFunctionExit0( DUP1_CSBECLIENT_PUBLICFILELISTL_EXIT );
   388 		}
   440 		}
   389 	
   441 	
   390 	/**
   442 	/**
   391 	Sets B&R on or off and sets the base / increment and full / partial mode and the affected drives asynchronously.
   443 	Sets B&R on or off and sets the base / increment and full / partial mode and the affected drives asynchronously.
   392 
   444 
   396 	@param aStatus is TRequestStatus&
   448 	@param aStatus is TRequestStatus&
   397 	*/	
   449 	*/	
   398 	EXPORT_C void CSBEClient::SetBURModeL(const TDriveList& aDriveList, TBURPartType aBURType, 
   450 	EXPORT_C void CSBEClient::SetBURModeL(const TDriveList& aDriveList, TBURPartType aBURType, 
   399 								  TBackupIncType aBackupIncType, TRequestStatus& aStatus)
   451 								  TBackupIncType aBackupIncType, TRequestStatus& aStatus)
   400 		{
   452 		{
       
   453 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_SETBURMODEL_ENTRY );
   401 		iClientSession->SetBURModeL(aDriveList, aBURType, aBackupIncType, aStatus);
   454 		iClientSession->SetBURModeL(aDriveList, aBURType, aBackupIncType, aStatus);
       
   455 		OstTraceFunctionExit0( DUP1_CSBECLIENT_SETBURMODEL_EXIT );
   402 		}
   456 		}
   403 	
   457 	
   404 	/**
   458 	/**
   405 	This method which sets the type of backup to base for this particular data owner asynchronously.
   459 	This method which sets the type of backup to base for this particular data owner asynchronously.
   406 	The whole device may be subject to an incremental backup but a particular
   460 	The whole device may be subject to an incremental backup but a particular
   412 	
   466 	
   413 	@param aStatus is TRequestStatus&
   467 	@param aStatus is TRequestStatus&
   414 	*/
   468 	*/
   415 	EXPORT_C void CSBEClient::AllSnapshotsSuppliedL(TRequestStatus& aStatus)
   469 	EXPORT_C void CSBEClient::AllSnapshotsSuppliedL(TRequestStatus& aStatus)
   416 		{
   470 		{
       
   471 		OstTraceFunctionEntry0( DUP1_CSBECLIENT_ALLSNAPSHOTSSUPPLIEDL_ENTRY );
   417 		iClientSession->AllSnapshotsSuppliedL(aStatus);
   472 		iClientSession->AllSnapshotsSuppliedL(aStatus);
       
   473 		OstTraceFunctionExit0( DUP1_CSBECLIENT_ALLSNAPSHOTSSUPPLIEDL_EXIT );
   418 		}
   474 		}
   419 		
   475 		
   420 	/**
   476 	/**
   421 	This method is called asynchronously when all system files have been provided to allow the Secure
   477 	This method is called asynchronously when all system files have been provided to allow the Secure
   422 	Backup Engine to start active data owners.
   478 	Backup Engine to start active data owners.
   423 	
   479 	
   424 	@param aStatus is TRequestStatus&
   480 	@param aStatus is TRequestStatus&
   425 	*/
   481 	*/
   426 	EXPORT_C void CSBEClient::AllSystemFilesRestoredL(TRequestStatus& aStatus)
   482 	EXPORT_C void CSBEClient::AllSystemFilesRestoredL(TRequestStatus& aStatus)
   427 		{
   483 		{
       
   484 		OstTraceFunctionEntry0( CSBECLIENT_ALLSYSTEMFILESRESTOREDL_ENTRY );
   428 		iClientSession->AllSystemFilesRestoredL(aStatus);
   485 		iClientSession->AllSystemFilesRestoredL(aStatus);
       
   486 		OstTraceFunctionExit0( CSBECLIENT_ALLSYSTEMFILESRESTOREDL_EXIT );
   429 		}
   487 		}
   430 
   488 
   431 	// Test Methods //
   489 	// Test Methods //
   432 
   490 
   433 	EXPORT_C TUint CSBEClient::DataChecksum(TDriveNumber /*aDrive*/, TSecureId /*aSID*/)
   491 	EXPORT_C TUint CSBEClient::DataChecksum(TDriveNumber /*aDrive*/, TSecureId /*aSID*/)
   439 	@param aDrive the drive containing data being checksummed
   497 	@param aDrive the drive containing data being checksummed
   440 	@param aSID the data owner.
   498 	@param aSID the data owner.
   441 	@return the 32-bit checksum
   499 	@return the 32-bit checksum
   442 	*/
   500 	*/
   443 		{
   501 		{
       
   502 		OstTraceFunctionEntry0( CSBECLIENT_DATACHECKSUM_ENTRY );
       
   503 		OstTraceFunctionExit0( CSBECLIENT_DATACHECKSUM_EXIT );
   444 		return 0;
   504 		return 0;
   445 		}
   505 		}
   446 		
   506 		
   447 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, 
   507 	EXPORT_C void CSBEClient::PublicFileListL(TDriveNumber aDrive, CSBGenericDataType& aGenericDataType, 
   448 								RPointerArray<CSBEFileEntry>& aFileList, TBool& aFinished,
   508 								RPointerArray<CSBEFileEntry>& aFileList, TBool& aFinished,
   459 						method can be determined by querying the count of aFileList
   519 						method can be determined by querying the count of aFileList
   460 	@param aMaxResponseSize The maximum total size in bytes of externalised CSBEFileEntry objects that will be returned
   520 	@param aMaxResponseSize The maximum total size in bytes of externalised CSBEFileEntry objects that will be returned
   461 	@param aStatus The TRequestStatus that will be completed once the engine has fully processed this request
   521 	@param aStatus The TRequestStatus that will be completed once the engine has fully processed this request
   462 	*/
   522 	*/
   463 		{
   523 		{
       
   524 		OstTraceFunctionEntry0( DUP2_CSBECLIENT_PUBLICFILELISTL_ENTRY );
   464 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFileList, aFinished, aTotalListCursor, aMaxResponseSize, aStatus);
   525 		iClientSession->PublicFileListL(aDrive, aGenericDataType, aFileList, aFinished, aTotalListCursor, aMaxResponseSize, aStatus);
       
   526 		OstTraceFunctionExit0( DUP2_CSBECLIENT_PUBLICFILELISTL_EXIT );
   465 		}
   527 		}
   466 
   528 
   467 	} // end of conn namespace
   529 	} // end of conn namespace
   468 
   530 
   469 
   531