EPOC   SDK Home Glossary Indexes Previous Next Up

CGsmPhoneBookResults class


Contents


CGsmPhoneBookResults class — Phone book search results storage

Section Contents


Overview

Derivation

CBase

Abstract: CBase behaviour

Defined in

etelbgsm.h

Link against

gsmbas.lib

Description

This class stores the results of phone book searches — see RGsmPhoneBook::SearchLC() and CGsmPhoneBookSearch::SearchResults().

In both cases, instances of this class are created by the respective function. In the asynchronous variant the results are owned by the CGsmPhoneBookSearch class. In the synchronous variant the results are placed on the clean-up stack, and are owned by the client.

Writing derived classes

This class is not intended for user derivation.


Construction and destruction

Clients should not call a constructor to create this object. Instances of this class are created by the functions used to initiate the search.


~CGsmPhoneBookResults() — Destructor

~CGsmPhoneBookResults();

Description

The destructor frees all resources owned by the object, prior to its destruction.


Query functions


EnumerateEntries() — Enumerate phone book search results

TInt EnumerateEntries(TInt& aCount);

Description

This function retrieves the number of entries in the results list — e.g. the number of results that match the last search string.

Arguments

TInt& aCount

On return, contains the number of entries matching the search string.

Return value

TInt

An error code: see System error codes.


GetEntry() — Get entry by index

TInt GetEntry(TInt aPosition,RGsmPhoneBook::TEntry& aEntry);

Description

This function retrieves a specific phone book entry from the search results.

Arguments

TInt aPosition

The index of the entry to be returned. The index is from within the sub-set of entries which match the search string — returned by the previous search — not the number of a physical slot within the phone book.

RGsmPhoneBook::TEntry& aEntry

On return, contains the specified phone book entry.

Return value

TInt

An error code: see System error codes.

Notes:

GetNextEntry() — Get next entry

TInt GetNextEntry(RGsmPhoneBook::TEntry& aEntry);

Description

This function returns the next phone book entry, with respect to the results cursor, in a search result list.

Arguments

RGsmPhoneBook::TEntry& aEntry

On return, contains the next entry.

Return value

TInt

An error code: see System error codes.

Notes:

GetPreviousEntry() — Get previous entry

TInt GetPreviousEntry(RGsmPhoneBook::TEntry& aEntry);

Description

This function returns the previous phone book entry, with respect to the results cursor, in a search result list.

Arguments

RGsmPhoneBook::TEntry& aEntry

On return, contains the previous entry.

Return value

TInt

An error code: see System error codes.

Notes:

Reset() — Reset all entries

void Reset();

Description

This function resets all entries in the search list to zero.


Enumerations


Anonymous enum — Panic constant for browsing phone search results list

KPanicInvalidResultsIndex

Invalid phone book search results index.

EPOC       SDK Home Glossary Indexes Previous Next Up