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]
Performs an 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 cancelation of the request was started successfully, otherwise returns false.
See also startRequest() and QLandmarkAbstractRequest::cancel().
Returns a list of categories which match the given categoryIds. The engine will populate errorMap (the map of indices of the categoryIds list to errors) 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.
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().
Returns the category in the datastore identified by categoryId.
Any errors encountered are stored in error and errorString. A QLandmarkManager::CategoryDoesNotExist error is set if the category could not be found.
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]
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]
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().
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.
Overall operation errors are stored in error and errorString.
Returns the support level the manager engine provides for the given filter. Errors are stored in error and errorString.
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 circumstances categoryId is ignored. If categoryId doesn't exist when using AttachSingleCategory, QLandmarkManager::CategoryDoesNotExist 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.
Overall operational errors are stored in error and errorString.
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. The error is set to QLandmarkManager::LandmarkDoesNotExistError if the landmark could not be found.
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.
Returns a list of landmarks which match the given landmarkIds. The engine will populate errorMap (the map of indices of the landmarkIds list to errors) 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, all landmarks were successfully retrieved.
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.
Note that removal of a category will not trigger a landmarksChanged signal for landmarks belonging to that category.
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.
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.
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 errors) 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 given 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::CategoryDoesNotExistError.
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::LandmarkDoesNotExistError.
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.
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.
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 errors) for every index for which the landmark could not be saved.
For each newly saved landmark that was successful, the identifier of the landmark will be updated with a new value.
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().
QStringList QLandmarkManagerEngine::searchableLandmarkAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]
Returns the list of landmark attribute keys that may be used in a QLandmarkAttributeFilter. Errors are stored in error and errorString.
Sorts the given list of landmarks according to the provided sortOrders
Returns the support level the manager engine provides for the given sortOrder. 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().
Returns the supported file formats for the given transfer operation, i.e. import or export. Errors are stored in error and errorString.
bool QLandmarkManagerEngine::testFilter ( const QLandmarkFilter & filter, const QLandmark & landmark ) [static]
Returns true if the supplied landmark matches the supplied filter.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Updates the given asynchronous request req by setting the new state of the request. If the new state is different, the stateChanged() signal will 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, no progress could be reported or if the engine does not support waitForFinished functionality.
See also startRequest().