CPosLandmarkCategory Class Reference

class CPosLandmarkCategory : public CBase

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 .

eposlandmarks.lib
Since
S60 3.0

Inherits from

Public Member Functions
~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 )
Private Member Functions
CPosLandmarkCategory ()
CPosLandmarkCategory (const CPosLandmarkCategory &)
void ConstructL ()
void ConstructL (const CPosLandmarkCategory &)
CPosLandmarkCategory & operator= (const CPosLandmarkCategory &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum _TAttributes { ENoAttribute  = 0x0000, ECategoryName  = 0x0001, EIcon  = 0x0010, EAllAttributes  = 0xFFFF }
Public Member Type Definitions
typedef TUint32 TAttributes
Private Attributes
HBufC * iCategoryName
TPosLmGlobalCategory iGlobalCategory
HBufC * iIconFileName
TInt iIconIndex
TInt iIconMaskIndex
TPosLmItemId iId

Constructor & Destructor Documentation

CPosLandmarkCategory()

CPosLandmarkCategory ( ) [private]

CPosLandmarkCategory(const CPosLandmarkCategory &)

CPosLandmarkCategory ( const CPosLandmarkCategory & ) [private]

Parameters

const CPosLandmarkCategory &

~CPosLandmarkCategory()

~CPosLandmarkCategory ( ) [virtual]

Destructor.

Member Functions Documentation

CategoryId()

IMPORT_C TPosLmItemId CategoryId ( ) const

Reads the ID of the category entry in the database.

ConstructL()

void ConstructL ( ) [private]

ConstructL(const CPosLandmarkCategory &)

void ConstructL ( const CPosLandmarkCategory & aCategory ) [private]

Parameters

const CPosLandmarkCategory & aCategory

GetCategoryName(TPtrC &)

IMPORT_C TInt GetCategoryName ( TPtrC & aCategoryName ) const

Reads the name of the landmark category.

Parameters

TPtrC & aCategoryName Will contain the category name.

GetIcon(TPtrC &, TInt &, TInt &)

IMPORT_C TInt GetIcon ( 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.

Parameters

TPtrC & aIconFileName The full icon file name.
TInt & aIconIndex The index of the icon within the icon file.
TInt & aIconMaskIndex The index of the icon mask within the icon file. If no icon mask index is defined KPosLmIconMaskNotUsed is returned.

GlobalCategory()

IMPORT_C TPosLmGlobalCategory GlobalCategory ( ) const

Retrieves global category ID.

Global categories enable a uniform categorization across multiple databases.

NewL()

IMPORT_C CPosLandmarkCategory * NewL ( ) [static]

Two-phased constructor.

NewL(const CPosLandmarkCategory &)

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

Two-phased copy constructor.

Parameters

const CPosLandmarkCategory & aCategory The category to copy.

NewLC()

IMPORT_C CPosLandmarkCategory * NewLC ( ) [static]

Two-phased constructor.

NewLC(const CPosLandmarkCategory &)

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

Two-phased copy constructor.

Parameters

const CPosLandmarkCategory & aCategory The category to copy.

RemoveCategoryAttributes(TAttributes)

IMPORT_C void RemoveCategoryAttributes ( TAttributes aAttributes )

Removes category attributes from the landmark category.

Parameters

TAttributes aAttributes A bitmap specifying which category attributes to remove.

SetCategoryIdL(TPosLmItemId)

void SetCategoryIdL ( TPosLmItemId aId )

Parameters

TPosLmItemId aId

SetCategoryNameL(const TDesC &)

IMPORT_C void SetCategoryNameL ( const TDesC & aCategoryName )

Sets the name of the landmark category.

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

Parameters

const TDesC & aCategoryName The category name.

SetGlobalCategory(TPosLmGlobalCategory)

void SetGlobalCategory ( TPosLmGlobalCategory aGlobalCategory )

Parameters

TPosLmGlobalCategory aGlobalCategory

SetIconL(const TDesC &, TInt, TInt)

IMPORT_C void SetIconL ( const TDesC & aIconFileName,
TInt aIconIndex,
TInt aIconMaskIndex
)

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 .

Parameters

const TDesC & aIconFileName The full icon file name.
TInt aIconIndex The index of the icon within the icon file.
TInt aIconMaskIndex The index of the icon mask within the icon file.

operator=(const CPosLandmarkCategory &)

CPosLandmarkCategory & operator= ( const CPosLandmarkCategory & ) [private]

Parameters

const CPosLandmarkCategory &

Member Enumerations Documentation

Enum _TAttributes

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

Enumerators

ENoAttribute = 0x0000

No attribute specified.

ECategoryName = 0x0001

The name of the landmark category.

EIcon = 0x0010

The icon that represents the category in a UI.

EAllAttributes = 0xFFFF

All category attributes.

Member Type Definitions Documentation

Typedef TAttributes

typedef TUint32 TAttributes

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

Member Data Documentation

HBufC * iCategoryName

HBufC * iCategoryName [private]

TPosLmGlobalCategory iGlobalCategory

TPosLmGlobalCategory iGlobalCategory [private]

HBufC * iIconFileName

HBufC * iIconFileName [private]

TInt iIconIndex

TInt iIconIndex [private]

TInt iIconMaskIndex

TInt iIconMaskIndex [private]

TPosLmItemId iId

TPosLmItemId iId [private]