qtmobility/plugins/contacts/qtcontacts-tracker/qtrackercontactsaverequest.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
--- a/qtmobility/plugins/contacts/qtcontacts-tracker/qtrackercontactsaverequest.h	Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/plugins/contacts/qtcontacts-tracker/qtrackercontactsaverequest.h	Mon May 03 13:18:40 2010 +0300
@@ -76,11 +76,11 @@
     void saveContacts(const QList<QContact> &contacts);
     void computeProgress(const QList<QContactLocalId> &addedIds);
     void addAffiliation(SopranoLive::RDFServicePtr service, QContactLocalId contactId);
-    void saveContactDetails(SopranoLive::RDFServicePtr service,SopranoLive::Live<SopranoLive::nco::PersonContact>& ncoContact,const QContact &contact);
-    void saveAddresses(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
-    void saveEmails(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
-    void saveUrls(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
-    void savePhoneNumbers(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
+    void saveContactDetails(SopranoLive::RDFServicePtr service,SopranoLive::Live<SopranoLive::nco::PersonContact>& ncoContact,const QContact &contact, bool newContact);
+    void saveAddresses(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
+    void saveEmails(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
+    void saveUrls(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
+    void savePhoneNumbers(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
     void deletePhoneNumbers(SopranoLive::RDFServicePtr service, const SopranoLive::RDFVariable& rdfContactIn);
     void addTag(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QString &tag);
     void createTagIfItDoesntExistAlready(SopranoLive::RDFServicePtr service, const QString &tag);
@@ -88,8 +88,10 @@
 private:
     /*holding the data about status of async operation*/
     QList<QContact> contactsFinished;
-    //QList<QContactManager::Error> errorsOfContactsFinished;
+
     QMap<int, QContactManager::Error> errorsOfContactsFinished;
+    // needed for error reporting - errorsOfContactsFinished is map (array index -> error)
+    QMap<QContactLocalId, int> id2Index;
     int errorCount;
 
     /* extracted utilities */