Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: CNTDB.H
Link against: cntmodel.lib

Class TContactIter

class TContactIter;

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.

Members

Defined in TContactIter:
FirstL(), GotoL(), LastL(), NextL(), PreviousL(), Reset(), TContactIter()


Construction and destruction


TContactIter()

IMPORT_C TContactIter(CContactDatabase &aDatabase);

Description

Constructs the object with a contact database.

Parameters

CContactDatabase &aDatabase

The contact database over which to iterate.

[Top]


Member functions


FirstL()

IMPORT_C TContactItemId FirstL();

Description

Moves to the first contact item in the database.

Return value

TContactItemId

The ID of the first contact item.


NextL()

IMPORT_C TContactItemId NextL();

Description

Moves to the next contact item in the database.

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

Return value

TContactItemId

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


PreviousL()

IMPORT_C TContactItemId PreviousL();

Description

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

TContactItemId

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


LastL()

IMPORT_C TContactItemId LastL();

Description

Moves to the last contact item in the database.

Return value

TContactItemId

The ID of the last contact item.


GotoL()

IMPORT_C void GotoL(TContactItemId aContactId);

Description

Moves to the specified contact item.

Parameters

TContactItemId aContactId

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


Reset()

IMPORT_C void Reset();

Description

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