conn::RABClientSession Class Reference

class conn::RABClientSession : public RSessionBase

The active backup client to the Secure Backup Engine.

Inherits from

Public Member Functions
RABClientSession()
voidBURModeInfoL(TDriveList &, TBURPartType &, TBackupIncType &)
voidCancelServerCallbackL()
voidClose()
voidConfirmReadyForBURL(TInt)
TInt Connect()
TBool DoesPartialBURAffectMeL()
HBufC8 *GetDataFromServerLC(const TInt, TABCallbackCommands)
HBufC8 *GetDataFromServerLC(const TInt, TABCallbackCommands, TDriveNumber &)
voidPrimeServerForCallbackL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TRequestStatus &)
voidPrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TInt, TRequestStatus &)
voidPrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TDesC8 &, TRequestStatus &)
voidPropagateLeave(TInt)
voidSendDataLengthToServerL(TDesC8 &, TBool, TABCallbackCommands)
TVersion Version()
Private Member Functions
TInt StartServer()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RABClientSession()

RABClientSession()

Class constructor.

Member Functions Documentation

BURModeInfoL(TDriveList &, TBURPartType &, TBackupIncType &)

voidBURModeInfoL(TDriveList &aDriveList,
TBURPartType &aBackupType,
TBackupIncType &aIncBackupType
)

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

Parameters

TDriveList & aDriveListlist of drives involved in backup and restore
TBURPartType & aBackupTypeenumerated type indicating whether a backup or restore is in progress and whether full or partial.
TBackupIncType & aIncBackupTypeenumerated type indicating whetherr a backup is base or incremental.

CancelServerCallbackL()

voidCancelServerCallbackL()

Inform the server that it can no longer call callbacks on the client

Close()

voidClose()

Closes the Secure Backup Engine handle.

ConfirmReadyForBURL(TInt)

voidConfirmReadyForBURL(TIntaErrorCode)

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 aErrorCodethis 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.

Connect()

TInt Connect()

Connects the handle to the Secure Backup Engine.

DoesPartialBURAffectMeL()

TBool DoesPartialBURAffectMeL()

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.

GetDataFromServerLC(const TInt, TABCallbackCommands)

HBufC8 *GetDataFromServerLC(const TIntaDataLength,
TABCallbackCommandsaCallbackRequestingData
)

Following a callback call to the Active Backup Callback Handler, this method requests the data from the server. aDataLength will have been supplied by the original callback call from the server and all that remains is to make a synchronous call to get it copied over

Parameters

const TInt aDataLengthThe length of the data that will be received
TABCallbackCommands aCallbackRequestingDataThe callback enum identifying the callback requesting this data

GetDataFromServerLC(const TInt, TABCallbackCommands, TDriveNumber &)

HBufC8 *GetDataFromServerLC(const TIntaDataLength,
TABCallbackCommandsaCallbackRequestingData,
TDriveNumber &aDriveNum
)

Following a callback call to the Active Backup Callback Handler, this method requests the data from the server. aDataLength will have been supplied by the original callback call from the server and all that remains is to make a synchronous call to get it copied over. This should only be called from a ReceiveSnapshot callback

Parameters

const TInt aDataLengthThe length of the data that will be received
TABCallbackCommands aCallbackRequestingDataThe callback enum identifying the callback requesting this data
TDriveNumber & aDriveNumThe drive number

PrimeServerForCallbackL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TRequestStatus &)

voidPrimeServerForCallbackL(TPckgBuf< TABCallbackCommands > &aCallback,
TPckgBuf< TInt > &aArg1,
TPckgBuf< TInt > &aArg2,
TRequestStatus &aStatus
)

Send an async message to the server so that it can call us back when it's ready to make callback's

Parameters

TPckgBuf< TABCallbackCommands > & aCallbackThis modifiable package buf is set by the server to indicate which callback to call
TPckgBuf< TInt > & aArg1This is the first argument for the callback, set by the server
TPckgBuf< TInt > & aArg2This is the second argument for the callback, set by the server
TRequestStatus & aStatusThe status

PrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TInt, TRequestStatus &)

voidPrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &aCallback,
TPckgBuf< TInt > &aArg1,
TPckgBuf< TInt > &aArg2,
TIntaResult,
TRequestStatus &aStatus
)

Send an async message to the server so that it can call us back when it's ready to make callback's. This call also returns a result from the previous callback for the server to respond to/return to the PC etc.

Parameters

TPckgBuf< TABCallbackCommands > & aCallbackThis modifiable package buf is set by the server to indicate which callback to call
TPckgBuf< TInt > & aArg1This is the first argument for the callback, set by the server
TPckgBuf< TInt > & aArg2This is the second argument for the callback, set by the server
TInt aResultThe return value of the previous callback to pass back to the server
TRequestStatus & aStatusThe status

PrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &, TPckgBuf< TInt > &, TPckgBuf< TInt > &, TDesC8 &, TRequestStatus &)

voidPrimeServerForCallbackWithResponseL(TPckgBuf< TABCallbackCommands > &aCallback,
TPckgBuf< TInt > &aArg1,
TPckgBuf< TInt > &aArg2,
TDesC8 &aResult,
TRequestStatus &aStatus
)

Send an async message to the server so that it can call us back when it's ready to make callback's. This call also returns a result from the previous callback for the server to respond to/return to the PC etc.

Pre-condition
A call to SendDataLengthToServerL must have preceeded this call so that the server may prepare to receive data

Parameters

TPckgBuf< TABCallbackCommands > & aCallbackThis modifiable package buf is set by the server to indicate which callback to call
TPckgBuf< TInt > & aArg1This is the first argument for the callback, set by the server
TPckgBuf< TInt > & aArg2This is the second argument for the callback, set by the server
TDesC8 & aResultData to send back to the server
TRequestStatus & aStatusThe status

PropagateLeave(TInt)

voidPropagateLeave(TIntaLeaveCode)

Send a synchronous IPC message to the server indicating that a leave has ocurred whilst executing a callback

Parameters

TInt aLeaveCodeThe code to leave back to the server with

SendDataLengthToServerL(TDesC8 &, TBool, TABCallbackCommands)

voidSendDataLengthToServerL(TDesC8 &aData,
TBoolaFinished,
TABCallbackCommandsaCallbackSendingData
)

Send the length and finished flag back to the server. Limitations of IPC mean that we can only send fixed size data to the server, hence the length and finished flag are sent first so that the server may allocate the appropriate amount of space prior to the response containing the data

Parameters

TDesC8 & aDataDescriptor containing the data to send back to the server. Only the length of this is sent in this message
TBool aFinishedFlag indicating that this is the last transfer from the client to server. If EFalse, the server must call the callback again
TABCallbackCommands aCallbackSendingDataThis

StartServer()

TInt StartServer()[private, static]

Start the server as a thread on WINS or a process on ARM.

Called by Connect when the kernel is unable to create a session with the AB server (if the process hosting it is not running).

Version()

TVersion Version()const

Returns the version of this API