Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: sbdefs.h

Namespace conn

namespace conn

Description

This namespace is the global Symbian Connect namespace which encapsulates all of the connectivity components within Symbian OS.

Members

Defined in conn:
CActiveBackupClient, EBURBackupFull, EBURBackupPartial, EBURNormal, EBURRestoreFull, EBURRestorePartial, EBURUnset, EBackupBase, EBackupIncrement, ENoBackup, KBURPartTypeMask, KBackupIncTypeMask, KUidBackupRestoreKey, MActiveBackupDataClient, TBURPartType, TBackupIncType


Member classes


Class MActiveBackupDataClient

class MActiveBackupDataClient;

Description

MActiveBackupDataClient is a Mixin to be implemented by an Active Backup client. The client connects to the Secure Backup Server using the CActiveBackupSession 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.

Members

Defined in conn::MActiveBackupDataClient:
AllSnapshotsSuppliedL(), GetBackupDataSectionL(), GetDataChecksum(), GetExpectedDataSize(), GetExtendedInterface(), GetSnapshotDataL(), InitialiseGetBackupDataL(), InitialiseGetProxyBackupDataL(), InitialiseRestoreBaseDataL(), InitialiseRestoreIncrementDataL(), InitialiseRestoreProxyBaseDataL(), ReceiveSnapshotDataL(), RestoreBaseDataSectionL(), RestoreComplete(), RestoreIncrementDataSectionL(), TerminateMultiStageOperation(), ~MActiveBackupDataClient()

Construction and destruction


~MActiveBackupDataClient()

inline virtual ~MActiveBackupDataClient();

Description

Empty virtual destructor to avoid memory leaks

Member functions


AllSnapshotsSuppliedL()

virtual void AllSnapshotsSuppliedL()=0;

Description

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.


ReceiveSnapshotDataL()

virtual void ReceiveSnapshotDataL(TDriveNumber aDrive, TDesC8 &aBuffer, TBool aLastSection)=0;

Description

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

TDriveNumber aDrive

the drive being backed up

TDesC8 &aBuffer

a pointer to the base of the location from whence data can be copied.

TBool aLastSection

ETrue if this is the last section of snapshot data, else EFalse.

Leave codes

KErrNotSupported

if the data owner does not support incremental backups.


GetExpectedDataSize()

virtual TUint GetExpectedDataSize(TDriveNumber aDrive)=0;

Description

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

TDriveNumber aDrive

the drive being backed up.

Return value

TUint

the size of the data that will be returned


GetSnapshotDataL()

virtual void GetSnapshotDataL(TDriveNumber aDrive, TPtr8 &aBuffer, TBool &aFinished)=0;

Description

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

TDriveNumber aDrive

the drive being backed up

TPtr8 &aBuffer

a pointer to the base of the location where data can be copied.

TBool &aFinished

on return ETrue if all data has been returned for this drive, else EFalse.

Leave codes

KErrNotSupported

if the data owner does not support incremental backups.


InitialiseGetBackupDataL()

virtual void InitialiseGetBackupDataL(TDriveNumber aDrive)=0;

Description

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

Parameters

TDriveNumber aDrive

the drive being backed up.


GetBackupDataSectionL()

virtual void GetBackupDataSectionL(TPtr8 &aBuffer, TBool &aFinished)=0;

Description

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

TPtr8 &aBuffer

a pointer to the base of the location where data can be copied.

TBool &aFinished

on return ETrue if all data has been returned for this drive, else EFalse.


InitialiseRestoreBaseDataL()

virtual void InitialiseRestoreBaseDataL(TDriveNumber aDrive)=0;

Description

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

TDriveNumber aDrive

the drive being restored.


RestoreBaseDataSectionL()

virtual void RestoreBaseDataSectionL(TDesC8 &aBuffer, TBool aFinished)=0;

Description

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

Parameters

TDesC8 &aBuffer

a pointer to the base of the location whence data can be read.

TBool aFinished

ETrue if all data has been returned for this drive, else EFalse.


InitialiseRestoreIncrementDataL()

virtual void InitialiseRestoreIncrementDataL(TDriveNumber aDrive)=0;

Description

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

TDriveNumber aDrive

the drive being restored.


RestoreIncrementDataSectionL()

virtual void RestoreIncrementDataSectionL(TDesC8 &aBuffer, TBool aFinished)=0;

Description

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

Parameters

TDesC8 &aBuffer

a pointer to the base of the location whence data can be read.

TBool aFinished

ETrue if all data has been returned for this increment, else EFalse.


RestoreComplete()

virtual void RestoreComplete(TDriveNumber aDrive)=0;

Description

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

Parameters

TDriveNumber aDrive

the drive being restored.


InitialiseGetProxyBackupDataL()

inline virtual void InitialiseGetProxyBackupDataL(TSecureId aSID, TDriveNumber aDrive);

Description

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.

Parameters

TSecureId aSID

the data owner whose data is to be backed up

TDriveNumber aDrive

the drive being backed up.


InitialiseRestoreProxyBaseDataL()

inline virtual void InitialiseRestoreProxyBaseDataL(TSecureId aSID, TDriveNumber aDrive);

Description

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

TSecureId aSID

the data owner whose data is to be restored

TDriveNumber aDrive

the drive being restored.


TerminateMultiStageOperation()

virtual void TerminateMultiStageOperation()=0;

Description

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


GetExtendedInterface()

inline virtual TAny *GetExtendedInterface(const TInt32 aUid);

Description

Gets an extended interface based on a supplied uid.

Parameters

const TInt32 aUid

Uid which identifies an extended interface

Return value

TAny *

Pointer to an extended interface


GetDataChecksum()

