CCntIdleSorter Class Reference

class CCntIdleSorter : public CBase

Inherits from

Constructor & Destructor Documentation

CCntIdleSorter()

CCntIdleSorter ( ) [private]

CCntIdleSorter(CContactDatabase &)

CCntIdleSorter ( CContactDatabase & aContactDatabase ) [private]

Parameters

CContactDatabase & aContactDatabase

~CCntIdleSorter()

~CCntIdleSorter ( )

Member Functions Documentation

Cancel()

void Cancel ( )

Called as a result of a cancellation request by the CContactDatabase class.

CompleteRequest(TInt)

void CompleteRequest ( TInt aError =  KErrNone ) [private]

Complete the client's request status with the specified error value (KErrNone by default).

Parameters

TInt aError =  KErrNone

ConstructL()

void ConstructL ( ) [private]

HasObserver()

TBool & HasObserver ( ) [private, inline]

HasObserver()

TBool HasObserver ( ) const [private, inline]

NewL(CContactDatabase &)

CCntIdleSorter * NewL ( CContactDatabase & aContactDatabase ) [static]

Parameters

CContactDatabase & aContactDatabase

PeformSortStep()

TInt PeformSortStep ( ) [private]

Idle object callback which performs appropriate action based on internal state machine.

ReadContactsL(TInt)

TBool ReadContactsL ( TInt aNumber = 4 ) [private]

Read a single contact.

Parameters

TInt aNumber = 4

ReadSoFar()

TInt & ReadSoFar ( ) [private, inline]

ReadSoFar()

TInt ReadSoFar ( ) const [private, inline]

ReportProgressL()

void ReportProgressL ( ) [private]

if we have an observer, then we report progress as the sort is performed (in reality we actually only report progress during the read stage, not the sort itself).

ResetL()

void ResetL ( )

Initialise values to defaults.

SortCallBack(TAny *)

TInt SortCallBack ( TAny * aThis ) [private, static]

Callback function for idle object.

Parameters

TAny * aThis

SortListAndSaveL()

void SortListAndSaveL ( ) [private]

This function is called once the reading from the database is complete. It replaces the contact database's sorted list (takes ownership of iFinalItems).

StartSortingL(CArrayFix< CContactDatabase::TSortPref > *, TRequestStatus &)

void StartSortingL ( CArrayFix < CContactDatabase::TSortPref > * aSortOrder,
TRequestStatus & aStatus
)

Prepare and begin the sort.

StartSortingL(CArrayFix< CContactDatabase::TSortPref > *, TRequestStatus &, MContactSortObserver &)

void StartSortingL ( CArrayFix < CContactDatabase::TSortPref > * aSortOrder,
TRequestStatus & aStatus,
MContactSortObserver & aObserver
)

Sort with observer.

TotalCount()

TInt & TotalCount ( ) [private, inline]

TotalCount()

TInt TotalCount ( ) const [private, inline]

Member Enumerations Documentation

Enum TState

Enumerators

EReadContacts
ESortContacts

Member Data Documentation

TContactItemId iCurrentId

TContactItemId iCurrentId [private]

CContactDatabase & iDb

CContactDatabase & iDb [private]

CContactIdArray * iFinalItems

CContactIdArray * iFinalItems [private]

TBool iHasObserver

TBool iHasObserver [private]

CIdle * iIdle

CIdle * iIdle [private]

MContactSortObserver * iObserver

MContactSortObserver * iObserver [private]

TInt iReadSoFar

TInt iReadSoFar [private]

CArrayFix< CContactDatabase::TSortPref > * iSortOrder

CArrayFix < CContactDatabase::TSortPref > * iSortOrder [private]

TBool iSortStarted

TBool iSortStarted [private]

CSortArray * iSortedList

CSortArray * iSortedList [private]

TState iState

TState iState [private]

TRequestStatus * iStatus

TRequestStatus * iStatus [private]

TInt iTotalCount

TInt iTotalCount [private]