conn::MActiveBackupDataClient Class Reference

#include <connect/abclient.h>

class conn::MActiveBackupDataClient
Public Member Functions
virtual ~MActiveBackupDataClient()
pure virtual voidAllSnapshotsSuppliedL()
pure virtual voidGetBackupDataSectionL(TPtr8 &, TBool &)
pure virtual TUint GetDataChecksum(TDriveNumber)
pure virtual TUint GetExpectedDataSize(TDriveNumber)
virtual TAny *GetExtendedInterface(const TInt32)
pure virtual voidGetSnapshotDataL(TDriveNumber, TPtr8 &, TBool &)
pure virtual voidInitialiseGetBackupDataL(TDriveNumber)
virtual voidInitialiseGetProxyBackupDataL(TSecureId, TDriveNumber)
pure virtual voidInitialiseRestoreBaseDataL(TDriveNumber)
pure virtual voidInitialiseRestoreIncrementDataL(TDriveNumber)
virtual voidInitialiseRestoreProxyBaseDataL(TSecureId, TDriveNumber)
pure virtual voidReceiveSnapshotDataL(TDriveNumber, TDesC8 &, TBool)
pure virtual voidRestoreBaseDataSectionL(TDesC8 &, TBool)
pure virtual voidRestoreComplete(TDriveNumber)
pure virtual voidRestoreIncrementDataSectionL(TDesC8 &, TBool)
pure virtual voidTerminateMultiStageOperation()

Detailed Description

MActiveBackupDataClient is a Mixin to be implemented by an Active Backup client. The client connects to the Secure Backup Server using the CActiveBackupClient class and provides an instance of MActiveBackupDataClient to be called for a range of functions.

The bulk transfer of data and snapshots is expected to be by means of shared heaps for performance reasons so the API is expected to change in these areas.

Constructor & Destructor Documentation

~MActiveBackupDataClient ( )

~MActiveBackupDataClient()[inline, virtual]

Empty virtual destructor to avoid memory leaks

Member Function Documentation

AllSnapshotsSuppliedL ( )

voidAllSnapshotsSuppliedL()[pure virtual]

This method informs the active backup data client that all snapshots have been supplied. If the client has not received a snapshot then it should perform a base backup.

GetBackupDataSectionL ( TPtr8 &, TBool & )

voidGetBackupDataSectionL(TPtr8 &aBuffer,
TBool &aFinished
)[pure virtual]

This method requests a section of backup data. InitialiseGetBackupDataL() will have been called prevously to specify the drive concerned. The data returned may be base or incremental depending on the type of backup and the capability of the data owner.

Parameters
aBuffera pointer to the base of the location where data can be copied.
aFinishedon return ETrue if all data has been returned for this drive, else EFalse.

GetDataChecksum ( TDriveNumber )

TUint GetDataChecksum(TDriveNumberaDrive)[pure virtual]

Gets a 32-bit checksum for its private data. This routine is for test purposes. It must be implemented but an invariant checksum value can be provided. Some tests may cause checksum values to be compared.

Parameters
aDrivethe drive containing data being checksummed
Return Value
the 32-bit checksum

GetExpectedDataSize ( TDriveNumber )

TUint GetExpectedDataSize(TDriveNumberaDrive)[pure virtual]

This method returns the expected size of backup data that will be supplied. If an incremental backup is underway then this method will not be called until after ReceiveSnapshotDataL(). The size data will be used for the purpose of tracking progess during a backup. If it is inaccurate then the user may see irregular progress but the actual backup data will not be affected so it is acceptable to return an estimated value.

Parameters
aDrivethe drive being backed up.
Return Value
the size of the data that will be returned

GetExtendedInterface ( const TInt32 )

TAny *GetExtendedInterface(const TInt32aUid)[inline, virtual]

Gets an extended interface based on a supplied uid.

Parameters
aUidUid which identifies an extended interface
Return Value
Pointer to an extended interface

GetSnapshotDataL ( TDriveNumber, TPtr8 &, TBool & )

voidGetSnapshotDataL(TDriveNumberaDrive,
TPtr8 &aBuffer,
TBool &aFinished
)[pure virtual]

This method returns a snapshot of data to accompany a backup. The snapshot is expected to contain details on files / data being backed up. The format of the snapshot is only meaningful to the data owner. The snapshot will be supplied if the data owner is asked for an incremental backup and for a restore operation. The snapshot data should be copied to the location supplied. The snapshot data may be larger than the location supplied in which case the routine will be called repeatedly until all data has been retrieved.

