diff options
author | Tommi Anttila <tommi.4.anttila@nokia.com> | 2012-04-17 15:58:14 +0300 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-23 10:30:03 +0200 |
commit | b7f85326ab6728c9fbd6593829a21c3f1ae8666c (patch) | |
tree | 45f50b3298956dd020b5cdd8e27f2b73b783b4cd /src/contacts/qcontactmanagerengine.h | |
parent | 97e3979fadf281675cb7623071a18531e180816d (diff) |
Remove QContactManagerEngineV2Wrapper, add PartialSave functionality
-Merged QContactManagerEngineV2Wrapper class to QContactManagerEngine class
-PartialSave functionality added to JsonDb and Memory backends
(JsonDb side by Mika Tikkakoski mika.tikkakoski@nokia.com)
-Adapted PartialSave tests in qcontactasync tests to match current lastError functionality
Change-Id: I2c0be0fa2369c027221d6b51cce2b1304eb86685
Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com>
Diffstat (limited to 'src/contacts/qcontactmanagerengine.h')
-rw-r--r-- | src/contacts/qcontactmanagerengine.h | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/src/contacts/qcontactmanagerengine.h b/src/contacts/qcontactmanagerengine.h index a55043dd8..934346331 100644 --- a/src/contacts/qcontactmanagerengine.h +++ b/src/contacts/qcontactmanagerengine.h @@ -80,6 +80,7 @@ public: /* Filtering */ virtual QList<QContactId> contactIds(const QContactFilter &filter, const QList<QContactSortOrder> &sortOrders, QContactManager::Error *error) const; virtual QList<QContact> contacts(const QContactFilter &filter, const QList<QContactSortOrder>& sortOrders, const QContactFetchHint &fetchHint, QContactManager::Error *error) const; + virtual QList<QContact> contacts(const QList<QContactId> &contactIds, const QContactFetchHint& fetchHint, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error) const; virtual QContact contact(const QContactId &contactId, const QContactFetchHint &fetchHint, QContactManager::Error *error) const; virtual bool saveContact(QContact *contact, QContactManager::Error *error); @@ -88,6 +89,7 @@ public: virtual bool removeRelationship(const QContactRelationship &relationship, QContactManager::Error *error); virtual bool saveContacts(QList<QContact> *contacts, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error); + virtual bool saveContacts(QList<QContact> *contacts, const QList<QContactDetail::DetailType> &typeMask, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error); virtual bool removeContacts(const QList<QContactId> &contactIds, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error); /* "Self" contact id (MyCard) */ @@ -130,6 +132,7 @@ public: static void updateContactIdFetchRequest(QContactIdFetchRequest *req, const QList<QContactId>& result, QContactManager::Error error, QContactAbstractRequest::State); static void updateContactFetchRequest(QContactFetchRequest *req, const QList<QContact> &result, QContactManager::Error error, QContactAbstractRequest::State); + static void updateContactFetchByIdRequest(QContactFetchByIdRequest *req, const QList<QContact>& result, QContactManager::Error error, const QMap<int, QContactManager::Error> &errorMap, QContactAbstractRequest::State); static void updateContactRemoveRequest(QContactRemoveRequest *req, QContactManager::Error error, const QMap<int, QContactManager::Error> &errorMap, QContactAbstractRequest::State); static void updateContactSaveRequest(QContactSaveRequest *req, const QList<QContact> &result, QContactManager::Error error, const QMap<int, QContactManager::Error> &errorMap, QContactAbstractRequest::State); static void updateRelationshipSaveRequest(QContactRelationshipSaveRequest *req, const QList<QContactRelationship> &result, QContactManager::Error error, const QMap<int, QContactManager::Error> &errorMap, QContactAbstractRequest::State); @@ -156,38 +159,10 @@ private: friend class QContactChangeSet; }; - -class QContactIdFetchRequest; -class QContactFetchRequest; -class QContactSaveRequest; -class QContactRemoveRequest; -class QContactDetailDefinitionFetchRequest; -class QContactDetailDefinitionRemoveRequest; -class QContactDetailDefinitionSaveRequest; -class QContactRelationshipFetchRequest; -class QContactRelationshipSaveRequest; -class QContactRelationshipRemoveRequest; - -class Q_CONTACTS_EXPORT QContactManagerEngineV2 : public QContactManagerEngine -{ - Q_OBJECT -public: - QContactManagerEngineV2() : QContactManagerEngine() {} - - // This is the V1 function - c++ overloading rules require this here, or to use "using" - bool saveContacts(QList<QContact> *contacts, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error* error); - virtual bool saveContacts(QList<QContact> *contacts, const QList<QContactDetail::DetailType> &typeMask, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error); - - // Again, this is the v1 function - QList<QContact> contacts(const QContactFilter &filter, const QList<QContactSortOrder>& sortOrders, const QContactFetchHint &fetchHint, QContactManager::Error* error) const; - virtual QList<QContact> contacts(const QList<QContactId> &contactIds, const QContactFetchHint& fetchHint, QMap<int, QContactManager::Error> *errorMap, QContactManager::Error *error) const; - static void updateContactFetchByIdRequest(QContactFetchByIdRequest *req, const QList<QContact>& result, QContactManager::Error error, const QMap<int, QContactManager::Error> &errorMap, QContactAbstractRequest::State); -}; - QTCONTACTS_END_NAMESPACE QT_BEGIN_NAMESPACE -Q_DECLARE_INTERFACE(QtContacts::QContactManagerEngineV2, "org.qt-project.Qt.QContactManagerEngineV2") +Q_DECLARE_INTERFACE(QtContacts::QContactManagerEngine, "org.qt-project.Qt.QContactManagerEngine") QT_END_NAMESPACE #endif |