CContactOpenOperation Class Reference

class CContactOpenOperation : private CActive

A class that manages the asynchronous open operation for a CContactDatabase .

The object can be deleted before the asynchronous open completes. This will set the state of the client supplied TRequestStatus to KErrCancel.

When the client supplied TRequestStatus is completed with KErrNone the TakeDatabase() method is called to pass ownership of the open database to the client.

CContactDatabase::OpenL()

Inherits from

Constructor & Destructor Documentation

CContactOpenOperation(TRequestStatus &)

CContactOpenOperation ( TRequestStatus & aClientStatus ) [private]

Parameters

TRequestStatus & aClientStatus

~CContactOpenOperation()

IMPORT_C ~CContactOpenOperation ( )

Deletes the active object.

If the asynchronous open is still in progress it is cancelled.

If the TakeDatabase() API has not been called and the database has been opened it is closed.

capability
None

Member Functions Documentation

ConstructL(const TDesC &)

void ConstructL ( const TDesC & aFileName =  KNullDesC ) [private]
capability
ReadUserData
leave
KErrArgument if the given descriptor contains more than the maximum length of 190 characters.

Parameters

const TDesC & aFileName =  KNullDesC

DoCancel()

void DoCancel ( ) [private, virtual]

For BC only, CActive is not used here.

NewL(TRequestStatus &)

CContactOpenOperation * NewL ( TRequestStatus & aPtrStatus ) [static]
capability
ReadUserData

Parameters

TRequestStatus & aPtrStatus

NewL(const TDesC &, TRequestStatus &)

CContactOpenOperation * NewL ( const TDesC & aFileName,
TRequestStatus & aPtrStatus
) [static]
capability
ReadUserData

Parameters

const TDesC & aFileName
TRequestStatus & aPtrStatus

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]

For BC only, CActive is not used here.

Parameters

TInt aError

RunL()

void RunL ( ) [private, virtual]

For BC only, CActive is not used here.

TakeDatabase()

IMPORT_C CContactDatabase * TakeDatabase ( )

Takes ownership of the contact database.

Ownership of the contact database is passed to the client. Subsequent calls return NULL.

CContactDatabase::Open()

Member Data Documentation

TRequestStatus * iClientStatus

TRequestStatus * iClientStatus [private]

CContactDatabase * iContactDatabase

CContactDatabase * iContactDatabase [private]