TContactIter Class Reference

#include <app/cntdb.h>

class TContactIter
Public Member Functions
TContactIter(CContactDatabase &)
IMPORT_C TContactItemIdFirstL()
IMPORT_C voidGotoL(TContactItemId)
IMPORT_C TContactItemIdLastL()
IMPORT_C TContactItemIdNextL()
IMPORT_C TContactItemIdPreviousL()
IMPORT_C voidReset()

Detailed Description

Iterates through the sorted contact items in a contact database.

A value of KNullContactId is returned by the iterator if a requested item cannot be found.

Constructor & Destructor Documentation

TContactIter ( CContactDatabase & )

IMPORT_CTContactIter(CContactDatabase &aDatabase)

Constructs the object with a contact database.

Parameters
aDatabaseThe contact database over which to iterate.

Member Function Documentation

FirstL ( )

IMPORT_C TContactItemIdFirstL()

Moves to the first contact item in the database.

Return Value
The ID of the first contact item.

GotoL ( TContactItemId )

IMPORT_C voidGotoL(TContactItemIdaContactId)

Moves to the specified contact item.

Parameters
aContactIdA contact item ID. Must not have a value of KNullContactId, or the function raises a panic.

LastL ( )

IMPORT_C TContactItemIdLastL()

Moves to the last contact item in the database.

Return Value
The ID of the last contact item.

NextL ( )

IMPORT_C TContactItemIdNextL()

Moves to the next contact item in the database.

On a newly initialised TContactIter, this function moves to the first item.

Return Value
The ID of the next contact item. Has a value of KNullContactId if there are no more items.

PreviousL ( )

IMPORT_C TContactItemIdPreviousL()

Moves to the previous contact item in the database.

Note: you must not call this function on a newly initialised database, otherwise the function raises a panic.

Return Value
The ID of the previous contact item. Has a value of KNullContactId if there is no previous item.

Reset ( )

IMPORT_C voidReset()

Resets the iterator to its initialised state, so that a subsequent call to NextL() goes to the first item.