CIdleFinder Class Reference

class CIdleFinder : public CIdle

Provides information about the progress of an asynchronous contact database search, and can be used to get the results of the search.

An instance of this class is returned by calls to CContactDatabase::FindAsyncL() and CContactDatabase::FindInTextDefAsyncL() .

Inherits from

Public Member Functions
~CIdleFinder ()
IMPORT_C TInt Error ()
IMPORT_C TBool IsComplete ()
TInt RunError ( TInt )
IMPORT_C CContactIdArray * TakeContactIds ()
Private Member Functions
CIdleFinder ( CContactDatabase &, const CContactItemFieldDef *, const CContactTextDef *, MIdleFindObserver *)
TInt CallbackL ( TAny *)
TBool CheckFindL ( TContactItemId )
TBool CheckFindL ()
void ConstructL (const TDesC *, const MDesCArray *, const TCallBack *)
void DoCancel ()
CIdleFinder * NewL ( CContactDatabase &, const TDesC &, const CContactItemFieldDef *, MIdleFindObserver *)
CIdleFinder * NewL ( CContactDatabase &, const MDesCArray *, const CContactTextDef *, MIdleFindObserver *, const TCallBack &)
TBool ScanForMatchL (const TDesC &, const TDesC &, CFoundMatches *)
void Start ()
TBool doFindL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CIdle::CIdle(TInt)
CIdle::New(TInt)
CIdle::NewL(TInt)
CIdle::RunL()
CIdle::Start(TCallBack)
CIdle::~CIdle()
Private Member Enumerations
enum TAsyncFindState { EFindInBlobFinished  = 0x00000001, EFindInIdentityFinished  = 0x00000002, EFindInEmailFinished  = 0x00000004, EFindInTextDefFinished  = 0x00000008 }
Inherited Enumerations
CActive:TPriority
Private Attributes
CContactDatabase * iContactDatabase
TInt iError
const CContactItemFieldDef * iFieldDef
CDesCArray * iFindWords
CContactIdArray * iIdsFound
MIdleFindObserver * iObserver
TBool iOwnsIds
TInt iReserved1
TInt iReserved10
TInt iReserved2
TInt iReserved3
TInt iReserved4
TInt iReserved5
TInt iReserved6
TInt iReserved7
TInt iReserved8
TInt iReserved9
const CContactTextDef * iTextDef
TCallBack iWordParserCallback
Inherited Attributes
CActive::iStatus
CIdle::iCallBack

Constructor & Destructor Documentation

CIdleFinder(CContactDatabase &, const CContactItemFieldDef *, const CContactTextDef *, MIdleFindObserver *)

CIdleFinder ( CContactDatabase & aContactDatabase,
const CContactItemFieldDef * aFieldDef,
const CContactTextDef * aTextDef,
MIdleFindObserver * aObserver
) [private]

CIdleFinder constructor.

Parameters

CContactDatabase & aContactDatabase
const CContactItemFieldDef * aFieldDef
const CContactTextDef * aTextDef
MIdleFindObserver * aObserver

~CIdleFinder()

~CIdleFinder ( )

CIdleFinder destructor.

Member Functions Documentation

CallbackL(TAny *)

TInt CallbackL ( TAny * aSelf ) [private, static]

Parameters

TAny * aSelf

CheckFindL(TContactItemId)

TBool CheckFindL ( TContactItemId aContactId ) const [private]

Use the client supplied "find words parser" to check for a match of the "find words" within the text fields in the given Contact Item.

Parameters

TContactItemId aContactId

CheckFindL()

TBool CheckFindL ( ) const [private]

ConstructL(const TDesC *, const MDesCArray *, const TCallBack *)

void ConstructL ( const TDesC * aText,
const MDesCArray * aFindWords,
const TCallBack * aWordParserCallback
) [private]

Initialise and start the asynchronous find.

Parameters

const TDesC * aText
const MDesCArray * aFindWords
const TCallBack * aWordParserCallback

DoCancel()

void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

Error()