Parameters
aDrivethe drive being backed up
aBuffera pointer to the base of the location where data can be copied.
aFinishedon return ETrue if all data has been returned for this drive, else EFalse.
Leave Codes
KErrNotSupportedif the data owner does not support incremental backups.

InitialiseGetBackupDataL ( TDriveNumber )

voidInitialiseGetBackupDataL(TDriveNumberaDrive)[pure virtual]

This method prepares the implementor to return backup data. It will be followed by a sequence of calls to request the actual data.

Parameters
aDrivethe drive being backed up.

InitialiseGetProxyBackupDataL ( TSecureId, TDriveNumber )

voidInitialiseGetProxyBackupDataL(TSecureIdaSID,
TDriveNumberaDrive
)[inline, virtual]

This method prepares the implementor to return backup data on behalf of another data owner. It will be followed by a sequence of calls to request the actual data. This method is only for use by a proxy data manager that backs up data on behalf of other data owners. There is no corresponding method for snapshots as it is assumed that a proxy data manager will only handle base data.

Initialises the proxy backup data

This is not supported here.

Parameters
aSIDthe secure Id
aDrivethe driver number
Leave Codes
KErrNotSupportedAlways.

InitialiseRestoreBaseDataL ( TDriveNumber )

voidInitialiseRestoreBaseDataL(TDriveNumberaDrive)[pure virtual]

This method prepares the implementor to receive base restore data for a drive. It will be followed by a sequence of calls to supply the actual data.

Parameters
aDrivethe drive being restored.

InitialiseRestoreIncrementDataL ( TDriveNumber )

voidInitialiseRestoreIncrementDataL(TDriveNumberaDrive)[pure virtual]

This method prepares the implementor to receive incremental restore data for a drive. It will be followed by a sequence of calls to supply the actual data. If multiple increments are supplied then this methid will be called before each increment.

Parameters
aDrivethe drive being restored.

InitialiseRestoreProxyBaseDataL ( TSecureId, TDriveNumber )

voidInitialiseRestoreProxyBaseDataL(TSecureIdaSID,
TDriveNumberaDrive
)[inline, virtual]

This method prepares the implementor to receive base restore data for another data owner for a drive. It will be followed by a sequence of calls to supply the actual data. This method is only for use by a proxy data manager that restores up data on behalf of other data owners. There is no corresponding method for incremental data as it is assumed that a proxy data manager will only handle base data.

Parameters
aSIDthe data owner whose data is to be restored
aDrivethe drive being restored.

ReceiveSnapshotDataL ( TDriveNumber, TDesC8 &, TBool )

voidReceiveSnapshotDataL(TDriveNumberaDrive,
TDesC8 &aBuffer,
TBoolaLastSection
)[pure virtual]

This method receives all or part of a snapshot of data to allow calculation of an incremental backup. The snapshot is one that was previously supplied by the data owner. The snapshot data should be read from the location supplied. The snapshot data may be larger than the location supplied in which case the routine will be called repeatedly until all data has been supplied.

Snapshot data will also be supplied as part of a restore operation.

Parameters
aDrivethe drive being backed up
aBuffera pointer to the base of the location from whence data can be copied.
aLastSectionETrue if this is the last section of snapshot data, else EFalse.
Leave Codes
KErrNotSupportedif the data owner does not support incremental backups.

RestoreBaseDataSectionL ( TDesC8 &, TBool )

voidRestoreBaseDataSectionL(TDesC8 &aBuffer,
TBoolaFinished
)[pure virtual]

This method receives a section of base restore data. InitialiseRestoreBaseDataL() will have been called prevously to specify the drive concerned.

Parameters
aBuffera pointer to the base of the location whence data can be read.
aFinishedETrue if all data has been returned for this drive, else EFalse.

RestoreComplete ( TDriveNumber )

voidRestoreComplete(TDriveNumberaDrive)[pure virtual]

This method is called when all data to be restored has been supplied.

Parameters
aDrivethe drive being restored.

RestoreIncrementDataSectionL ( TDesC8 &, TBool )

voidRestoreIncrementDataSectionL(TDesC8 &aBuffer,
TBoolaFinished
)[pure virtual]

This method receives a section of increment restore data. InitialiseRestoreIncrementDataL() will have been called prevously to specify the drive concerned.

Parameters
aBuffera pointer to the base of the location whence data can be read.
aFinishedETrue if all data has been returned for this increment, else EFalse.

TerminateMultiStageOperation ( )

voidTerminateMultiStageOperation()[pure virtual]

This method is called if copying of data is terminated prematurely to allow the implementor to tidy up. The same method applies to all types of data and to backup and restore