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_cposlandmarkencoder.h>
When creating an instance of this class, the type (e.g. the mime type) of the landmark content must be specified. The client will then receive an encoder implementation which understands the requested landmark content.
Output is written either to a buffer or to a file.
The basic protocol for encoding is to
If this protocol is not followed the client is panicked with error code EPosLmProtocolBreak
. Encoding can be performed multiple times using the same encoder object.
If CPosLandmarkEncoder is used, the client must call the global function ReleaseLandmarkResources before terminating, in order to release all used landmark resources, otherwise the client may receive an ALLOC panic.
Public Member Functions |
|
virtual IMPORT_C | ~CPosLandmarkEncoder () |
Destructor. |
|
virtual CBufBase * | SetUseOutputBufferL ()=0 |
Encode to a buffer. |
|
virtual void | SetOutputFileL (const TDesC &aOutputFile)=0 |
Encode to a file. |
|
virtual void | AddCollectionDataL (TPosLmCollectionDataId aDataId, const TDesC &aCollectionData)=0 |
Add landmark collection data to be encoded. |
|
virtual void | AddLandmarkL (const CPosLandmark &aLandmark)=0 |
Add a landmark to be encoded. |
|
virtual void | AddCategoryForLatestLandmarkL (const CPosLandmarkCategory &aCategory)=0 |
Add a landmark category for the most recently added landmark. |
|
virtual CPosLmOperation * | FinalizeEncodingL ()=0 |
Finalize the encode process. |
|
Static Public Member Functions |
|
static IMPORT_C CPosLandmarkEncoder * | NewL (const TDesC8 &aContentMimeType) |
Two-phased constructor. |
|
Protected Member Functions |
|
IMPORT_C | CPosLandmarkEncoder () |
|
Destructor. |
|
|
Add a landmark category for the most recently added landmark.
The client can either call this function directly or pass this encoder object to CPosLandmarkDatabase::ExportLandmarksL.
|
|
Add landmark collection data to be encoded.
Collection data must be added before any landmarks are added. Each collection ID can only be specified once. If the collection data is not a part of the chosen landmark encoding format, it will be silently ignored.
|
|
Add a landmark to be encoded.
The client can either call this function directly or pass this encoder object to CPosLandmarkDatabase::ExportLandmarksL.
|
|
Finalize the encode process. Writes any buffered data to the output buffer/file. If an output buffer is used it is compressed so that unused memory is freed. If an output file is used, it is closed. After finalizing, further encoding to the specified output is not possible. To start a new encoding, SetUseOutputBufferL or SetOutputFileL must be called. The function returns an operation object which can be run in incremental mode. If it is run incrementally the client can supervise the progress of the operation. The client takes ownership of the returned operation object. If the CPosLmOperation object is deleted before the operation is complete, finalize is cancelled. Further encoding will not be possible.
|
|
Two-phased constructor. The client must specify the type (e.g. the MIME type) of the content format which should be used for encoding.
|
|
Encode to a file. The client specifies an output file for the encoder. The encoder will then write all encoded data to this file. The file will be opened in exclusive mode which means that the file cannot be accessed until the file is closed. The file is closed when FinalizeEncodingL has been executed. The file is also closed if a new encoding is initialized by a call to SetUseOutputBufferL or SetOutputFileL. After this, further encoding to the old file is not possible.
|
|
Encode to a buffer. This function returns a dynamic buffer which will be filled with encoded landmark content. The client takes ownership of the buffer. The client must not delete the buffer until encoding is finalized.
|