CPosLandmarkCategory Class Reference

API published in: S60 3rd Ed

Link against: eposlandmarks.lib

Capability Information

Required Capabilities

None

Exceptions

The capability ReadUserData is required in:

CPosLandmarkDatabase::OpenL();

CPosLandmarkDatabase::OpenL( const TDesC & aDatabaseUri );

CPosLandmarkDatabase::InitializeL();

CPosLandmarkDatabase::ReadLandmarkLC( TPosLmItemId aLandmarkId );

CPosLandmarkDatabase::LandmarkIteratorL();

CPosLandmarkDatabase::LandmarkIteratorL( const TPosLmSortPref & aSortPref );

CPosLandmarkDatabase::AddLandmarkL( CPosLandmark & aLandmark );

CPosLandmarkDatabase::UpdateLandmarkL( const CPosLandmark & aLandmark );

CPosLandmarkDatabase::RemoveLandmarkL( TPosLmItemId aLandmarkId );

CPosLandmarkDatabase::RemoveLandmarksL( const RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLandmarkDatabase::RemoveAllLandmarksL();

CPosLandmarkDatabase::ReadPartialLandmarkLC( TPosLmItemId aLandmarkId );

CPosLandmarkDatabase::PreparePartialLandmarksL( const RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLandmarkDatabase::SizeL();

CPosLandmarkDatabase::CompactL();

CPosLandmarkDatabase::NotifyDatabaseEvent( TPosLmEvent & aEvent, TRequestStatus & aStatus );

CPosLandmarkDatabase::CancelNotifyDatabaseEvent();

CPosLandmarkDatabase::ImportLandmarksL( CPosLandmarkParser& aLandmarkParser, TTransferOptions aTransferOptions );

CPosLandmarkDatabase::ImportLandmarksL( CPosLandmarkParser& aLandmarkParser, const RArray<TUint>& aLandmarkSelection, TTransferOptions aTransferOptions );

CPosLmCategoryManager::ReadCategoryLC( TPosLmItemId aCategoryId );

CPosLmCategoryManager::CategoryIteratorL( TCategorySortPref aSortPref );

CPosLmCategoryManager::ReferencedCategoryIteratorL( TCategorySortPref aSortPref )

CPosLmCategoryManager::AddCategoryL( CPosLandmarkCategory & aCategory );

CPosLmCategoryManager::UpdateCategoryL( const CPosLandmarkCategory & aCategory );

CPosLmCategoryManager::RemoveCategoryL( TPosLmItemId aCategoryId );

CPosLmCategoryManager::RemoveCategoriesL( const RArray< TPosLmItemId > & aCategoryIdArray );

CPosLmCategoryManager::AddCategoryToLandmarksL( TPosLmItemId aCategoryId, RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLmCategoryManager::RemoveCategoryFromLandmarksL( TPosLmItemId aCategoryId, RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLmCategoryManager::GetCategoryL( const TDesC & aCategoryName );

CPosLmCategoryManager::GetGlobalCategoryL( TPosLmGlobalCategory aGlobalCategory );

CPosLmCategoryManager::ResetGlobalCategoriesL();

The capability WriteUserData is required in:

CPosLandmarkDatabase::AddLandmarkL( CPosLandmark& aLandmark );

CPosLandmarkDatabase::UpdateLandmarkL( const CPosLandmark& aLandmark );

CPosLandmarkDatabase::RemoveLandmarkL( TPosLmItemId aLandmarkId );

CPosLandmarkDatabase::RemoveLandmarksL( const RArray<TPosLmItemId>& aLandmarkIdArray );

CPosLandmarkDatabase::RemoveAllLandmarksL();

CPosLandmarkDatabase::CompactL();

CPosLandmarkDatabase::ImportLandmarksL( CPosLandmarkParser& aLandmarkParser, TTransferOptions aTransferOptions );

CPosLandmarkDatabase::ImportLandmarksL( CPosLandmarkParser& aLandmarkParser, const RArray<TUint>& aLandmarkSelection, TTransferOptions aTransferOptions );

CPosLmCategoryManager::AddCategoryL( CPosLandmarkCategory & aCategory );

CPosLmCategoryManager::UpdateCategoryL( const CPosLandmarkCategory & aCategory );

CPosLmCategoryManager::RemoveCategoryL( TPosLmItemId aCategoryId );

CPosLmCategoryManager::RemoveCategoriesL( const RArray< TPosLmItemId > & aCategoryIdArray );

CPosLmCategoryManager::AddCategoryToLandmarksL( TPosLmItemId aCategoryId, RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLmCategoryManager::RemoveCategoryFromLandmarksL( TPosLmItemId aCategoryId, RArray< TPosLmItemId > & aLandmarkIdArray );

CPosLmCategoryManager::ResetGlobalCategoriesL();

Other Information

The capability NetworkServices is required to work with remote databases.


#include <
epos_cposlandmarkcategory.h>

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.


Public Types

typedef TUint32 TAttributes
 Bitmap for specifying a group of category attributes.
enum  _TAttributes { ENoAttribute = 0x0000, ECategoryName = 0x0001, EIcon = 0x0010, EAllAttributes = 0xFFFF }
 Specifies a category attribute, such as category name or category icon. More...

Public Member Functions

virtual ~CPosLandmarkCategory ()
 Destructor.
IMPORT_C TPosLmItemId CategoryId () const
 Reads the ID of the category entry in the database.
IMPORT_C TPosLmGlobalCategory GlobalCategory () const
 Retrieves global category ID.
void SetGlobalCategory (TPosLmGlobalCategory aGlobalCategory)
IMPORT_C TInt GetCategoryName (TPtrC &aCategoryName) const
 Reads the name of the landmark category.
IMPORT_C void SetCategoryNameL (const TDesC &aCategoryName)
 Sets the name of the landmark category.
IMPORT_C void SetIconL (const TDesC &aIconFileName, TInt aIconIndex, TInt aIconMaskIndex)
 Associates the landmark category with an icon.
IMPORT_C TInt GetIcon (TPtrC &aIconFileName, TInt &aIconIndex, TInt &aIconMaskIndex) const
 Returns the a link to the icon associated with the landmark category.
IMPORT_C void RemoveCategoryAttributes (TAttributes aAttributes)
 Removes category attributes from the landmark category.
void SetCategoryIdL (TPosLmItemId aId)

Static Public Member Functions

static IMPORT_C CPosLandmarkCategoryNewLC ()
 Two-phased constructor.
static IMPORT_C CPosLandmarkCategoryNewL ()
 Two-phased constructor.
static IMPORT_C CPosLandmarkCategoryNewLC (const CPosLandmarkCategory &aCategory)
 Two-phased copy constructor.
static IMPORT_C CPosLandmarkCategoryNewL (const CPosLandmarkCategory &aCategory)
 Two-phased copy constructor.

Member Typedef Documentation

typedef TUint32 CPosLandmarkCategory::TAttributes
 

Bitmap for specifying a group of category attributes.

Bit values are defined by _TAttributes.


Member Enumeration Documentation

enum CPosLandmarkCategory::_TAttributes
 

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

Enumerator:
ENoAttribute  No attribute specified.
ECategoryName  The name of the landmark category.
EIcon  The icon that represents the category in a UI.
EAllAttributes  All category attributes.

Constructor & Destructor Documentation

virtual CPosLandmarkCategory::~CPosLandmarkCategory  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C TPosLmItemId CPosLandmarkCategory::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.
IMPORT_C TInt CPosLandmarkCategory::GetCategoryName TPtrC &  aCategoryName  )  const
 

Reads the name of the landmark category.

Parameters:
[out] aCategoryName Will contain the category name.
Returns:
KErrNone if successful, KErrNotFound if the category name is not set.
IMPORT_C TInt CPosLandmarkCategory::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:
[out] aIconFileName The full icon file name.
[out] aIconIndex The index of the icon within the icon file.
[out] 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 CPosLandmarkCategory::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.
static IMPORT_C CPosLandmarkCategory* CPosLandmarkCategory::NewL const CPosLandmarkCategory aCategory  )  [static]
 

Two-phased copy constructor.

Parameters:
[in] aCategory The category to copy.
Returns:
A copy of the specified category object.
static IMPORT_C CPosLandmarkCategory* CPosLandmarkCategory::NewL  )  [static]
 

Two-phased constructor.

Returns:
A new instance of this class.
static IMPORT_C CPosLandmarkCategory* CPosLandmarkCategory::NewLC const CPosLandmarkCategory aCategory  )  [static]
 

Two-phased copy constructor.

Parameters:
[in] aCategory The category to copy.
Returns:
A copy of the specified category object.
static IMPORT_C CPosLandmarkCategory* CPosLandmarkCategory::NewLC  )  [static]
 

Two-phased constructor.

Returns:
A new instance of this class.
IMPORT_C void CPosLandmarkCategory::RemoveCategoryAttributes TAttributes  aAttributes  ) 
 

Removes category attributes from the landmark category.

Parameters:
[in] aAttributes A bitmap specifying which category attributes to remove.
void CPosLandmarkCategory::SetCategoryIdL TPosLmItemId  aId  ) 
 
IMPORT_C void CPosLandmarkCategory::SetCategoryNameL const TDesC &  aCategoryName  ) 
 

Sets the name of the landmark category.

Parameters:
[in] aCategoryName The category name.
Leave:
KErrArgument Client passed an empty descriptor or landmark name is longer than KPosLmMaxCategoryNameLength.
void CPosLandmarkCategory::SetGlobalCategory TPosLmGlobalCategory  aGlobalCategory  ) 
 
IMPORT_C void CPosLandmarkCategory::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.

Parameters:
[in] aIconFileName The full icon file name.
[in] aIconIndex The index of the icon within the icon file.
[in] aIconMaskIndex The index of the icon mask within the icon file.
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.

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

Copyright © Nokia Corporation 2001-2008
Back to top