CPosLandmarkCategory Class Reference

#include <mw/EPos_CPosLandmarkCategory.h>

Link against: eposlandmarks.lib

class CPosLandmarkCategory : public CBase

Inherits from

  • CPosLandmarkCategory

    Detailed Description

    Landmark category.

    A landmark database can contain a number of categories which can be assigned to the landmarks in the database. A landmark can be associated with multiple categories, e.g. a landmark can be a "Restaurant" and a "Pub". Categories also enable filtered searches, e.g. a client could search for nearby restaurants.

    This class specifies the landmark category attributes, i.e. name, icon and a global category identifier. Global categories enable a uniform categorization across multiple databases.

    A landmark category is created, updated or deleted by using functions in CPosLmCategoryManager .

    Since
    S60 3.0

    Member Type Definition Documentation

    Typedef TAttributes

    typedef TUint32 TAttributes

    Bitmap for specifying a group of category attributes. Bit values are defined by _TAttributes .

    Member Enumeration Documentation

    Enum _TAttributes

    Specifies a category attribute, such as category name or category icon.

    EnumeratorValueDescription
    ENoAttribute0x0000

    No attribute specified.

    ECategoryName0x0001

    The name of the landmark category.

    EIcon0x0010

    The icon that represents the category in a UI.

    EAllAttributes0xFFFF

    All category attributes.

    Constructor & Destructor Documentation

    ~CPosLandmarkCategory ( )

    ~CPosLandmarkCategory()[virtual]

    Destructor.

    Member Function Documentation

    CategoryId ( )

    IMPORT_C TPosLmItemIdCategoryId()const

    Reads the ID of the category entry in the database.

    Returns: The ID of the category entry in the database, or KPosLmNullItemId if the category has not been added to the database yet.

    GetCategoryName ( TPtrC & )

    IMPORT_C TIntGetCategoryName(TPtrC &aCategoryName)const

    Reads the name of the landmark category.

    ParameterDescription
    aCategoryNameWill contain the category name.

    Returns: KErrNone if successful, KErrNotFound if the category name is not set.

    GetIcon ( TPtrC &, TInt &, TInt & )

    IMPORT_C TIntGetIcon(TPtrC &aIconFileName,
    TInt &aIconIndex,
    TInt &aIconMaskIndex
    )const

    Returns the a link to the icon associated with the landmark category.

    Icons are found in icon files. It is referenced by the name of the icon file and the index of the icon within the file.

    The landmark category is not affected if the icon file is changed or removed. It only contains a link to the icon. This means that the link could be invalid.

    ParameterDescription
    aIconFileNameThe full icon file name.
    aIconIndexThe index of the icon within the icon file.
    aIconMaskIndexThe index of the icon mask within the icon file. If no icon mask index is defined KPosLmIconMaskNotUsed is returned.

    Returns: KErrNone if successful, KErrNotFound if the icon is not set.

    GlobalCategory ( )

    IMPORT_C TPosLmGlobalCategoryGlobalCategory()const

    Retrieves global category ID.

    Global categories enable a uniform categorization across multiple databases.

    Returns: The global category ID or KPosLmNullGlobalCategory if the category is not global.

    NewL ( )

    IMPORT_C CPosLandmarkCategory *NewL()[static]

    Two-phased constructor.

    Returns: A new instance of this class.

    NewL ( const CPosLandmarkCategory & )

    IMPORT_C CPosLandmarkCategory *NewL(const CPosLandmarkCategory &aCategory)[static]

    Two-phased copy constructor.

    ParameterDescription
    aCategoryThe category to copy.

    Returns: A copy of the specified category object.

    NewLC ( )

    IMPORT_C CPosLandmarkCategory *NewLC()[static]

    Two-phased constructor.

    Returns: A new instance of this class.

    NewLC ( const CPosLandmarkCategory & )

    IMPORT_C CPosLandmarkCategory *NewLC(const CPosLandmarkCategory &aCategory)[static]

    Two-phased copy constructor.

    ParameterDescription
    aCategoryThe category to copy.

    Returns: A copy of the specified category object.

    RemoveCategoryAttributes ( TAttributes )

    IMPORT_C voidRemoveCategoryAttributes(TAttributesaAttributes)

    Removes category attributes from the landmark category.

    ParameterDescription
    aAttributesA bitmap specifying which category attributes to remove.

    SetCategoryIdL ( TPosLmItemId )

    voidSetCategoryIdL(TPosLmItemIdaId)

    SetCategoryNameL ( const TDesC & )

    IMPORT_C voidSetCategoryNameL(const TDesC &aCategoryName)

    Sets the name of the landmark category.

    leave
    KErrArgument Client passed an empty descriptor or landmark name is longer than KPosLmMaxCategoryNameLength.
    ParameterDescription
    aCategoryNameThe category name.

    SetGlobalCategory ( TPosLmGlobalCategory )

    voidSetGlobalCategory(TPosLmGlobalCategoryaGlobalCategory)

    SetIconL ( const TDesC &, TInt, TInt )

    IMPORT_C voidSetIconL(const TDesC &aIconFileName,
    TIntaIconIndex,
    TIntaIconMaskIndex
    )

    Associates the landmark category with an icon.

    Icons are found in icon files. To set an icon, the client must specify the name of the icon file and the index of the icon within the file.

    The landmark is not affected if the icon file is changed or removed. It only contains a link to the icon.

    leave
    KErrArgument The icon file name is longer than KMaxFileName.
    panic
    "Landmarks Client"-EPosLmInvalidArgument The icon index is negative or icon mask index is negative and not equal to KPosLmIconMaskNotUsed.
    ParameterDescription
    aIconFileNameThe full icon file name.
    aIconIndexThe index of the icon within the icon file.
    aIconMaskIndexThe index of the icon mask within the icon file.