conn::CActiveBackupCallbackHandler Class Reference

class conn::CActiveBackupCallbackHandler : public CActive

CActiveBackupCallbackHandler is used to handle the asynchronous calls back from the active backup server. IPC only allows client initiated message transfer and hence the Active Backup Callback Handler must prime the server with an initial message and use the async response to "send" a message to the client side.

Inherits from

Constructor & Destructor Documentation

CActiveBackupCallbackHandler(MActiveBackupDataClient *, RABClientSession &)

CActiveBackupCallbackHandler(MActiveBackupDataClient *aABDC,
RABClientSession &aClientSession
)[private]
C++ Constructor
panic
KErrArgument if the pointer aABDC is NULL

Parameters

MActiveBackupDataClient * aABDCpointer to the client's callback implementation
RABClientSession & aClientSessionreference to the client's session

~CActiveBackupCallbackHandler()

~CActiveBackupCallbackHandler()[virtual]

Empty virtual destructor to avoid memory leaks

C++ Destructor

Member Functions Documentation

ConstructL()

voidConstructL()

Add this object to the scheduler

panic
KErrNotFound Debug only - If an ActiveScheduler is not installed
leave
Release only - If an ActiveScheduler is not installed

CreateFixedBufferL()

TPtr8 CreateFixedBufferL()[private]

Creates a buffer of the exact size.

DoCancel()

voidDoCancel()[virtual]

Immediately cancel any outstanding calls to the backup engine

NewL(MActiveBackupDataClient *, RABClientSession &)

CActiveBackupCallbackHandler *NewL(MActiveBackupDataClient *aABDC,
RABClientSession &aClientSession
)[static]

Symbian first phase constructor

Parameters

MActiveBackupDataClient * aABDCpointer to the client's callback implementation
RABClientSession & aClientSessionreference to the client's session

PrimeServerForCallbackL()

voidPrimeServerForCallbackL()[private]

Reprime the server with a new IPC message to respond to

PrimeServerForCallbackWithResponseL(TInt)

voidPrimeServerForCallbackWithResponseL(TIntaResponse)[private]

Reprime the server with a new IPC message to respond to, sending the result of the previous callback

Parameters

TInt aResponseThe response to send back to the server i.e. the result of the last callback made

PrimeServerForCallbackWithResponseL(TDesC8 &)

voidPrimeServerForCallbackWithResponseL(TDesC8 &aResponse)[private]

Reprime the server with a new IPC message to respond to, sending the result of the previous callback

Parameters

TDesC8 & aResponseThe response to send back to the server i.e. the result of the last callback made

RunError(TInt)

TInt RunError(TIntaError)[virtual]

RunError implementation should send the leave code to the ABServer for propagation back to the SBEngine client. This enables any leaves from the callbacks to be returned to the PC for display/handling by the user

Handle any leaves that occur from within the RunL and hence from the callback methods. In order to propagate leaves over to the PC client, they must be sent to the backup engine to leave to the client

Parameters

TInt aErrorThe leave code that has been trapped from within the RunL. Propagate this code to the engine

RunL()

voidRunL()[virtual]

RunL will synchronously call the callback implementation passed in to this object

Handle messages "initiated" by the server. Because of IPC limitations, the client primes the server with a message containing modifiable package buffers that are filled with identifiers and arguments for the callback interface

StartListeningForServerMessagesL()

voidStartListeningForServerMessagesL()

Send an asynchronous IPC message to the server in order that it has a vehicle for "initiating" a callback on iActiveBackupDataClient. This should only be called once as it will start the active scheduler

Member Data Documentation

MActiveBackupDataClient * iActiveBackupDataClient

MActiveBackupDataClient *iActiveBackupDataClient[private]

Callback mixin implementation provided by the active backup client

TPckgBuf< TInt > iCallbackArg1

TPckgBuf< TInt >iCallbackArg1[private]

Modifiable package buf containing the first of a maximum of two arguments for the callback

TPckgBuf< TInt > iCallbackArg2

TPckgBuf< TInt >iCallbackArg2[private]

Modifiable package buf containing the second of a maximum of two arguments for the callback

TPckgBuf< TABCallbackCommands > iCallbackCommand

TPckgBuf< TABCallbackCommands >iCallbackCommand[private]

This modifiable package buf is set by the Server to define which callback should be called on the client

RABClientSession & iClientSession

RABClientSession &iClientSession[private]

The client session to call methods on

HBufC8 * iTransferBuffer

HBufC8 *iTransferBuffer[private]

Buffer for holding transferred data from server