virtual TUint GetDataChecksum(TDriveNumber aDrive)=0;

Description

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

TDriveNumber aDrive

the drive containing data being checksummed

Return value

TUint

the 32-bit checksum


Class CActiveBackupClient

class CActiveBackupClient : public CBase;

Description

CActiveBackupSession provides a connection to the Secure Backup Server for a data owning process.

It can be used to obtain information about an active backup or restore operation. It can also be used to signal to the Secure Backup Server when the data owner is ready for backup or restore.

It is also used by data owners that implement active backup or restore to provide a MActiveBackupDataClient implementation.

This class owns a RActiveBackupSessionImpl instance and publishes the public API to the outside world. The reason for this facade class is twofold:

Derivation

Members

Defined in conn::CActiveBackupClient:
BURModeInfoL(), ConfirmReadyForBURL(), DoesPartialBURAffectMeL(), NewL(), NewL(), ~CActiveBackupClient()

Inherited from CBase:
Delete(), Extension_(), operator new()

Construction and destruction


NewL()

static IMPORT_C CActiveBackupClient *NewL();

Description

This method creates a CActiveBackupSession, connects to the Secure Backup Server and does not wish to be called back so does not supply an implementation of MActiveBackupDataClient.

If this is called when the Secure Backup Server is not active then it will leave with KErrNotSupported.

Return value

CActiveBackupClient *

Pointer to a created CActiveBackupClient object


NewL()

static IMPORT_C CActiveBackupClient *NewL(MActiveBackupDataClient *aClient);

Description

This method creates a CActiveBackupSession, connects to the Secure Backup Server and supplies a pointer to a MActiveBackupDataClient implementation.

If this is called when the Secure Backup Server is not active then it will leave with KErrNotSupported.

Parameters

MActiveBackupDataClient *aClient

pointer to an object that implements the MActiveBackupDataClient mixin. If this is NULL then the data owner does not take part in active backup or restore.

Return value

CActiveBackupClient *

Pointer to a created CActiveBackupClient object

Leave codes

Release

only - If an ActiveScheduler is not installed

Panic codes

KErrNotFound

Debug only - If an ActiveScheduler is not installed


~CActiveBackupClient()

IMPORT_C ~CActiveBackupClient();

Description

Standard destructor.

Member functions


BURModeInfoL()

IMPORT_C void BURModeInfoL(TDriveList &aDriveList, TBURPartType &aBackupType, TBackupIncType &aIncBackupType);

Description

This method returns the type(s) of backup / restore operation currently active

Parameters

TDriveList &aDriveList

list of drives involved in backup and restore

TBURPartType &aBackupType

enumerated type indicating whether a backup or restore is in progress and whether full or partial.

TBackupIncType &aIncBackupType

enumerated type indicating whetherr a backup is base or incremental.


DoesPartialBURAffectMeL()

IMPORT_C TBool DoesPartialBURAffectMeL();

Description

This method can be called when a partial backup or restore is active and will indicate whether the calling process is expected to take part. If a full backup or restore is active then this method will return ETrue for all data owners. If no backup or restore is active then this method will return EFalse for all data owners.

Return value

TBool

ETrue if the calling data owner is involved in the current backup or restore operation.


ConfirmReadyForBURL()

IMPORT_C void ConfirmReadyForBURL(TInt aErrorCode);

Description

This method is called to indicate to the Secure Backup Server that the data owner is ready to participate in backup or restore. The data owner must call this method to indicate readiness or the Secure Backup Server will not request or supply backup data.

N.B. The Secure Backup Server will supply snapshot data (if relevant) before a data owner indicates readiness as it assumes that the data owner requires snapshot data in order to prepare for a backp or restore.

Parameters

TInt aErrorCode

this should be set to KErrNone when the client is ready for backup or restore. If it is set to any other value then it indicates that the client cannot continue with the backup or restore and the error code will be supplied to the remote backup client.

[Top]


Member enumerations


Enum TBURPartType

TBURPartType

Description

The backup / restore state of a device.

EBURUnset

0x00000000: The backup / restore mode has not been set

EBURNormal

0x00000001: The device as a whole is not engaged in a backup or restore

EBURBackupFull

0x00000002: The device as a whole is engaged in a backup of all components data

EBURBackupPartial

0x00000004: The device as a whole is engaged in a backup of selected components data

EBURRestoreFull

0x00000008: The device as a whole is engaged in a restore of all components data

EBURRestorePartial

0x00000010: The device as a whole is engaged in a restore of all components data


Enum TBackupIncType

TBackupIncType

Description

The type of a backup.

ENoBackup

0x00000000: No backup is in progress

EBackupBase

0x00000100: The backup is a base backup, i.e. it includes all files / data

EBackupIncrement

0x00000200: The backup is an incremental backup, i.e. it includes only files / data that have changed since a previous backup

[Top]


Member data


KUidBackupRestoreKey

const TUint KUidBackupRestoreKey;

Description

Secure Backup and Restore publish and subscribe key

Secure Backup and Restore uses a Publish and Subscribe key to publish the current backup / restore state.

The key is a system key so the category to be used when subscribing is KUidSystemCategoryValue The key to be used is KUidBackupRestoreKey. The value is a bit-wise OR of a TBURPartType value and a TBackupIncType value This means that a normal state (i.e. non-backup or restore) is EBURNormal | ENoBackup but If the key has not been set (i.e. == 0) then no backup or restore is in progress either


KBURPartTypeMask

const TUint KBURPartTypeMask;

Description

TBURPartType Bitmask


KBackupIncTypeMask

const TUint KBackupIncTypeMask;

Description

TBackupIncType Bitmask