CAsyncRetrieveVariableLengthBufferV2 Class Reference

class CAsyncRetrieveVariableLengthBufferV2 : public CActive

Base class for generic actions in retrieving a variable length buffer in two phases.

This class is abstract.

Inherits from

Constructor & Destructor Documentation

CAsyncRetrieveVariableLengthBufferV2()

IMPORT_C CAsyncRetrieveVariableLengthBufferV2 ( ) [protected]

Default constructor.

~CAsyncRetrieveVariableLengthBufferV2()

IMPORT_C ~CAsyncRetrieveVariableLengthBufferV2 ( ) [protected, virtual]

Default destructor.

Member Functions Documentation

CancelReq(TInt, TInt)

void CancelReq ( TInt aIpc1,
TInt aIpc2
) [private, pure virtual]

Parameters

TInt aIpc1
TInt aIpc2

CompleteIfInUse(TRequestStatus &)

IMPORT_C TBool CompleteIfInUse ( TRequestStatus & aReqStatus ) [protected]

This method checks whether the AO is currently in use or not If it is in use, then the client's request is completed with KErrInUse

Parameters

TRequestStatus & aReqStatus

DoCancel()

IMPORT_C void DoCancel ( ) [private, virtual]

This method cancels the active phase of the retrieval It is called from the CActive::Cancel() method.

FreeBuffer()

IMPORT_C void FreeBuffer ( ) [protected]

This method deallocates the buffer used to hold the retrieved data

Get(TInt, TRequestStatus &, TDes8 &, TDes8 &)

void Get ( TInt aIpc,
TRequestStatus & aReqStatus,
TDes8 & aDes1,
TDes8 & aDes2
) [private, pure virtual]

Parameters

TInt aIpc
TRequestStatus & aReqStatus
TDes8 & aDes1
TDes8 & aDes2

RestoreListL()

IMPORT_C void RestoreListL ( ) [private, virtual]

Does nothing. Should be overriden in concrete derived classes.

RunL()

IMPORT_C void RunL ( ) [private, virtual]

This method processes the completion of each asynchronous phase of the retrieval If phase 1 is now complete, it starts phase 2 If phase 2 is now complete, it complete's the client's request.

Start(TRequestStatus &, TDes8 *, TDes8 *)

IMPORT_C void Start ( TRequestStatus & aReqStatus,
TDes8 * aPhase1Request,
TDes8 * aPhase2Request
) [protected]

This method performs the first phase of the retrieval of a variable length buffer The first phase consists of retrieving the size of buffer to be read

Parameters

TRequestStatus & aReqStatus returns the result code after the asynchronous call completes
TDes8 * aPhase1Request Pointer to data associated with phase 1
TDes8 * aPhase2Request Pointer to data associated with phase 2

StartPhase2L()

void StartPhase2L ( ) [private]

This method performs the second phase of the retrieval of a variable length buffer The second phase consists of allocating a buffer of the appropriate size and then filling it by reading the data across from the TSY.

Member Enumerations Documentation

Enum anonymous

Maintains the current phase of buffer retrieval.

Enumerators

EIdle
ERetrievePhase1
ERetrievePhase2

Member Data Documentation

TPckgBuf< TInt > iBufferSize

TPckgBuf < TInt > iBufferSize [private]

TInt iIpcCancel

TInt iIpcCancel [protected]

TInt iIpcPhase1

TInt iIpcPhase1 [protected]

TInt iIpcPhase2

TInt iIpcPhase2 [protected]

TDes8 * iPhase1RequestData

TDes8 * iPhase1RequestData [private]

TDes8 * iPhase2RequestData

TDes8 * iPhase2RequestData [private]

CBufBase * iResultsBuf

CBufBase * iResultsBuf [protected]

TPtr8 iResultsPtr

TPtr8 iResultsPtr [protected]

enum CAsyncRetrieveVariableLengthBufferV2::@61 iState

enum CAsyncRetrieveVariableLengthBufferV2::@61 iState [protected]

Maintains the current phase of buffer retrieval.

TRequestStatus * iUserStatus

TRequestStatus * iUserStatus [private]

Pointer to the user's asynchronous request status object.