CContactOpenOperation Class Reference

#include <app/cntdb.h>

Link against: cntmodel.lib

class CContactOpenOperation : private CActive, private CActive

Inherits from

Detailed Description

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.

See also: CContactDatabase::OpenL()

Constructor & Destructor Documentation

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


Member Function Documentation

NewL ( TRequestStatus & )

CContactOpenOperation *NewL(TRequestStatus &aPtrStatus)[static]

NewL ( const TDesC &, TRequestStatus & )

CContactOpenOperation *NewL(const TDesC &aFileName,
TRequestStatus &aPtrStatus

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.

See also: CContactDatabase::Open()

Return Value
A pointer to the CContactDatabase on the first call after the asynchronous open has succeeded. Otherwise NULL.