IMPORT_C TInt Error ( ) const

Get the last asynchronous find error.

IsComplete()

IMPORT_C TBool IsComplete ( ) const

Determine if the asynchronous find is complete.

NewL(CContactDatabase &, const TDesC &, const CContactItemFieldDef *, MIdleFindObserver *)

CIdleFinder * NewL ( CContactDatabase & aContactDatabase,
const TDesC & aText,
const CContactItemFieldDef * aFieldDef,
MIdleFindObserver * aObserver
) [private, static]

CIdleFinder object factory. This form of NewL() should be used when performing an asynchronous find using text and a field definition.

Parameters

CContactDatabase & aContactDatabase
const TDesC & aText
const CContactItemFieldDef * aFieldDef
MIdleFindObserver * aObserver

NewL(CContactDatabase &, const MDesCArray *, const CContactTextDef *, MIdleFindObserver *, const TCallBack &)

CIdleFinder * NewL ( CContactDatabase & aContactDatabase,
const MDesCArray * aFindWords,
const CContactTextDef * aTextDef,
MIdleFindObserver * aObserver,
const TCallBack & aWordParserCallback
) [private, static]

CIdleFinder object factory. This form of NewL() should be used when performing an asynchronous find using "find words"/"find words parser" and a text definition.

Parameters

CContactDatabase & aContactDatabase
const MDesCArray * aFindWords
const CContactTextDef * aTextDef
MIdleFindObserver * aObserver
const TCallBack & aWordParserCallback

RunError(TInt)

TInt RunError ( TInt aError ) [virtual]

Parameters

TInt aError

ScanForMatchL(const TDesC &, const TDesC &, CFoundMatches *)

TBool ScanForMatchL ( const TDesC & aFieldText,
const TDesC & aFindText,
CFoundMatches * aFoundMatches
) const [private]

Parameters

const TDesC & aFieldText
const TDesC & aFindText
CFoundMatches * aFoundMatches

Start()

void Start ( ) [private]

Set the CIdle object going.

TakeContactIds()

IMPORT_C CContactIdArray * TakeContactIds ( )

Get and take ownership of the Contact IDs.

doFindL()

TBool doFindL ( ) [private]

CIdle callback method. Makes an IPC call into the Server to perform a find iteration.

On return from the find iteration from the Server if "find words" were specified when initialising the find then the client supplied "find words parser" is invoked to search the returned Contact IDs. The search cannot be performed on the server because it is not possible to provide the client supplied callback to the server.

Member Enumerations Documentation

Enum TAsyncFindState

Enumerators

EFindInBlobFinished = 0x00000001
EFindInIdentityFinished = 0x00000002
EFindInEmailFinished = 0x00000004
EFindInTextDefFinished = 0x00000008

Member Data Documentation

CContactDatabase * iContactDatabase

CContactDatabase * iContactDatabase [private]

TInt iError

TInt iError [private]

const CContactItemFieldDef * iFieldDef

const CContactItemFieldDef * iFieldDef [private]

CDesCArray * iFindWords

CDesCArray * iFindWords [private]

CContactIdArray * iIdsFound

CContactIdArray * iIdsFound [private]

MIdleFindObserver * iObserver

MIdleFindObserver * iObserver [private]

TBool iOwnsIds

TBool iOwnsIds [private]

TInt iReserved1

TInt iReserved1 [private]

TInt iReserved10

TInt iReserved10 [private]

TInt iReserved2

TInt iReserved2 [private]

TInt iReserved3

TInt iReserved3 [private]

TInt iReserved4

TInt iReserved4 [private]

TInt iReserved5

TInt iReserved5 [private]

TInt iReserved6

TInt iReserved6 [private]

TInt iReserved7

TInt iReserved7 [private]

TInt iReserved8

TInt iReserved8 [private]

TInt iReserved9

TInt iReserved9 [private]

const CContactTextDef * iTextDef

const CContactTextDef * iTextDef [private]

TCallBack iWordParserCallback

TCallBack iWordParserCallback [private]