Qt Mobility Reference Documentation

QLandmarkManagerEngine Class Reference

The QLandmarkManagerEngine class provides the interface for all implementations of the landmark manager backend functionality. More...

 #include <QLandmarkManagerEngine>

Public Functions

QLandmarkManagerEngine ()
virtual ~QLandmarkManagerEngine ()
virtual bool cancelRequest ( QLandmarkAbstractRequest * request ) = 0
virtual QList<QLandmarkCategory> categories ( const QList<QLandmarkCategoryId> & categoryIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmarkCategory> categories ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmarkCategory category ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QStringList categoryAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const
virtual QList<QLandmarkCategoryId> categoryIds ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool exportLandmarks ( QIODevice * device, const QString & format, QList<QLandmarkId> landmarkIds, QLandmarkManager::TransferOption option, QLandmarkManager::Error * error, QString * errorString ) const
virtual QLandmarkManager::SupportLevel filterSupportLevel ( const QLandmarkFilter & filter, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool importLandmarks ( QIODevice * device, const QString & format, QLandmarkManager::TransferOption option, const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString )
virtual bool isCustomAttributesEnabled ( QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isExtendedAttributesEnabled ( QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isFeatureSupported ( QLandmarkManager::LandmarkFeature feature, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmark landmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QStringList landmarkAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const
virtual QList<QLandmarkId> landmarkIds ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmark> landmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmark> landmarks ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QString managerName () const = 0
virtual QMap<QString, QString> managerParameters () const = 0
QString managerUri () const
virtual int managerVersion () const = 0
virtual bool removeCategory ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool removeLandmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool removeLandmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual void requestDestroyed ( QLandmarkAbstractRequest * request ) = 0
virtual bool saveCategory ( QLandmarkCategory * category, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool saveLandmark ( QLandmark * landmark, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool saveLandmarks ( QList<QLandmark> * landmarks, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual void setCustomAttributesEnabled ( bool enabled, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual void setExtendedAttributesEnabled ( bool enabled, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual QLandmarkManager::SupportLevel sortOrderSupportLevel ( const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool startRequest ( QLandmarkAbstractRequest * request ) = 0
virtual QStringList supportedFormats ( QLandmarkManager::TransferOperation operation, QLandmarkManager::Error * error, QString * errorString ) const
virtual bool waitForRequestFinished ( QLandmarkAbstractRequest * request, int msecs ) = 0

Signals

void categoriesAdded ( const QList<QLandmarkCategoryId> & categoryIds )
void categoriesChanged ( const QList<QLandmarkCategoryId> & categoryIds )
void categoriesRemoved ( const QList<QLandmarkCategoryId> & categoryIds )
void dataChanged ()
void landmarksAdded ( const QList<QLandmarkId> & landmarkIds )
void landmarksChanged ( const QList<QLandmarkId> & landmarkIds )
void landmarksRemoved ( const QList<QLandmarkId> & landmarkIds )

Static Protected Members

void addSorted ( QList<QLandmark> * sorted, const QLandmark & landmark, const QList<QLandmarkSortOrder> & sortOrders )
int compareLandmark ( const QLandmark & a, const QLandmark & b, const QList<QLandmarkSortOrder> & sortOrders )
int compareName ( const QLandmark & a, const QLandmark & b, const QLandmarkNameSort & nameSort )
QList<QLandmarkId> sortLandmarks ( const QList<QLandmark> & landmarks, const QList<QLandmarkSortOrder> & sortOrders )
bool testFilter ( const QLandmarkFilter & filter, const QLandmark & landmark )
void updateLandmarkCategoryFetchByIdRequest ( QLandmarkCategoryFetchByIdRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryFetchRequest ( QLandmarkCategoryFetchRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryIdFetchRequest ( QLandmarkCategoryIdFetchRequest * req, const QList<QLandmarkCategoryId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryRemoveRequest ( QLandmarkCategoryRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategorySaveRequest ( QLandmarkCategorySaveRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkExportRequest ( QLandmarkExportRequest * req, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkFetchByIdRequest ( QLandmarkFetchByIdRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkFetchRequest ( QLandmarkFetchRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkIdFetchRequest ( QLandmarkIdFetchRequest * req, const QList<QLandmarkId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkImportRequest ( QLandmarkImportRequest * req, const QList<QLandmarkId> & ids, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkRemoveRequest ( QLandmarkRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkSaveRequest ( QLandmarkSaveRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateRequestState ( QLandmarkAbstractRequest * req, QLandmarkAbstractRequest::State state )

Detailed Description

The QLandmarkManagerEngine class provides the interface for all implementations of the landmark manager backend functionality.

Instances of this class are usually provided by QLandmarkManagerEngineFactory, which is loaded from a plugin.


Member Function Documentation

QLandmarkManagerEngine::QLandmarkManagerEngine ()

Constructs a landmark manager engine.

QLandmarkManagerEngine::~QLandmarkManagerEngine () [virtual]

Destructor.

void QLandmarkManagerEngine::addSorted ( QList<QLandmark> * sorted, const QLandmark & landmark, const QList<QLandmarkSortOrder> & sortOrders ) [static protected]

Performs insertion sort landmark into the sorted list, according to the provided sortOrders list. The first QLandmarkSortOrder in the list has the highest priority; if the landmark is deemed equal to another in the sorted list, the second QLandmarkSortOrder in the list is used (and so on until either the landmark is inserted or there are no more sort order objects in the list).

bool QLandmarkManagerEngine::cancelRequest ( QLandmarkAbstractRequest * request ) [pure virtual]

Asks the manager engine to cancel the given request which was previously started and is currently in a cancellable state. Returns true if cancellation of the request was started successfully, otherwise returns false.

See also startRequest() and QLandmarkAbstractRequest::cancel().

QList<QLandmarkCategory> QLandmarkManagerEngine::categories ( const QList<QLandmarkCategoryId> & categoryIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of categories which match the given categoryIds. The engine will populate errorMap (the map of indices of the categoryIds list an error) for the indexes where the category could not be retrieved.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all categories were successfully retrieved.

QList<QLandmarkCategory> QLandmarkManagerEngine::categories ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of categories. The limit defines the maximum number of categories to return and the offset defines the index offset of the first category. A limit of -1 means all categories should be returned. The returned categories ordered according to the gien nameSort.

void QLandmarkManagerEngine::categoriesAdded ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories has been added to the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have added the landmarks, the exact timing cannot be determined.

There may be one or more category identifiers in the categoryIds list.

See also dataChanged(), categoriesChanged(), and categoriesRemoved().

void QLandmarkManagerEngine::categoriesChanged ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories have been modified in the datastore managed by the engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have modified the categories, the timing cannot be determined.

There may be one ore more category identifiers in the categoryIds list.

See also dataChanged(), categoriesAdded(), and categoriesRemoved().

void QLandmarkManagerEngine::categoriesRemoved ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories have been removed from the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have removed the categories, the timing cannot be determined.

There may be one ore more category identifiers in the categoryIds list.

See also dataChanged(), categoriesAdded(), and categoriesChanged().

QLandmarkCategory QLandmarkManagerEngine::category ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the cateory in the datastore identified by categoryId.

Any errors encountered are stored in error and errorString.

QStringList QLandmarkManagerEngine::categoryAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const [virtual]

Returns the list of attribute keys the categories will have. If extended attributes are enabled (provided manager supported them), categories will possess extra keys in addition to the standard cross platform keys. Errors are stored in error and errorString.

QList<QLandmarkCategoryId> QLandmarkManagerEngine::categoryIds ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of category identifiers The limit defines the maximum number of ids to return and the offset defines the index offset of the first id. A limit of -1 means ids for all categories should be returned. Any error which occurs will be saved in error and errorString. The identifiers are returned in order according to the given nameSort.

int QLandmarkManagerEngine::compareLandmark ( const QLandmark & a, const QLandmark & b, const QList<QLandmarkSortOrder> & sortOrders ) [static protected]

Compares two landmarks (a and b) using the given list of sortOrders. Returns a negative number if a should appear before b according to the sort order, a positive number if a should appear after b according to the sort order, and zero if the two are unable to be sorted.

int QLandmarkManagerEngine::compareName ( const QLandmark & a, const QLandmark & b, const QLandmarkNameSort & nameSort ) [static protected]

Compares two landmarks (a and b) by name.

Returns a negative number if a should appear before b according to the nameSort, a positive number if a should appear after b according to the nameSort, and zero if the two are unable to be sorted.

Assuming an ascending order sort, an integer less than, equal to, or greater than zero is returned if a is less than, equal to or greater than b.

nameSort specifies whether an ascending or descending order is used and whether the sort is case sensitive or not.

void QLandmarkManagerEngine::dataChanged () [signal]

This signal is emitted some time after changes occur to the datastore managed by this engine, and the engine is unable to precisely determine which changes occurred, or if the engine considers the changes to be radical enough to require clients to reload all data.

If this signal is emitted, no other signals may be emitted for the associated changes.

As it is possible that other processes (or other devices) may have caused the changes, the timing can not be determined.

See also landmarksAdded(), landmarksChanged(), landmarksRemoved(), categoriesAdded(), categoriesChanged(), and categoriesRemoved().

bool QLandmarkManagerEngine::exportLandmarks ( QIODevice * device, const QString & format, QList<QLandmarkId> landmarkIds, QLandmarkManager::TransferOption option, QLandmarkManager::Error * error, QString * errorString ) const [virtual]

Writes landmarks to the given device. The landmarks will be written according to the specified format. If landmarkIds is empty, then all landmarks will be exported, otherwise only those landmarks that match landmarkIds will be exported.

The option can be used to control whether categories will be exported or not. Note that the AttachSingleCategory option has no meaning during export and the manager will export as if option was IncludeCategoryData. Also, be aware that some file formats may not support categories at all and for these formats, the option is always treated as if it was ExcludeCategoryData.

Returns true if all specified landmarks were successfully exported, otherwise returns false. It may be possible that only a subset of landmarks are exported.

Overall operation errors are stored in error and errorString.

QLandmarkManager::SupportLevel QLandmarkManagerEngine::filterSupportLevel ( const QLandmarkFilter & filter, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the support level the manager engine provides for the given filter. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::importLandmarks ( QIODevice * device, const QString & format, QLandmarkManager::TransferOption option, const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) [virtual]

Reads landmarks from the given device and saves them. The data from the device is expected to adhere to the provided format. If no format is provided, the manager engine tries to autodetect the format.

The option can be used to control whether categories in the imported file will be added during the import. If the AttachSingleCategory option is used, then all the landmarks in the import file are assigned to the category identified by categoryId, in all other cirumstances categoryId is ignored. If categoryId doesn't exist when using AttachSingleCategory, QLandmarkManager::DoesNotExist error is returned. Note that some file formats may not support categories at all.

Returns true if all landmarks could be imported, otherwise returns false. It may be possible that only a subset of landmarks are imported.

Overall operational errors are stored in error and errorString.

bool QLandmarkManagerEngine::isCustomAttributesEnabled ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns whether custom attributes are enabled or not. Custom attributes are arbitrary attributes created by the application for a landmark. If custom attributes are enabled (and the manager supports them), retrieved landmarks will have extra attributes accessible using QLandmark::customAttributes(). Custom attributes must be enabled to save any landmarks with possess custom attributes. This same behaviour applies to categories if custom category attributes are supported. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isExtendedAttributesEnabled ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns whether extended attributes specific to this manager are enabled or not. If extended attributes are enabled, retrieved landmarks will have extra attribute keys accessible through the QLandmark::attribute() function. Extended attributes must be enabled to save any landmarks which possess extended attributes. This same behaviour will also apply to categories if extended category attributes are supported. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isFeatureSupported ( QLandmarkManager::LandmarkFeature feature, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the manager engine supports the given feature, otherwise returns false; Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the manager engine is exclusively read only. Meaning landmarks and categories cannot be added, modified or removed. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the landmark identified by landmarkId considered read-only by the manager engine.

If the landmarkId does not refer to an existing landmark, it is considered writable unless the manager engine is exclusively read-only. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the category identified by categoryId is considered read-only by the manager engine.

If categoryId does not refer to an existing category, it is considered writable unless the manager engine is exclusively read-only. Errors are stored in error and errorString.

QLandmark QLandmarkManagerEngine::landmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the landmark in the datastore identified by landmarkId.

Any errors encountered are:stored in error and errorString.

QStringList QLandmarkManagerEngine::landmarkAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const [virtual]

Returns the list of attribute keys the landmarks will have. If extended attributes are enabled (provided manager supported them), landmarks will possess extra keys in addition to the standard cross platform keys. Errors are stored in error and errorString.

QList<QLandmarkId> QLandmarkManagerEngine::landmarkIds ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmark identifiers which match the given filter and are sorted according to the given sortOrders. The limit defines the maximum number of landmark ids to return and the offset defines the index offset of the first landmark id. A limit of -1 means that ids of all matching landmarks should be returned.

Any error which occurs will be saved in error and errorString.

QList<QLandmark> QLandmarkManagerEngine::landmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmarks which match the given landmarkIds. The engine will populate errorMap (the map of indices of the landmarkIds list an error) for the indexes where the landmark could not be retrieved.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all landmarks were successfully retrieved.

QList<QLandmark> QLandmarkManagerEngine::landmarks ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmarks which match the given filter and are sorted according to the sortOrders. The limit defines the maximum number of landmarks to return and the offset defines the index offset of the first landmark. A limit of -1 means all matching landmarks should be returned.

Overall operation errors are stored in error and errorString.

void QLandmarkManagerEngine::landmarksAdded ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks has been added to the datastore managed by the engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have added the landmarks, the exact timing cannot be determined.

There may be one or more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksChanged(), and landmarksRemoved().

void QLandmarkManagerEngine::landmarksChanged ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks have been modified in the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have modified the landmarks, the timing cannot be determined.

There may be one ore more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksAdded(), and landmarksRemoved().

void QLandmarkManagerEngine::landmarksRemoved ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks have been removed from the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have removed the landmarks, the timing cannot be determined.

There may be one ore more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksAdded(), and landmarksChanged().

QString QLandmarkManagerEngine::managerName () const [pure virtual]

Returns the manager name for this QLandmarkManagerEngine

QMap<QString, QString> QLandmarkManagerEngine::managerParameters () const [pure virtual]

Returns the parameters with which this engine was constructed. Note that the engine may have discarded unused or invalid parameters at the time of construction, and these will not be returned.

QString QLandmarkManagerEngine::managerUri () const

Returns the unique URI of this manager, which is built from the manager name and the parameters used to construct it.

int QLandmarkManagerEngine::managerVersion () const [pure virtual]

Returns the engine backend implementation version number

bool QLandmarkManagerEngine::removeCategory ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Removes the category identified by categoryId from the datastore. The categoryId is cleared(and becomes invalid) on successful removal. An unsuccessful removal should leave the identifer alone.

Returns true if the category was removed successfully, otherwise returnse false.

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation

Overall operational errors are stored in error and errorString.

bool QLandmarkManagerEngine::removeLandmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Remove the landmark identified by landmarkId from the datastore.

Returns true if the landmark was removed successfully, otherwise returnse false.

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Any errors encountered during this operation should be stored to error and errorString.

bool QLandmarkManagerEngine::removeLandmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Removes every landmark whose identifier is contained in the list of landmarkIds. Returns true if all landmarks were removed successfully, otherwise false.

The engine populates errorMap (the map of indices of the landmarkIds list to the error which occurred when saving the landmark at that index) for every index for which the landmark could not be removed.

The engine also emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all landmarks were successfully removed.

See also QLandmarkManagerEngine::removeLandmark().

void QLandmarkManagerEngine::requestDestroyed ( QLandmarkAbstractRequest * request ) [pure virtual]

Notifies the manager engine that the givan request has been destroyed.

bool QLandmarkManagerEngine::saveCategory ( QLandmarkCategory * category, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the given category to the datastore if category has a default-constructed identifier, or an identifier with the manager URI set to the URI of this manager and an empty id.

If the manager URI of the identifier of the category is neither empty nor equal to the URI of this manager, or the id member of the identifier is not empty, but does not exist in the manager, the operation should fail and error should be set to QLandmarkManager::DoesNotExistError.

Alternatively, the function should update the existing category in the datastore if category has a non-empty id and currently exists within the datastore.

Returns false on failure or true on success. On successful save of a category with an invalid id, it should be assigned a valid id and have its manager URI set to the URI of this manager.

The engine returns the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operations errors should be stored in error and errorString.

bool QLandmarkManagerEngine::saveLandmark ( QLandmark * landmark, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the given landmark to the datastore if landmark has a default-constructed identifer, or an identifier with the manager URI set to the URI of this manager and an empty id.

If the manager URI of the identifier of the landmark is neither empty nor equal to the URI of this manager, or the id member of the identifier is not empty, but does not exist in the manager, the operation will fail and and error will be set to QLandmarkManager::DoesNotExistError.

Alternatively, the function will update the existing landmark in the datastore if landmark has a non-empty id and currently exists within the datastore.

Returns false on failure or true on success. On successful save of a landmark with an empty id, it will be assigned a valid id and have its manager URI set to the URI of this manager.

This function is called by the landmarks framework in both the single landmark save and batch batch save, if the saveLandmarks function is not overridden.

The engine must emit the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Any errors encountered during this operation should be stored in error and errorString.

bool QLandmarkManagerEngine::saveLandmarks ( QList<QLandmark> * landmarks, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the list of landmarks to the datastore. Returns true if the landmarks were saved successfully, otherwise returns false.

The engine will populate errorMap (the map of indices of the landmarks list to the error which occurred when saving the landmark at that index) for every index for which the landmark could not be saved.

The function will only set error to QLandmarkManager::NoError if all landmarks were saved successfully.

For each newly saved landmark that was successful, the identifier of the landmark will be updated with a new value. If a failure occurs when saving a new landmark, the identifier will be cleared (and become an invalid identifier).

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all landmarks were successfully saved.

See also QLandmarkManagerEngine::saveLandmark().

void QLandmarkManagerEngine::setCustomAttributesEnabled ( bool enabled, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Sets whether custom attributes are enabled or not. Errors are stored in error and errorString.

See also isCustomAttributesEnabled().

void QLandmarkManagerEngine::setExtendedAttributesEnabled ( bool enabled, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Sets whether extended attributes are enabled or not. Errors are stored in error and errorString.

See also isExtendedAttributesEnabled().

QList<QLandmarkId> QLandmarkManagerEngine::sortLandmarks ( const QList<QLandmark> & landmarks, const QList<QLandmarkSortOrder> & sortOrders ) [static protected]

Sorts the given list of landmarks according to the provided sortOrders

QLandmarkManager::SupportLevel QLandmarkManagerEngine::sortOrderSupportLevel ( const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the support level the manager engine provides for the given sortOrders. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::startRequest ( QLandmarkAbstractRequest * request ) [pure virtual]

Asks the manager engine to begin the given request which is currently in a re(startable) state.

Returns true if the request was started successfully, else returns false.

See also QLandmarkAbstractRequest::start().

QStringList QLandmarkManagerEngine::supportedFormats ( QLandmarkManager::TransferOperation operation, QLandmarkManager::Error * error, QString * errorString ) const [virtual]

Returns the supported file formats for the given exchange operation, i.e. import or export. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::testFilter ( const QLandmarkFilter & filter, const QLandmark & landmark ) [static protected]

Returns true if the supplied landmark matches the supplied filter.

void QLandmarkManagerEngine::updateLandmarkCategoryFetchByIdRequest ( QLandmarkCategoryFetchByIdRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkCategoryFetchByIdRequest req with the latest result, and operation error and errorString, and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkCategoryFetchRequest ( QLandmarkCategoryFetchRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkCategoryFetchRequest req with the latest result, and operation error and errorString. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkCategoryIdFetchRequest ( QLandmarkCategoryIdFetchRequest * req, const QList<QLandmarkCategoryId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkCategoryIdFetchRequest req with the latest result, and operation error and errorString. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkCategoryRemoveRequest ( QLandmarkCategoryRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkCategoryRemoveRequest req with the operation error and errorString and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkCategorySaveRequest ( QLandmarkCategorySaveRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkSaveCategoryRequest req with the latest result, operation error error and errorString, and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkExportRequest ( QLandmarkExportRequest * req, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkExportRequest req with the operation error and errorString. In addition the state of the request is changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify the clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkFetchByIdRequest ( QLandmarkFetchByIdRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkFetchByIdRequest req with the latest result, operation error and errorString and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkFetchRequest ( QLandmarkFetchRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkFetchRequest req with the latest result, and operation error and errorString. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkIdFetchRequest ( QLandmarkIdFetchRequest * req, const QList<QLandmarkId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkIdFetchRequest req with the latest result, and operation error and errorString. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkImportRequest ( QLandmarkImportRequest * req, const QList<QLandmarkId> & ids, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkImportRequest req with the operation error and errorString. In addition the state of the request is changed to newState. This function may also be used to update the ids of the landmarks which have been imported.

It then causes the request to emit its resultsAvailable() signal to notify the clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkRemoveRequest ( QLandmarkRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkRemoveRequest req with the operation error and errorString and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateLandmarkSaveRequest ( QLandmarkSaveRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static protected]

Updates the given QLandmarkSaveRequest req with the latest result, operation error and errorString, and map of input index to individual errors, errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QLandmarkManagerEngine::updateRequestState ( QLandmarkAbstractRequest * req, QLandmarkAbstractRequest::State state ) [static protected]

Updates the given asynchronous request req by setting the new state of the request. It then causes the stateChanged() signal to be emitted by the request.

bool QLandmarkManagerEngine::waitForRequestFinished ( QLandmarkAbstractRequest * request, int msecs ) [pure virtual]

Blocks until the manager engine has completed the given request which was previously started, or until msecs milliseconds have passed. Returns true if the request was completed, and false if the request was not in the QLandmarkAbstractRequest::Active state or no progress could be reported.

See also startRequest().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.