CPosLmDisplayItem Class Reference

#include <mw/EPos_CPosLmDisplayItem.h>

Link against: eposlmsearchlib.lib

class CPosLmDisplayItem : public CBase

Inherits from

  • CPosLmDisplayItem

    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.

    Since
    S60 3.0

    Member Enumeration Documentation

    Enum TDisplayItemType

    Display item type.

    EnumeratorValueDescription
    ELandmarkItem0

    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

    ~CPosLmDisplayItem ( )

    ~CPosLmDisplayItem()[virtual]

    Destructor.

    Member Function Documentation

    Category ( )

    IMPORT_C const CPosLandmarkCategory &Category()const

    Returns the category contained in the displayable item.

    panic
    "Landmarks Client"-EPosInvalidItemType The item type is not a category displayable item. See DisplayItemType .

    Returns: The category.

    DatabaseIndex ( )

    IMPORT_C TUintDatabaseIndex()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.

    DisplayItemType ( )

    IMPORT_C TDisplayItemTypeDisplayItemType()const

    Returns the type of the display item.

    Returns: The display item type.

    GetDistance ( TReal32 & )

    IMPORT_C TIntGetDistance(TReal32 &aDistance)const

    Returns the distance to a position specified in the CPosLmNearestCriteria . The distance data is only used when searching with this criteria.

    ParameterDescription
    aDistanceDistance to the position specified in a CPosLmNearestCriteria .

    Returns: KErrNone if distance is available. KErrNotFound otherwise.

    Landmark ( )

    IMPORT_C const CPosLandmark &Landmark()const

    Returns the landmark contained in the displayable item.

    panic
    "Landmarks Client"-EPosInvalidItemType The item type is not a landmark displayable item. See DisplayItemType .

    Returns: The landmark.

    NewL ( CPosLandmark *, TUint )

    IMPORT_C CPosLmDisplayItem *NewL(CPosLandmark *aLandmark,
    TUintaDatabaseIndex = 0
    )[static]

    Two-phased constructor.

    ParameterDescription
    aLandmarkA landmark.
    aDatabaseIndexA database index.

    Returns: A new instance of this class.

    NewL ( CPosLandmarkCategory *, TUint )

    IMPORT_C CPosLmDisplayItem *NewL(CPosLandmarkCategory *aCategory,
    TUintaDatabaseIndex = 0
    )[static]

    Two-phased constructor.

    ParameterDescription
    aCategoryA category.
    aDatabaseIndexA database index.

    Returns: A new instance of this class.

    SetDatabaseIndex ( TUint )

    voidSetDatabaseIndex(TUintaDatabaseIndex)

    SetDistance ( TReal32 )

    voidSetDistance(TReal32aDistance)