EPOC   SDK Home Glossary Indexes Previous Next Up

CGsmPhoneBookSearch class


Contents


CGsmPhoneBookSearch class — Asynchronous phone book search

Section Contents


Overview

Derivation

CActive

Abstract: active object: provides facilities to encapsulate an asynchronous service, and to handle its completion using RunL().

Defined in

etelbgsm.h

Link against

gsmbas.lib

Description

This class enables clients to search through a phone book to locate search strings. The phone book to search is specified in the static function NewL(). The resulting phone book entries can be accessed via the CGsmPhoneBookSearchResults class.

Writing derived classes

This class is not intended for user derivation.


Construction and destruction


NewL() — Static constructor

static CGsmPhoneBookSearch* NewL(RGsmPhoneBook& aPhoneBook);

Description

Creates a new CGsmPhoneBookSearch initialised with the name of the phone book to be searched, and returns a handle to it.

Arguments

RGsmPhoneBook& aPhoneBook

The phone book to be searched.

Return value

CGsmPhoneBookSearch*

A handle to the new asynchronous phone book search object.

Leave considerations

CGsmPhoneBookSearch will be deleted if NewL() leaves.


~CGsmPhoneBookSearch() — Destructor

~CGsmPhoneBookSearch();

Description

The destructor frees all resources owned by the object, prior to its destruction. It invokes Cancel() to cancel any outstanding request, and removes the object from the active scheduler.


Phone book search functions


Start() — Start phone book search — asynchronous

void Start(const RGsmPhoneBook::TSearchString& aSearch,TRequestStatus& aStatus);

Description

This function starts a search through a phone book for entries that start with the search string.

Arguments

const RGsmPhoneBook::TSearchString& aSearch

The search string to be located. This is matched against the first letters in each entry.

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

Notes:

SearchResults() — Get phone book search results — asynchronous

CGsmPhoneBookResults* SearchResults() const;

Description

This function returns the results of the last phone book search performed using the Start() function.

Return value

CGsmPhoneBookResults*

A pointer to the results of the last phone book search.

EPOC       SDK Home Glossary Indexes Previous Next Up