#include <mw/EPos_CPosLandmarkCategory.h>
class CPosLandmarkCategory : public CBase |
Public Member Type Definitions | |
---|---|
typedef | TUint32 TAttributes |
Public Member Enumerations | |
---|---|
enum | _TAttributes { ENoAttribute, ECategoryName, EIcon, EAllAttributes } |
Public Member Functions | |
---|---|
virtual | ~CPosLandmarkCategory() |
IMPORT_C TPosLmItemId | CategoryId() |
IMPORT_C TInt | GetCategoryName(TPtrC &) |
IMPORT_C TInt | GetIcon(TPtrC &, TInt &, TInt &) |
IMPORT_C TPosLmGlobalCategory | GlobalCategory() |
IMPORT_C CPosLandmarkCategory * | NewL() |
IMPORT_C CPosLandmarkCategory * | NewL(const CPosLandmarkCategory &) |
IMPORT_C CPosLandmarkCategory * | NewLC() |
IMPORT_C CPosLandmarkCategory * | NewLC(const CPosLandmarkCategory &) |
IMPORT_C void | RemoveCategoryAttributes(TAttributes) |
void | SetCategoryIdL(TPosLmItemId) |
IMPORT_C void | SetCategoryNameL(const TDesC &) |
void | SetGlobalCategory(TPosLmGlobalCategory) |
IMPORT_C void | SetIconL(const TDesC &, TInt, TInt) |
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 .
typedef TUint32 | TAttributes |
Bitmap for specifying a group of category attributes. Bit values are defined by _TAttributes .
IMPORT_C TPosLmItemId | CategoryId | ( | ) | 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.
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.
Parameter | Description |
---|---|
aIconFileName | The full icon file name. |
aIconIndex | The index of the icon within the icon file. |
aIconMaskIndex | The 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.
IMPORT_C TPosLmGlobalCategory | GlobalCategory | ( | ) | 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.
IMPORT_C CPosLandmarkCategory * | NewL | ( | ) | [static] |
Two-phased constructor.
Returns: A new instance of this class.
IMPORT_C CPosLandmarkCategory * | NewL | ( | const CPosLandmarkCategory & | aCategory | ) | [static] |
Two-phased copy constructor.
Parameter | Description |
---|---|
aCategory | The category to copy. |
Returns: A copy of the specified category object.
IMPORT_C CPosLandmarkCategory * | NewLC | ( | ) | [static] |
Two-phased constructor.
Returns: A new instance of this class.
IMPORT_C CPosLandmarkCategory * | NewLC | ( | const CPosLandmarkCategory & | aCategory | ) | [static] |
Two-phased copy constructor.
Parameter | Description |
---|---|
aCategory | The category to copy. |
Returns: A copy of the specified category object.
IMPORT_C void | RemoveCategoryAttributes | ( | TAttributes | aAttributes | ) |
Removes category attributes from the landmark category.
Parameter | Description |
---|---|
aAttributes | A bitmap specifying which category attributes to remove. |
IMPORT_C void | SetCategoryNameL | ( | const TDesC & | aCategoryName | ) |
Sets the name of the landmark category.
Parameter | Description |
---|---|
aCategoryName | The category name. |
void | SetGlobalCategory | ( | TPosLmGlobalCategory | aGlobalCategory | ) |
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.
Parameter | Description |
---|---|
aIconFileName | The full icon file name. |
aIconIndex | The index of the icon within the icon file. |
aIconMaskIndex | The index of the icon mask within the icon file. |