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_cposlandmark.h>
A landmark is principally a location with a name.
The landmark object can either be created by a client or retrieved from CPosLandmarkDatabase.
A landmark consists of a number of landmark attributes, e.g. landmark name, landmark position, coverage area, etc.
A landmark may also contain generic position fields. These position fields are defined in LbsFieldIds.h. Only text fields are supported.
CPosLandmark contains functions for setting and getting landmark attributes and position fields.
Note: CPosLandmark is only a local representation of the landmark. To update the database, call CPosLandmarkDatabase::UpdateLandmarkL (or CPosLandmarkDatabase::AddLandmarkL for a new landmark).
Public Types |
|
typedef TUint32 | TAttributes |
Bitmap for specifying a group of landmark attributes. |
|
enum | _TAttributes { ENoAttribute = 0x0000, ELandmarkName = 0x0001, EPosition = 0x0002, ECoverageRadius = 0x0004, ECategoryInfo = 0x0008, EIcon = 0x0010, EDescription = 0x0020, EAllAttributes = 0xFFFF } |
Specifies a landmark attribute such as landmark name or landmark position. More... |
|
Public Member Functions |
|
virtual | ~CPosLandmark () |
Destructor. |
|
IMPORT_C TPosLmItemId | LandmarkId () const |
Reads the ID of the landmark entry in the database. |
|
IMPORT_C TBool | IsPartial () const |
Checks if the landmark is partial. |
|
IMPORT_C TInt | GetLandmarkName (TPtrC &aLandmarkName) const |
Reads the name of the landmark. |
|
IMPORT_C void | SetLandmarkNameL (const TDesC &aLandmarkName) |
Sets the name of the landmark. |
|
IMPORT_C TInt | GetPosition (TLocality &aPosition) const |
Reads the landmark position. |
|
IMPORT_C void | SetPositionL (const TLocality &aPosition) |
Sets the landmark position. |
|
IMPORT_C TInt | GetCoverageRadius (TReal32 &aCoverageRadius) const |
Reads the landmark coverage radius. |
|
IMPORT_C void | SetCoverageRadius (TReal32 aCoverageRadius) |
Sets the landmark coverage radius. |
|
IMPORT_C void | AddCategoryL (TPosLmItemId aCategoryId) |
Adds a category to the landmark. |
|
IMPORT_C void | RemoveCategory (TPosLmItemId aCategoryId) |
Removes a category from the landmark. |
|
IMPORT_C void | GetCategoriesL (RArray< TPosLmItemId > &aCategoryIdArray) const |
Retrieves the database item IDs for the categories contained in this landmark. |
|
IMPORT_C TBool | IsPositionFieldAvailable (TPositionFieldId aFieldId) const |
Checks if the landmark contains a specific position field. |
|
IMPORT_C TUint | NumOfAvailablePositionFields () const |
Returns the number of position fields set in the landmark. |
|
IMPORT_C TPositionFieldId | FirstPositionFieldId () const |
Returns the first position field contained in the landmark. |
|
IMPORT_C TPositionFieldId | NextPositionFieldId (TPositionFieldId aFieldId) const |
Returns the next position field contained in the landmark. |
|
IMPORT_C TInt | GetPositionField (TPositionFieldId aFieldId, TPtrC &aFieldValue) const |
Reads the value of a position field. |
|
IMPORT_C void | SetPositionFieldL (TPositionFieldId aFieldId, const TDesC &aFieldValue) |
Sets a position field in the landmark. |
|
IMPORT_C void | RemovePositionField (TPositionFieldId aFieldId) |
Removes a position field from the landmark. |
|
IMPORT_C void | SetIconL (const TDesC &aIconFileName, TInt aIconIndex, TInt aIconMaskIndex) |
Associates the landmark with an icon. |
|
IMPORT_C TInt | GetIcon (TPtrC &aIconFileName, TInt &aIconIndex, TInt &aIconMaskIndex) const |
Returns the link to the icon associated with the landmark. |
|
IMPORT_C TInt | GetLandmarkDescription (TPtrC &aLandmarkDescription) const |
Reads the description of the landmark. |
|
IMPORT_C void | SetLandmarkDescriptionL (const TDesC &aLandmarkDescription) |
Sets a description for the landmark. |
|
IMPORT_C void | RemoveLandmarkAttributes (TAttributes aAttributes) |
Removes landmark attributes from the landmark. |
|
void | SetPartialL (TBool aPartial) |
void | SetLandmarkIdL (TPosLmItemId aId) |
Static Public Member Functions |
|
static IMPORT_C CPosLandmark * | NewLC () |
Two-phased constructor. |
|
static IMPORT_C CPosLandmark * | NewL () |
Two-phased constructor. |
|
static IMPORT_C CPosLandmark * | NewLC (const CPosLandmark &aLandmark) |
Two-phased copy constructor. |
|
static IMPORT_C CPosLandmark * | NewL (const CPosLandmark &aLandmark) |
Two-phased copy constructor. |
|
Bitmap for specifying a group of landmark attributes. Bit values are defined by _TAttributes. |
|
|
Destructor. |
|
Adds a category to the landmark. If the specified category has already been added, nothing happens.
|
|
Returns the first position field contained in the landmark. This function is used to initiate iteration over the position fields. NextPositionFieldId() is called to continue the iteration.
|
|
Retrieves the database item IDs for the categories contained in this landmark.
|
|
Reads the landmark coverage radius. Coverage radius is set if the landmark is big, e.g. a city. It defines the size of the area which the landmark represents.
|
|
Returns the link to the icon associated with the landmark. 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 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.
|
|
Reads the description of the landmark.
This function returns error code
|
|
Reads the name of the landmark.
This function returns error code
|
|
Reads the landmark position.
|
|
Reads the value of a position field.
|
|
Checks if the landmark is partial. A client can read partial information about a landmark from the database. This function checks if only partial information is included in the landmark object. Partial landmark can not be used with CPosLandmarkDatabase::UpdateLandmarkL(). For more about partial landmarks, see CPosLandmarkDatabase::ReadPartialLandmarkLC().
|
|
Checks if the landmark contains a specific position field.
|
|
Reads the ID of the landmark entry in the database.
|
|
Two-phased copy constructor.
|
|
Two-phased constructor.
|
|
Two-phased copy constructor.
|
|
Two-phased constructor.
|
|
Returns the next position field contained in the landmark. This function is used to iterate the position fields in the landmark. FirstPositionFieldId() is called to get the first ID. This ID is passed to NextPositionFieldId() to obtain the second ID, etc.
If the client specifies an ID which is not contained in the landmark, this function will panic with code
|
|
Returns the number of position fields set in the landmark.
|
|
Removes a category from the landmark. If the specified category is not in the landmark, nothing happens.
|
|
Removes landmark attributes from the landmark.
|
|
Removes a position field from the landmark. If the specified position field is not contained in the landmark, nothing will happen.
|
|
Sets the landmark coverage radius. Coverage radius is set if the landmark is big, e.g. a city. It defines the size of the area which the landmark represents. If coverage radius is set to NaN, then the coverage radius will be removed.
|
|
Associates the landmark 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.
|
|
Sets a description for the landmark. If no description is set for the landmark when it is written to the database, the landmark in the database will have an empty description string "".
|
|
|
Sets the name of the landmark. If no name is set for the landmark when it is written to the database, the landmark in the database will have an empty name string "".
|
|
|
Sets a position field in the landmark.
|
|
Sets the landmark position. Latitude and longitude must be set in the position.
Only WGS 84 coordinates are allowed.
|