qtcontactsmobility/src/contacts/qcontactchangeset.h
changeset 27 de1630741fbe
parent 24 0ba2181d7c28
equal deleted inserted replaced
25:76a2435edfd4 27:de1630741fbe
    42 
    42 
    43 #ifndef QCONTACTCHANGESET_H
    43 #ifndef QCONTACTCHANGESET_H
    44 #define QCONTACTCHANGESET_H
    44 #define QCONTACTCHANGESET_H
    45 
    45 
    46 #include "qtcontactsglobal.h"
    46 #include "qtcontactsglobal.h"
       
    47 #include "qcontactid.h"
    47 
    48 
    48 #include <QSet>
    49 #include <QSet>
    49 #include <QPair>
    50 #include <QPair>
    50 #include <QSharedDataPointer>
    51 #include <QSharedDataPointer>
    51 
    52 
    63     QContactChangeSet& operator=(const QContactChangeSet& other);
    64     QContactChangeSet& operator=(const QContactChangeSet& other);
    64 
    65 
    65     void setDataChanged(bool dataChanged);
    66     void setDataChanged(bool dataChanged);
    66     bool dataChanged();
    67     bool dataChanged();
    67 
    68 
    68     QSet<QContactLocalId>& addedContacts();
    69     QSet<QContactLocalId> Q_DECL_DEPRECATED & addedContacts();
    69     QSet<QContactLocalId>& changedContacts();
    70     QSet<QContactLocalId> Q_DECL_DEPRECATED & changedContacts();
    70     QSet<QContactLocalId>& removedContacts();
    71     QSet<QContactLocalId> Q_DECL_DEPRECATED & removedContacts();
    71     QSet<QContactLocalId>& addedRelationshipsContacts();
    72     QSet<QContactLocalId> Q_DECL_DEPRECATED & addedRelationshipsContacts();
    72     QSet<QContactLocalId>& removedRelationshipsContacts();
    73     QSet<QContactLocalId> Q_DECL_DEPRECATED & removedRelationshipsContacts();
    73     QPair<QContactLocalId, QContactLocalId>& oldAndNewSelfContactId();
    74     QPair<QContactLocalId, QContactLocalId> Q_DECL_DEPRECATED & oldAndNewSelfContactId();
    74 
    75 
    75     void clear();
    76     void Q_DECL_DEPRECATED clear();
       
    77 
       
    78     QSet<QContactLocalId> addedContacts() const;
       
    79     void insertAddedContact(QContactLocalId addedContactId);
       
    80     void insertAddedContacts(const QList<QContactLocalId>& addedContactIds);
       
    81     void clearAddedContacts();
       
    82 
       
    83     QSet<QContactLocalId> changedContacts() const;
       
    84     void insertChangedContact(QContactLocalId addedContactId);
       
    85     void insertChangedContacts(const QList<QContactLocalId>& addedContactIds);
       
    86     void clearChangedContacts();
       
    87 
       
    88     QSet<QContactLocalId> removedContacts() const;
       
    89     void insertRemovedContact(QContactLocalId addedContactId);
       
    90     void insertRemovedContacts(const QList<QContactLocalId>& addedContactIds);
       
    91     void clearRemovedContacts();
       
    92 
       
    93     QSet<QContactLocalId> addedRelationshipsContacts() const;
       
    94     void insertAddedRelationshipsContact(QContactLocalId affectedContactId);
       
    95     void insertAddedRelationshipsContacts(const QList<QContactLocalId>& affectedContactIds);
       
    96     void clearAddedRelationshipsContacts();
       
    97 
       
    98     QSet<QContactLocalId> removedRelationshipsContacts() const;
       
    99     void insertRemovedRelationshipsContact(QContactLocalId affectedContactId);
       
   100     void insertRemovedRelationshipsContacts(const QList<QContactLocalId>& affectedContactIds);
       
   101     void clearRemovedRelationshipsContacts();
       
   102 
       
   103     void setOldAndNewSelfContactId(const QPair<QContactLocalId, QContactLocalId>& oldAndNewContactId);
       
   104     QPair<QContactLocalId, QContactLocalId> oldAndNewSelfContactId() const;
       
   105 
       
   106     void clearAll();
    76 
   107 
    77     void emitSignals(QContactManagerEngine *engine);
   108     void emitSignals(QContactManagerEngine *engine);
    78 
   109 
    79 private:
   110 private:
    80     QSharedDataPointer<QContactChangeSetData> d;
   111     QSharedDataPointer<QContactChangeSetData> d;