API published in: S60 3rd Ed
Link against: eposlandmarks.lib
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_cposlmcategorymanager.h>
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 contains functions for managing landmark categories. This includes reading, listing, creating and updating landmark categories.
NetworkServices
capability is required for remote databases.
Public Types |
|
enum | TCategorySortPref { ECategorySortOrderNone = 0, ECategorySortOrderNameAscending, ECategorySortOrderNameDescending } |
Specifies the sort preference for landmark categories. More... |
|
Public Member Functions |
|
virtual IMPORT_C | ~CPosLmCategoryManager () |
Destructor. |
|
virtual CPosLandmarkCategory * | ReadCategoryLC (TPosLmItemId aCategoryId)=0 |
Reads a landmark category from the database. |
|
virtual CPosLmItemIterator * | CategoryIteratorL (TCategorySortPref aSortPref=ECategorySortOrderNone)=0 |
Returns an object for iterating the landmark categories in the database. |
|
virtual CPosLmItemIterator * | ReferencedCategoryIteratorL (TCategorySortPref aSortPref=ECategorySortOrderNone)=0 |
Returns an object for iterating referenced landmark categories in the database. |
|
virtual TPosLmItemId | AddCategoryL (CPosLandmarkCategory &aCategory)=0 |
Adds a landmark category to the database and returns its ID. |
|
virtual void | UpdateCategoryL (const CPosLandmarkCategory &aCategory)=0 |
Updates a landmark category in the database. |
|
virtual CPosLmOperation * | RemoveCategoryL (TPosLmItemId aCategoryId)=0 |
Removes a landmark category from the database. |
|
virtual CPosLmOperation * | RemoveCategoriesL (const RArray< TPosLmItemId > &aCategoryIdArray)=0 |
Remove a set of landmark categories from the database. |
|
virtual CPosLmOperation * | AddCategoryToLandmarksL (TPosLmItemId aCategoryId, RArray< TPosLmItemId > &aLandmarkIdArray)=0 |
Adds a category to a set of landmarks. |
|
virtual CPosLmOperation * | RemoveCategoryFromLandmarksL (TPosLmItemId aCategoryId, RArray< TPosLmItemId > &aLandmarkIdArray)=0 |
Removes a category from a set of landmarks. |
|
virtual TPosLmItemId | GetCategoryL (const TDesC &aCategoryName)=0 |
Gets a category by name. |
|
virtual TPosLmItemId | GetGlobalCategoryL (TPosLmGlobalCategory aGlobalCategory)=0 |
Gets the ID of a global category. |
|
virtual HBufC * | GlobalCategoryNameL (TPosLmGlobalCategory aGlobalCategory)=0 |
Gets the predefined name of a global category. |
|
virtual CPosLmOperation * | ResetGlobalCategoriesL ()=0 |
Resets the information for all global categories. |
|
Static Public Member Functions |
|
static IMPORT_C CPosLmCategoryManager * | NewL (CPosLandmarkDatabase &aLandmarkDatabase) |
Two-phased constructor. |
|
Protected Member Functions |
|
IMPORT_C | CPosLmCategoryManager () |
|
Specifies the sort preference for landmark categories. |
|
Destructor. |
|
|
Adds a landmark category to the database and returns its ID.
This function requires
|
|
Adds a category to a set of landmarks.
If the category is already contained in one of the landmarks, nothing will be further added to that landmark. The function returns an operation object which can be run in either synchronous or asynchronous mode. If it is run in asynchronous mode the client can supervise the progress of the operation. If the CPosLmOperation object is deleted before the operation is complete, it is possible that the category has only been added to a subset of the landmarks. The client takes ownership of the returned operation object.
Note: There is no need to call
If the database is read only, the returned operation will fail with error code While adding the category to the landmarks, this operation will acquire a write-lock on the database.
This function requires
|
|
Returns an object for iterating the landmark categories in the database.
The client takes ownership of the returned iterator object.
This function requires
|
|
Gets a category by name.
This function only looks for an exact match.
This function requires
|
|
Gets the ID of a global category.
ReadUserData capability.
|
|
Gets the predefined name of a global category.
|
|
Two-phased constructor. The client takes ownership of the category manager.
|
|
Reads a landmark category from the database.
This function requires
|
|
Returns an object for iterating referenced landmark categories in the database.
The iterator object is reset, so that the first CPosLmItemIterator::NextL call will return the first landmark category. The client takes ownership of the returned iterator object.
This function requires
|
|
Remove a set of landmark categories from the database.
This call will also remove the categories from all landmarks which contained them. The function returns an operation object which can be run in either synchronous or asynchronous mode. If it is run in asynchronous mode the client can supervise the progress of the operation. If the CPosLmOperation object is deleted before the operation is complete, it is possible that only a subset of the landmark categories have been deleted. The client takes ownership of the returned operation object.
If the database is read only, the returned operation will fail with error code This call will also remove the categories from all landmarks which contained them. While removing the category, this operation will acquire a write-lock on the database.
This function requires
|
|
Removes a category from a set of landmarks.
If the category is not found in one of the landmarks, nothing will happen for that landmark. The function returns an operation object which can be run in either synchronous or asynchronous mode. If it is run in asynchronous mode the client can supervise the progress of the operation. If the CPosLmOperation object is deleted before the operation is complete, it is possible that the category has only been removed from a subset of the landmarks. The client takes ownership of the returned operation object.
If the database is read only, the returned operation will fail with error code While removing the category from the landmarks, this operation will acquire a write-lock on the database.
This function requires
|
|
Removes a landmark category from the database.
This call will also remove the category from all landmarks which contained it. The function returns an operation object which can be run in either synchronous or asynchronous mode. If it is run in asynchronous mode the client can supervise the progress of the operation. If the CPosLmOperation object is deleted before the operation is complete, it is possible that the category has not been removed, but some landmarks may no longer contain this category The client takes ownership of the returned operation object. While removing the category, this operation will acquire a write-lock on the database.
This function requires
|
|
Resets the information for all global categories.
The function returns an operation object which can be run in either synchronous or asynchronous mode. If it is run in asynchronous mode the client can supervise the progress of the operation. If the CPosLmOperation object is deleted before the operation is complete, it is possible that that only a subset of the global categories have been resetted. The client takes ownership of the returned operation object. While resetting, this operation will acquire a write-lock on the database.
This function requires
|
|
Updates a landmark category in the database.
This function requires
|