CPosLmCategoryCriteria Class Reference

API published in: S60 3rd Ed

Link against: eposlmsearchlib.lib eposlmmultidbsearch.lib

Capability Information

Required Capabilities

None

Exceptions

The capability ReadUserData is required in:

CPosLandmarkSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLandmarkSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, const TPosLmSortPref & aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLandmarkSearch::StartCategorySearchL( const CPosLmSearchCriteria & aCriteria, CPosLmCategoryManager::TCategorySortPref aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartLandmarkSearchL( const CPosLmSearchCriteria & aCriteria, const TPosLmSortPref & aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

CPosLmMultiDbSearch::StartCategorySearchL( const CPosLmSearchCriteria & aCriteria, CPosLmCategoryManager::TCategorySortPref aSortPref, TBool aSearchOnlyPreviousMatches = EFalse );

Other Information

The capability NetworkServices is required to work with remote databases.


#include <epos_cposlmcategorycriteria.h>

Inherits CPosLmSearchCriteria.


Detailed Description

Criterion used for searching for landmarks which belong to a certain category.

A category has an ID in the database and it has also a unique name. There are also some global categories which are known by all databases. It is possible to specify either a local category in a specific landmark database, a global category or the name of the category. If one is set, the others are reset and not used.

It is also possible to search for uncategorized landmarks, i.e. landmarks which do not contain any categories. If neither item ID, global ID nor name are set, then CPosLandmarkSearch::StartLandmarkSearchL will search for uncategorized landmarks.

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.


Public Member Functions

virtual  ~CPosLmCategoryCriteria ()
  Destructor.
IMPORT_C TPosLmItemId  CategoryItemId () const
  Returns the item ID of the category which should be used as landmark search criterion.
IMPORT_C TPosLmGlobalCategory  GlobalCategory () const
  Returns the global category which should be used as landmark search criterion.
IMPORT_C TPtrC  CategoryName () const
  Returns the name of the category which should be used as landmark search criterion.
IMPORT_C void  SetCategoryItemId (TPosLmItemId aItemId)
  Sets the item ID of the category which should be used as landmark search criterion.
IMPORT_C void  SetGlobalCategory (TPosLmGlobalCategory aGlobalCategory)
  Sets the global category which should be used as landmark search criterion.
IMPORT_C void  SetCategoryNameL (const TDesC &aCategoryName)
  Sets the name of the category which should be used as landmark search criterion.

Static Public Member Functions

static IMPORT_C CPosLmCategoryCriteria NewLC ()
  Two-phased constructor.

Constructor & Destructor Documentation

virtual CPosLmCategoryCriteria::~CPosLmCategoryCriteria  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C TPosLmItemId CPosLmCategoryCriteria::CategoryItemId  )  const
 

Returns the item ID of the category which should be used as landmark search criterion.

Returns:
The item ID of the category or KPosLmNullItemId if not set.
IMPORT_C TPtrC CPosLmCategoryCriteria::CategoryName  )  const
 

Returns the name of the category which should be used as landmark search criterion.

Returns:
The category name or empty descriptor if not set.
IMPORT_C TPosLmGlobalCategory CPosLmCategoryCriteria::GlobalCategory  )  const
 

Returns the global category which should be used as landmark search criterion.

Returns:
The global category or KPosLmNullGlobalCategory if not set.
static IMPORT_C CPosLmCategoryCriteria* CPosLmCategoryCriteria::NewLC  )  [static]
 

Two-phased constructor.

Returns:
A new instance of this class.
IMPORT_C void CPosLmCategoryCriteria::SetCategoryItemId TPosLmItemId  aItemId  ) 
 

Sets the item ID of the category which should be used as landmark search criterion.

Passing KPosLmNullItemId means uncategorized landmarks search.

Parameters:
aItemId  The item ID of the category.
IMPORT_C void CPosLmCategoryCriteria::SetCategoryNameL const TDesC &  aCategoryName  ) 
 

Sets the name of the category which should be used as landmark search criterion.

The exact category name must be specified. Wild-card characters are not used as such, they will be considered as ordinary characters. It is possible to use CPosLmCatNameCriteria to list categories which match a category name pattern containing wild-card characters.

The matching is case sensitive.

An empty descriptor means uncategorized landmarks search.

Parameters:
aCategoryName  The category name.
Leave:
KErrArgument The category name is longer than KPosLmMaxCategoryNameLength.
IMPORT_C void CPosLmCategoryCriteria::SetGlobalCategory TPosLmGlobalCategory  aGlobalCategory  ) 
 

Sets the global category which should be used as landmark search criterion.

Passing KPosLmNullGlobalCategory means uncategorized landmarks search.

Parameters:
aGlobalCategory  The global category.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top