The QOrganizerManagerEngine class provides the interface for all implementations of the organizer item manager backend functionality. More...
#include <QOrganizerManagerEngine>
Inherits: QObject.
Inherited by: QOrganizerItemInvalidEngine.
This class was introduced in Qt Mobility 1.1.
QOrganizerManagerEngine () | |
virtual bool | cancelRequest ( QOrganizerAbstractRequest * req ) |
virtual QOrganizerCollection | collection ( const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error ) const |
virtual QList<QOrganizerCollection> | collections ( QOrganizerManager::Error * error ) const |
virtual QOrganizerCollection | compatibleCollection ( const QOrganizerCollection & original, QOrganizerManager::Error * error ) const |
virtual QOrganizerItem | compatibleItem ( const QOrganizerItem & original, QOrganizerManager::Error * error ) const |
virtual QOrganizerCollection | defaultCollection ( QOrganizerManager::Error * error ) const |
virtual QOrganizerItemDetailDefinition | detailDefinition ( const QString & definitionName, const QString & organizeritemType, QOrganizerManager::Error * error ) const |
virtual QMap<QString, QOrganizerItemDetailDefinition> | detailDefinitions ( const QString & organizeritemType, QOrganizerManager::Error * error ) const |
virtual bool | hasFeature ( QOrganizerManager::ManagerFeature feature, const QString & organizeritemType ) const |
virtual bool | isFilterSupported ( const QOrganizerItemFilter & filter ) const |
virtual QOrganizerItem | item ( const QOrganizerItemId & organizeritemId, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error ) const |
virtual QList<QOrganizerItemId> | itemIds ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter, const QList<QOrganizerItemSortOrder> & sortOrders, QOrganizerManager::Error * error ) const |
virtual QList<QOrganizerItem> | itemOccurrences ( const QOrganizerItem & parentItem, const QDateTime & periodStart, const QDateTime & periodEnd, int maxCount, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error ) const |
virtual QList<QOrganizerItem> | items ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error ) const |
virtual QList<QOrganizerItem> | itemsForExport ( const QDateTime & startDate, const QDateTime & endDate, const QOrganizerItemFilter & filter, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error ) const |
virtual QString | managerName () const = 0 |
virtual QMap<QString, QString> | managerParameters () const |
QString | managerUri () const |
virtual int | managerVersion () const = 0 |
virtual bool | removeCollection ( const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error ) |
virtual bool | removeDetailDefinition ( const QString & definitionName, const QString & organizeritemType, QOrganizerManager::Error * error ) |
virtual bool | removeItem ( const QOrganizerItemId & organizeritemId, QOrganizerManager::Error * error ) |
virtual bool | removeItems ( const QList<QOrganizerItemId> & organizeritemIds, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error ) |
virtual void | requestDestroyed ( QOrganizerAbstractRequest * req ) |
virtual bool | saveCollection ( QOrganizerCollection * collection, QOrganizerManager::Error * error ) |
virtual bool | saveDetailDefinition ( const QOrganizerItemDetailDefinition & def, const QString & organizeritemType, QOrganizerManager::Error * error ) |
virtual bool | saveItem ( QOrganizerItem * item, QOrganizerManager::Error * error ) |
virtual bool | saveItems ( QList<QOrganizerItem> * items, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error ) |
virtual bool | startRequest ( QOrganizerAbstractRequest * req ) |
virtual QStringList | supportedItemTypes () const |
virtual bool | validateCollection ( const QOrganizerCollection & collection, QOrganizerManager::Error * error ) const |
virtual bool | validateDefinition ( const QOrganizerItemDetailDefinition & definition, QOrganizerManager::Error * error ) const |
virtual bool | validateItem ( const QOrganizerItem & item, QOrganizerManager::Error * error ) const |
virtual bool | waitForRequestFinished ( QOrganizerAbstractRequest * req, int msecs ) |
void | collectionsAdded ( const QList<QOrganizerCollectionId> & collectionIds ) |
void | collectionsChanged ( const QList<QOrganizerCollectionId> & collectionIds ) |
void | collectionsRemoved ( const QList<QOrganizerCollectionId> & collectionIds ) |
void | dataChanged () |
void | itemsAdded ( const QList<QOrganizerItemId> & organizeritemIds ) |
void | itemsChanged ( const QList<QOrganizerItemId> & organizeritemIds ) |
void | itemsRemoved ( const QList<QOrganizerItemId> & organizeritemIds ) |
void | addSorted ( QList<QOrganizerItem> * sorted, const QOrganizerItem & toAdd, const QList<QOrganizerItemSortOrder> & sortOrders ) |
QOrganizerItemFilter | canonicalizedFilter ( const QOrganizerItemFilter & filter ) |
int | compareItem ( const QOrganizerItem & a, const QOrganizerItem & b, const QList<QOrganizerItemSortOrder> & sortOrders ) |
int | compareVariant ( const QVariant & first, const QVariant & second, Qt::CaseSensitivity sensitivity ) |
const QOrganizerCollectionEngineId * | engineCollectionId ( const QOrganizerCollectionId & id ) |
const QOrganizerItemEngineId * | engineItemId ( const QOrganizerItemId & id ) |
bool | isItemBetweenDates ( const QOrganizerItem & item, const QDateTime & startPeriod, const QDateTime & endPeriod ) |
bool | itemLessThan ( const QOrganizerItem & a, const QOrganizerItem & b ) |
QMap<QString, QMap<QString, QOrganizerItemDetailDefinition> > | schemaDefinitions ( int version = 1 ) |
void | setDetailAccessConstraints ( QOrganizerItemDetail * detail, QOrganizerItemDetail::AccessConstraints constraints ) |
bool | testFilter ( const QOrganizerItemFilter & filter, const QOrganizerItem & item ) |
void | updateCollectionFetchRequest ( QOrganizerCollectionFetchRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState ) |
void | updateCollectionRemoveRequest ( QOrganizerCollectionRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateCollectionSaveRequest ( QOrganizerCollectionSaveRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateDefinitionFetchRequest ( QOrganizerItemDetailDefinitionFetchRequest * req, const QMap<QString, QOrganizerItemDetailDefinition> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateDefinitionRemoveRequest ( QOrganizerItemDetailDefinitionRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateDefinitionSaveRequest ( QOrganizerItemDetailDefinitionSaveRequest * req, const QList<QOrganizerItemDetailDefinition> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateItemFetchForExportRequest ( QOrganizerItemFetchForExportRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState ) |
void | updateItemFetchRequest ( QOrganizerItemFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState ) |
void | updateItemIdFetchRequest ( QOrganizerItemIdFetchRequest * req, const QList<QOrganizerItemId> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState ) |
void | updateItemOccurrenceFetchRequest ( QOrganizerItemOccurrenceFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState ) |
void | updateItemRemoveRequest ( QOrganizerItemRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateItemSaveRequest ( QOrganizerItemSaveRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState ) |
void | updateRequestState ( QOrganizerAbstractRequest * req, QOrganizerAbstractRequest::State state ) |
The QOrganizerManagerEngine class provides the interface for all implementations of the organizer item manager backend functionality.
Instances of this class are usually provided by a QOrganizerManagerEngineFactory, which is loaded from a plugin.
The default implementation of this interface provides a basic level of functionality for some functions so that specific engines can simply implement the functionality that is supported by the specific organizer items engine that is being adapted.
More information on writing an organizer engine plugin is available in the Qt Organizer Manager Engines documentation.
Engines that support the QOrganizerManagerEngine interface but not the QOrganizerManagerEngineV2 interface will be wrapped by the QOrganizerManager by a class that emulates the extra functionality of the QOrganizerManagerEngineV2 interface.
The additional features of a V2 engine compared to the original QOrganizerManagerEngine are:
See also QOrganizerManager and QOrganizerManagerEngineFactory.
A default, empty constructor.
Performs insertion sort of the item toAdd into the sorted list, according to the provided sortOrders list. The first QOrganizerItemSortOrder in the list has the highest priority; if the item toAdd is deemed equal to another in the sorted list, the second QOrganizerItemSortOrder in the list is used (and so on until either the item is inserted or there are no more sort order objects in the list).
This function was introduced in Qt Mobility 1.1.
Asks the manager engine to cancel the given request req which was previously started and is currently in a cancellable state. Returns true if cancellation of the request was started successfully, otherwise returns false.
This function was introduced in Qt Mobility 1.1.
See also startRequest() and QOrganizerAbstractRequest::cancel().
Given an input filter, returns the canonical version of the filter.
Some of the following transformations may be applied:
This function was introduced in Qt Mobility 1.1.
Returns the collection identified by the given collectionId in the manager. Any errors encountered during this operation should be stored to error. If the given collectionId does not specify a valid collection, error will be set to QOrganizerManager::DoesNotExistError.
This function was introduced in Qt Mobility 1.1.
Returns the list of all of the collections managed by this manager. Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
This signal should be emitted at some point once the collections identified by collectionIds have been added to a datastore managed by this engine. This signal must not be emitted if the dataChanged() signal was previously emitted for these changes.
This function was introduced in Qt Mobility 1.1.
This signal should be emitted at some point once the metadata for the collections identified by collectionIds have been modified in a datastore managed by this engine. This signal is not emitted if one of the items in this collection has changed - itemsChanged() will be emitted instead. This signal must not be emitted if the dataChanged() signal was previously emitted for these changes.
This function was introduced in Qt Mobility 1.1.
This signal should be emitted at some point once the collections identified by collectionIds have been removed from a datastore managed by this engine. This signal must not be emitted if the dataChanged() signal was previously emitted for these changes.
This function was introduced in Qt Mobility 1.1.
Compares two organizer items (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.
This function was introduced in Qt Mobility 1.1.
Compares first against second. If the types are strings (QVariant::String), the sensitivity argument controls case sensitivity when comparing.
Returns: <0 if first is less than second 0 if first is equal to second >0 if first is greater than second.
The results are undefined if the variants are different types, or cannot be compared.
This function was introduced in Qt Mobility 1.1.
Returns a pruned or modified version of the original collection which is valid and can be saved in the manager. The returned item might have meta data removed or arbitrarily changed. Any error which occurs will be saved to error. By default, modifiable collections are not supported, and so this function always returns false. Any engine which supports mutable collections should reimplement this function.
This function was introduced in Qt Mobility 1.1.
Returns a pruned or modified version of the original item which is valid and can be saved in the manager. The returned item might have details removed or arbitrarily changed. Any error which occurs will be saved to error.
This function was introduced in Qt Mobility 1.1.
This signal is emitted some time after changes occur to the data managed by this engine, and the engine is unable to 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.
This function was introduced in Qt Mobility 1.1.
See also itemsAdded(), itemsChanged(), and itemsRemoved().
Returns the default collection of the manager. Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Returns the definition identified by the given definitionName that is valid for organizer items whose type is of the given organizeritemType in this store, or a default-constructed QOrganizerItemDetailDefinition if no such definition exists
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Returns the registered detail definitions which are valid for organizer items whose type is of the given organizeritemType in this engine.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Returns the engine id from the given id. The caller does not take ownership of the pointer, and should not delete returned id or undefined behavior may occur.
This function was introduced in Qt Mobility 1.1.
Returns the engine id from the given id. The caller does not take ownership of the pointer, and should not delete returned id or undefined behavior may occur.
This function was introduced in Qt Mobility 1.1.
Returns true if the given feature is supported by this engine for organizer items of the given organizeritemType
This function was introduced in Qt Mobility 1.1.
Returns a whether the supplied filter can be implemented natively by this engine. If not, the base class implementation will emulate the functionality.
This function was introduced in Qt Mobility 1.1.
Returns true if the given item (or an occurrence of the item) occurs within the range specified by the startPeriod and the endPeriod, inclusive. A default-constructed startPeriod signifies that the lower bound of the range is infinitely small (i.e., will match anything up to the endPeriod) and a default-constructed endPeriod signifies that the upper bound of the range is infinitely large (i.e., will match anything which occurs after the startPeriod).
This function was introduced in Qt Mobility 1.1.
Returns the organizer item in the database identified by organizeritemId.
If the item does not exist, an empty, default constructed QOrganizerItem will be returned, and the error will be set to QOrganizerManager::DoesNotExistError.
Any operation error which occurs will be saved in error.
The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerItemFetchHint.
Returns a list of organizer item ids that match the given filter, sorted according to the given list of sortOrders, for any item which occurs (or has an occurrence which occurs) in the range specified by the given startDate and endDate. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return the ids of all items which match the filter criteria.
Depending on the backend, this filtering operation may involve retrieving all the organizer items. Any error which occurs will be saved in error.
This function was introduced in Qt Mobility 1.1.
* Returns true if and only if a is temporally less than b. Items with an earlier date are * temporally less than items with a later date, or items with no date. All day items are * temporally less than non-all day items on the same date. For events and todos, the * start date is used, or if null, the end date is used. This function defines a total ordering * suitable for use in a sort function.
This function was introduced in Qt Mobility 1.1.
Return the list of a maximum of maxCount organizer item instances which are occurrences of the given parentItem recurring item, which occur between the given periodStart date and the given periodEnd date.
If periodStart is after periodEnd, the operation will fail, and error will be set to QOrganizerManager::BadArgumentError. If maxCount is negative, it is backend specific as to how many occurrences will be returned. Some backends may return no instances, others may return some limited number of occurrences.
If the parentItem is an item of type QOrganizerItemType::TypeEvent, a list of items of type QOrganizerItemType::TypeEventOccurrence will be returned, representing the expansion of the parent item according to its QOrganizerItemRecurrence detail. Similarly, a parentItem of type QOrganizerItemType::TypeTodo will result in a list of QOrganizerItemType::TypeTodoOccurrence items. If the parentItem is of any other type, it is returned by itself from the backend.
The occurrence-typed items returned should have a QOrganizerItemParent detail that refers to the parent item and the original instance that the event would have occurred on (if it is an exception). No returned item should contain a QOrganizerItemRecurrence detail.
If the parentItem does not exist in the backend, or if there are no instances matching the criteria, an empty list should be returned.
The fetchHint parameter is a hint to the manager about which details the client is interested in. It allows the manager to optimize retrieval of occurrences. The manager may ignore the fetchHint, but if it does so each item occurrence it returns must include all of the details associated with it in the database.
This function was introduced in Qt Mobility 1.1.
Returns the list of organizer items which match the given filter stored in the manager sorted according to the given list of sortOrders, for any item or item occurrence which occurs in the range specified by the given startDate and endDate. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return all items which match the filter criteria.
Any operation error which occurs will be saved in error.
The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerItemFetchHint.
This signal is emitted some time after a set of organizer items has been added to this engine where the dataChanged() signal was not emitted for those changes. As it is possible that other processes (or other devices) may have added the organizer items, the timing cannot be determined.
The list of ids of organizer items added is given by organizeritemIds. There may be one or more ids in the list.
This function was introduced in Qt Mobility 1.1.
See also dataChanged().
This signal is emitted some time after a set of organizer items has been modified in this engine where the dataChanged() signal was not emitted for those changes. As it is possible that other processes (or other devices) may have modified the organizer items, the timing cannot be determined.
The list of ids of changed organizer items is given by organizeritemIds. There may be one or more ids in the list.
This function was introduced in Qt Mobility 1.1.
See also dataChanged().
Returns the list of organizer items which match the given filter stored in the manager sorted according to the given list of sortOrders, for any persisted item which occurs (or has an occurrence which occurs) in the range specified by the given startDate and endDate. A default-constructed (invalid) startDate specifies an open start date (matches anything which occurs up until the endDate), and a default-constructed (invalid) endDate specifies an open end date (matches anything which occurs after the startDate). If both the startDate and endDate are invalid, this function will return all items which match the filter criteria.
Any operation error which occurs will be saved in error.
The fetchHint parameter describes the optimization hints that a manager may take. If the fetchHint is the default constructed hint, all existing details in the matching organizer items will be returned.
Items of type EventOccurrence and TodoOccurrence should only be returned when they represent an exceptional occurrence; ie. if the client has specifically saved the item occurrence in the manager. Occurrence-typed items that are generated purely from a recurrence specification of another detail should not be returned in this list.
All items returned should have a non-zero ID.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerItemFetchHint.
This signal is emitted some time after a set of organizer items has been removed from this engine where the dataChanged() signal was not emitted for those changes. As it is possible that other processes (or other devices) may have removed the organizer items, the timing cannot be determined.
The list of ids of removed organizer items is given by organizeritemIds. There may be one or more ids in the list.
This function was introduced in Qt Mobility 1.1.
See also dataChanged().
Returns the manager name for this QOrganizerManagerEngine
This function was introduced in Qt Mobility 1.1.
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.
This function was introduced in Qt Mobility 1.1.
Returns the unique URI of this manager, which is built from the manager name and the parameters used to construct it.
This function was introduced in Qt Mobility 1.1.
Returns the engine backend implementation version number
This function was introduced in Qt Mobility 1.1.
Returns true if the removing of the collectionId was successful otherwise false. Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Removes the definition identified by the given definitionName from the database, where it was valid for organizer items whose type was the given organizeritemType.
Returns true if the definition was removed successfully, otherwise returns false.
The backend must emit the appropriate signals to inform clients of changes to the database resulting from this operation.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Remove the item identified by organizeritemId from the database. Returns true if the item was removed successfully, otherwise returns false.
Any error which occurs will be saved in error.
The default implementation will convert this into a call to removeItems.
This function was introduced in Qt Mobility 1.1.
Remove every item whose id is contained in the list of organizer items ids organizeritemIds. Returns true if all organizer items were removed successfully, otherwise false.
The manager might populate errorMap (the map of indices of the organizeritemIds list to the error which occurred when saving the item at that index) for every index for which the item could not be removed, if it is able. The QOrganizerManager::error() function will only return QOrganizerManager::NoError if all organizer items were removed successfully.
If the list contains ids which do not identify a valid item in the manager, the function will remove any organizer items which are identified by ids in the organizeritemIds list, insert QOrganizerManager::DoesNotExist entries into the errorMap for the indices of invalid ids in the organizeritemIds list, return false, and set the overall operation error to QOrganizerManager::DoesNotExistError.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerManager::removeItem().
Notifies the manager engine that the given request req has been destroyed.
This notifies the engine that:
This means that if there is a worker thread, the engine needs to let that thread know that the request object is not valid and block until that thread acknowledges it. One way to do this is to have a QSet<QOrganizerAbstractRequest*> (or QMap<QOrganizerAbstractRequest, MyCustomRequestState>) that tracks active requests, and insert into that set in startRequest, and remove in requestDestroyed (or when it finishes or is cancelled). Protect that set/map with a mutex, and make sure you take the mutex in the worker thread before calling any of the QOrganizerAbstractRequest::updateXXXXXXRequest functions. And be careful of lock ordering problems :D
This function was introduced in Qt Mobility 1.1.
Returns true if the saving of the collection was successful otherwise false. Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Persists the given definition def in the database, which is valid for organizer items whose type is the given organizeritemType.
Returns true if the definition was saved successfully, and otherwise returns false.
The backend must emit the appropriate signals to inform clients of changes to the database resulting from this operation.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Adds the given item to the database if item has a default-constructed id, or an id with the manager URI set to the URI of this manager and a id of zero, otherwise updates the organizer item in the database which has the same id to be the given item. If the id is non-zero but does not identify any item stored in the manager, the function will return false and error will be set to QOrganizerManager::DoesNotExistError.
The item will be added to the collection identified by the collectionId specified in the item (accessible via item->organizerId()) if it exists, and the item conforms to the schema supported for that collection. If the collection exists but the item does not conform to the schema supported for that collection, the function will return false, and the error will be set to QOrganizerManager::InvalidDetailError.
If the collectionId is not the default (zero) id, but does not identify a valid collection, the function will return false, and error will be set to QOrganizerManager::InvalidCollectionError. If the collectionId is the default (zero) id, the item should be saved in the collection in which it is already saved (if it is already saved in this manager), or in the default collection (if it is a new item in this manager).
Returns true if the save operation completed successfully, otherwise returns false. Any error which occurs will be saved in error.
The default implementation will convert this into a call to saveItems.
This function was introduced in Qt Mobility 1.1.
See also managerUri().
Adds the list of organizer items given by items list to the database. Returns true if the organizer items were saved successfully, otherwise false.
The engine might populate errorMap (the map of indices of the items list to the error which occurred when saving the item at that index) for every index for which the item could not be saved, if it is able. The QOrganizerManager::error() function will only return QOrganizerManager::NoError if all organizer items were saved successfully.
For each newly saved item that was successful, the id of the item in the items list will be updated with the new value.
Each item in the given list items will be added to the collection identified in the item (accessible via item->collectionId()) if it exists, and if the item conform to the schema supported for that collection. If the collection exists but the item does not conform to the schema supported for that collection, the function will return false, and the error in the errorMap for the item at that index will be set to QOrganizerManager::InvalidDetailError.
If the collectionId is not the default (zero) id, but does not identify a valid collection, the function will return false, and error will be set to QOrganizerManager::InvalidCollectionError. If the collectionId is the default (zero) id, the item should be saved in the collection in which it is already saved (if they are already saved in this manager), or in the default collection (if they are new items in this manager).
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerManager::saveItem().
Returns the default schema definitions for the given version of the schema. Version 1 of the schema corresponds to version 1.1 of the Qt Mobility APIs.
Sets the access constraints of detail to the supplied constraints.
This function is provided to allow engine implementations to report the access constraints of retrieved details, without generally allowing the access constraints to be modified after retrieval.
Application code should not call this function, since validation of the detail will happen in the engine in any case.
This function was introduced in Qt Mobility 1.1.
Asks the manager engine to begin the given request req which is currently in a (re)startable state. Returns true if the request was started successfully, else returns false.
Generally, the engine queues the request and processes it at some later time (probably in another thread).
Once a request is started, the engine should call the updateRequestState and/or the specific updateXXXXXRequest functions to mark it in the active state.
If the engine is particularly fast, or the operation involves only in memory data, the request can be processed and completed without queueing it.
Note that when the client is threaded, and the request might live on a different thread, the engine needs to be careful with locking. In particular, the request might be deleted while the engine is still working on it. In this case, the requestDestroyed function will be called while the request is still valid, and that function should block until the worker thread (etc.) has been notified not to touch that request any more.
This function was introduced in Qt Mobility 1.1.
See also QOrganizerAbstractRequest::start().
Returns the list of item types which are supported by this engine. This is a convenience function, equivalent to retrieving the allowable values for the QOrganizerItemType::FieldType field of the QOrganizerItemType definition which is valid in this engine.
This function was introduced in Qt Mobility 1.1.
Returns true if the supplied item item matches the supplied filter filter.
This function will test each condition in the filter, possibly recursing.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerCollectionFetchRequest req with the latest results result and an operation error error. 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerCollectionRemoveRequest req with the operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerCollectionSaveRequest req with the latest results result, operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemDetailDefinitionFetchRequest req with the latest results result, operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemDetailDefinitionRemoveRequest req with the operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemDetailDefinitionSaveRequest req with the latest results result, operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemFetchForExportRequest req with the latest results result, and operation error error. 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemFetchRequest req with the latest results result, and operation error error. 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemIdFetchRequest req with the latest results result, and operation error error. 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemOccurrenceFetchRequest req with the latest results result, and operation error error. 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemRemoveRequest req with the operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
Updates the given QOrganizerItemSaveRequest req with the latest results result, operation error error, and map of input index to individual error 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.
This function was introduced in Qt Mobility 1.1.
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.
This function was introduced in Qt Mobility 1.1.
Returns true if the collection is valid and can be saved in the engine. By default, modifiable collections are not supported, so this function returns false, and error is set to QOrganizerManager::NotSupportedError. Engines which do implement mutable collections should reimplement this function.
This function was introduced in Qt Mobility 1.1.
Checks that the given detail definition definition seems valid, with a correct id, defined fields, and any specified value types are supported by this engine. This function is called before trying to save a definition.
Returns true if the definition seems valid, otherwise returns false.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Checks that the given item item does not have details which don't conform to a valid definition, violate uniqueness constraints, or contain values for nonexistent fields, and that the values contained are of the correct type for each field, and are allowable values for that field.
Note that this function is unable to ensure that the access constraints (such as CreateOnly and ReadOnly) are observed; backend specific code must be written if you wish to enforce these constraints.
Returns true if the item is valid according to the definitions for its details, otherwise returns false.
Any errors encountered during this operation should be stored to error.
This function was introduced in Qt Mobility 1.1.
Blocks until the manager engine has completed the given request req 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 QOrganizerAbstractRequest::Active state or no progress could be reported.
It is important that this function is implemented by the engine, at least merely as a delay, since clients may call it in a loop.
This function was introduced in Qt Mobility 1.1.
See also startRequest().