Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: cntdb.h
Link against: cntmodel.lib

Class TContactIter

TContactIter

Support

Supported from 5.0

Description

Iterates through the sorted contact items in a contact database. A value of KNullContactId is returned by the iterator if a requested contact item cannot be found.

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


Construction


TContactIter()

TContactIter(CContactDatabase& aDatabase);

Description

Constructs the object with a contact database.

Parameters

CContactDatabase& aDatabase

The contact database on which to iterate.

[Top]


Navigation


FirstL()

TContactItemId FirstL();

Description

Goes to the first contact item in the database.

Return value

TContactItemId

The ID of the first contact item.


NextL()

TContactItemId NextL();

Description

Goes to the next contact item in the database. On a newly initialised TContactIter, this function goes 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()

TContactItemId PreviousL();

Description

Goes to the previous contact item in the database.

Notes

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()

TContactItemId LastL();

Description

Goes to the last contact item in the database.

Return value

TContactItemId

The ID of the last contact item.


GotoL()

void GotoL(TContactItemId aContactId);

Description

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

Leave codes

 

If the specified ID does not exist, the function leaves with KErrNotFound .

[Top]


Reset


Reset()

void Reset();

Description

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