CPosLmTextCriteria Class Reference

#include <mw/EPos_CPosLmTextCriteria.h>

Link against: eposlmsearchlib.lib

class CPosLmTextCriteria : public CPosLmSearchCriteria

Inherits from

Detailed Description

Criterion for searching for landmarks which contain a certain text.

The search is defined by providing a text to search for and the position fields and text attributes to search.

If no attributes are specified for the search, all text attributes in the landmarks are searched. If no position fields are specified, then all fields are searched.

If this criterion is passed to CPosLandmarkSearch::StartLandmarkSearchL , only landmarks which contain the specified text are returned.

Wild-card characters are supported.

This criterion is only valid when searching for landmarks, i.e. if it is passed to CPosLandmarkSearch::StartCategorySearchL, the function will fail with error code KErrArgument.

Since
S60 3.0

Constructor & Destructor Documentation

~CPosLmTextCriteria ( )

~CPosLmTextCriteria()[virtual]

Destructor.

Member Function Documentation

AttributesToSearch ( )

IMPORT_C CPosLandmark::TAttributesAttributesToSearch()const

Retrieves the landmark attributes which should be searched.

This function returns a bitmap of landmark attributes. The landmark attributes are defined by CPosLandmark::_TAttributes. It is only possible to search the ELandmarkName and EDescription attributes.

Returns: A bitmap indicating which landmark attributes should be searched.

ClearPositionFieldsToSearch ( )

IMPORT_C voidClearPositionFieldsToSearch()

Clears the position fields list used in a search.

GetPositionFieldsToSearchL ( RArray< TUint > & )

IMPORT_C voidGetPositionFieldsToSearchL(RArray< TUint > &aFieldArray)const

Retrieves a list of the position fields to search.

ParameterDescription
aFieldArrayOn return, contains a list of the position fields which are used in a search. If no position fields have been set, the array is empty. Position fields are identified by values defined in TPositionFieldId.

NewLC ( )

IMPORT_C CPosLmTextCriteria *NewLC()[static]

Two-phased constructor.

Returns: A new instance of this class.

SetAttributesToSearch ( CPosLandmark::TAttributes )

IMPORT_C voidSetAttributesToSearch(CPosLandmark::TAttributesaAttributes)

Sets which landmark attributes to search.

The client passes a bitmap of the landmark attributes to search. It is only possible to search the ELandmarkName and EDescription attributes.

panic
"Landmarks Client"-EPosInvalidLandmarkAttribute Unsupported attribute is passed.
ParameterDescription
aAttributesA bitmap indicating which landmark attributes should be searched.

SetPositionFieldsToSearchL ( const RArray< TUint > & )

IMPORT_C voidSetPositionFieldsToSearchL(const RArray< TUint > &aFieldArray)

Sets the position fields to search.

Any previously set position fields are cleared by this call.

ParameterDescription
aFieldArrayA list of the position fields to search. Position fields are identified by values defined in TPositionFieldId.

SetTextL ( const TDesC & )

IMPORT_C voidSetTextL(const TDesC &aText)

Sets the search string.

A non-empty text string must be set, otherwise CPosLandmarkSearch::StartLandmarkSearchL will leave with error code KErrArgument.

The search is case insensitive.

Wild-card characters "?" and "*" are supported in the search string. "?" matches a single occurrence of any character and "*" matches zero or more consecutive occurrences of any characters.

A landmark matches the criterion if specified text is found anywhere in selected attributes or position fields.

leave
KErrArgument The search string is longer than KPosLmMaxSearchStringLength.
ParameterDescription
aTextThe text to search for.

Text ( )

IMPORT_C TPtrCText()const

Retrieves the text to search for.

Returns: The text to search for.