qtmobility/plugins/contacts/qtcontacts-tracker/qtrackercontactsaverequest.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    74 private:
    74 private:
    75     /* worker methods*/
    75     /* worker methods*/
    76     void saveContacts(const QList<QContact> &contacts);
    76     void saveContacts(const QList<QContact> &contacts);
    77     void computeProgress(const QList<QContactLocalId> &addedIds);
    77     void computeProgress(const QList<QContactLocalId> &addedIds);
    78     void addAffiliation(SopranoLive::RDFServicePtr service, QContactLocalId contactId);
    78     void addAffiliation(SopranoLive::RDFServicePtr service, QContactLocalId contactId);
    79     void saveContactDetails(SopranoLive::RDFServicePtr service,SopranoLive::Live<SopranoLive::nco::PersonContact>& ncoContact,const QContact &contact);
    79     void saveContactDetails(SopranoLive::RDFServicePtr service,SopranoLive::Live<SopranoLive::nco::PersonContact>& ncoContact,const QContact &contact, bool newContact);
    80     void saveAddresses(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
    80     void saveAddresses(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
    81     void saveEmails(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
    81     void saveEmails(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
    82     void saveUrls(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
    82     void saveUrls(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
    83     void savePhoneNumbers(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details );
    83     void savePhoneNumbers(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QList<QContactDetail> &details, bool newContact );
    84     void deletePhoneNumbers(SopranoLive::RDFServicePtr service, const SopranoLive::RDFVariable& rdfContactIn);
    84     void deletePhoneNumbers(SopranoLive::RDFServicePtr service, const SopranoLive::RDFVariable& rdfContactIn);
    85     void addTag(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QString &tag);
    85     void addTag(SopranoLive::RDFServicePtr service, SopranoLive::RDFVariable &var, const QString &tag);
    86     void createTagIfItDoesntExistAlready(SopranoLive::RDFServicePtr service, const QString &tag);
    86     void createTagIfItDoesntExistAlready(SopranoLive::RDFServicePtr service, const QString &tag);
    87 
    87 
    88 private:
    88 private:
    89     /*holding the data about status of async operation*/
    89     /*holding the data about status of async operation*/
    90     QList<QContact> contactsFinished;
    90     QList<QContact> contactsFinished;
    91     //QList<QContactManager::Error> errorsOfContactsFinished;
    91 
    92     QMap<int, QContactManager::Error> errorsOfContactsFinished;
    92     QMap<int, QContactManager::Error> errorsOfContactsFinished;
       
    93     // needed for error reporting - errorsOfContactsFinished is map (array index -> error)
       
    94     QMap<QContactLocalId, int> id2Index;
    93     int errorCount;
    95     int errorCount;
    94 
    96 
    95     /* extracted utilities */
    97     /* extracted utilities */
    96     static QStringList detailsDefinitionsInContact(const QContact &c);
    98     static QStringList detailsDefinitionsInContact(const QContact &c);
    97     static bool contactHasWorkRelatedDetails(const QContact &c);
    99     static bool contactHasWorkRelatedDetails(const QContact &c);