CPosLmDisplayItem 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_cposlmdisplayitem.h>

Detailed Description

Displayable item.

A displayable item consists of a landmark or category and its database index. Database index is 0 if running single database search, and it is in the range [0, CPosLmMultiDbSearch::NumOfDatabasesInSearch - 1] in case of multiple database search. Thus, this class is a link between a landmark or a category and its database.

The class is usually not instantiated by client applications.


Public Types

enum   TDisplayItemType { ELandmarkItem = 0, ECategoryItem }
  Display item type. More...

Public Member Functions

virtual  ~CPosLmDisplayItem ()
  Destructor.
IMPORT_C TDisplayItemType  DisplayItemType () const
  Returns the type of the display item.
IMPORT_C TUint  DatabaseIndex () const
  Returns the index of the database, which contained item belongs to.
IMPORT_C const CPosLandmarkCategory Category () const
  Returns the category contained in the displayable item.
IMPORT_C const CPosLandmark Landmark () const
  Returns the landmark contained in the displayable item.
IMPORT_C TInt  GetDistance (TReal32 &aDistance) const
  Returns the distance to a position specified in the CPosLmNearestCriteria.
void  SetDatabaseIndex (TUint aDatabaseIndex)
void  SetDistance (TReal32 aDistance)

Static Public Member Functions

static IMPORT_C CPosLmDisplayItem NewL (CPosLandmark *aLandmark, TUint aDatabaseIndex=0)
  Two-phased constructor.
static IMPORT_C CPosLmDisplayItem NewL (CPosLandmarkCategory *aCategory, TUint aDatabaseIndex=0)
  Two-phased constructor.

Member Enumeration Documentation

enum CPosLmDisplayItem::TDisplayItemType
 

Display item type.

Enumerator:
ELandmarkItem  Landmark display item.

This indicates that the item contains a landmark and the Landmark function can be called to access it.

ECategoryItem  Category display item.

This indicates that the item contains a category and the Category function can be called to access it.


Constructor & Destructor Documentation

virtual CPosLmDisplayItem::~CPosLmDisplayItem  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C const CPosLandmarkCategory& CPosLmDisplayItem::Category  )  const
 

Returns the category contained in the displayable item.

Returns:
The category.
Panic:
"Landmarks Client"-EPosInvalidItemType The item type is not a category displayable item. See DisplayItemType.
IMPORT_C TUint CPosLmDisplayItem::DatabaseIndex  )  const
 

Returns the index of the database, which contained item belongs to.

The database index is associated with a database URI from the list of databases specified in CPosLmMultiDbSearch.

If display data is used in CPosLandmarkSearch, this function always returns 0.

Returns:
The database index of this displayable item.
IMPORT_C TDisplayItemType CPosLmDisplayItem::DisplayItemType  )  const
 

Returns the type of the display item.

Returns:
The display item type.
IMPORT_C TInt CPosLmDisplayItem::GetDistance TReal32 &  aDistance  )  const
 

Returns the distance to a position specified in the CPosLmNearestCriteria.

The distance data is only used when searching with this criteria.

Parameters:
[out]  aDistance  Distance to the position specified in a CPosLmNearestCriteria.
Returns:
KErrNone if distance is available. KErrNotFound otherwise.
IMPORT_C const CPosLandmark& CPosLmDisplayItem::Landmark  )  const
 

Returns the landmark contained in the displayable item.

Returns:
The landmark.
Panic:
"Landmarks Client"-EPosInvalidItemType The item type is not a landmark displayable item. See DisplayItemType.
static IMPORT_C CPosLmDisplayItem* CPosLmDisplayItem::NewL CPosLandmarkCategory aCategory,
TUint  aDatabaseIndex = 0
[static]
 

Two-phased constructor.

Parameters:
[in]  aCategory  A category.
[in]  aDatabaseIndex  A database index.
Returns:
A new instance of this class.
static IMPORT_C CPosLmDisplayItem* CPosLmDisplayItem::NewL CPosLandmark aLandmark,
TUint  aDatabaseIndex = 0
[static]
 

Two-phased constructor.

Parameters:
[in]  aLandmark  A landmark.
[in]  aDatabaseIndex  A database index.
Returns:
A new instance of this class.
void CPosLmDisplayItem::SetDatabaseIndex TUint  aDatabaseIndex  ) 
 
void CPosLmDisplayItem::SetDistance TReal32  aDistance  ) 
 

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

Copyright © Nokia Corporation 2001-2008
Back to top