summaryrefslogtreecommitdiffstats
path: root/src/contacts/qcontactmanager.h
diff options
context:
space:
mode:
authorKranthi Kuntala <kranthi.kumar-kuntala@nokia.com>2011-12-19 18:57:47 +0200
committerQt by Nokia <qt-info@nokia.com>2012-01-24 12:15:35 +0100
commite6cf6153e49183e5fa216182f8d24757e479ad23 (patch)
treefa8700037852166ac8e6d8120d437968acef7bf0 /src/contacts/qcontactmanager.h
parentd3a14bb37104c05a3bc48268cbbb145b980a71ec (diff)
introduce QContactId
This change introduces a back-end agnostic QContactId abstraction based on the design pattern already adopted in Organizer API. Back-end specific IDs are hidden behind an opaque QContactId wrapper class. This implementation removes the QContactLocalId from the api Fixes to auto tests done by Pekka Kauppila<pekka.kauppila@nokia.com> Change-Id: Ib9f5433c662eeac476f73005500c1bdd5604b1fb Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Cristiano di Flora <cristiano.di-flora@nokia.com> Reviewed-by: Mikko Suonio <mikko.suonio@nokia.com>
Diffstat (limited to 'src/contacts/qcontactmanager.h')
-rw-r--r--src/contacts/qcontactmanager.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/contacts/qcontactmanager.h b/src/contacts/qcontactmanager.h
index bdc12baa8..17cc72088 100644
--- a/src/contacts/qcontactmanager.h
+++ b/src/contacts/qcontactmanager.h
@@ -125,21 +125,21 @@ public:
QMap<int, QContactManager::Error> errorMap() const;
/* Contacts - Accessors and Mutators */
- QList<QContactLocalId> contactIds(const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const;
- QList<QContactLocalId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const;
+ QList<QContactId> contactIds(const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const;
+ QList<QContactId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>()) const;
QList<QContact> contacts(const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>(), const QContactFetchHint& fetchHint = QContactFetchHint()) const;
QList<QContact> contacts(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders = QList<QContactSortOrder>(), const QContactFetchHint& fetchHint = QContactFetchHint()) const;
- QList<QContact> contacts(const QList<QContactLocalId>& localIds, const QContactFetchHint& fetchHint = QContactFetchHint(), QMap<int, QContactManager::Error>* errorMap = 0) const;
+ QList<QContact> contacts(const QList<QContactId>& contactIds, const QContactFetchHint& fetchHint = QContactFetchHint(), QMap<int, QContactManager::Error>* errorMap = 0) const;
- QContact contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint = QContactFetchHint()) const; // retrieve a contact
+ QContact contact(const QContactId& contactId, const QContactFetchHint& fetchHint = QContactFetchHint()) const; // retrieve a contact
bool saveContact(QContact* contact); // note: MODIFIES contact (sets the contactId)
- bool removeContact(const QContactLocalId& contactId); // remove the contact from the persistent store
+ bool removeContact(const QContactId& contactId); // remove the contact from the persistent store
bool saveContacts(QList<QContact>* contacts, QMap<int, QContactManager::Error>* errorMap = 0); // batch API - save.
bool saveContacts(QList<QContact>* contacts, const QStringList& definitionMask, QMap<int, QContactManager::Error>* errorMap = 0); // Partial save
- bool removeContacts(const QList<QContactLocalId>& contactIds, QMap<int, QContactManager::Error>* errorMap = 0); // batch API - remove.
+ bool removeContacts(const QList<QContactId>& contactIds, QMap<int, QContactManager::Error>* errorMap = 0); // batch API - remove.
/* Return a pruned or modified contact which is valid and can be saved in the manager */
QContact compatibleContact(const QContact& original);
@@ -149,8 +149,8 @@ public:
void synthesizeContactDisplayLabel(QContact* contact) const;
/* "Self" contact id (MyCard) */
- bool setSelfContactId(const QContactLocalId& contactId);
- QContactLocalId selfContactId() const;
+ bool setSelfContactId(const QContactId& contactId);
+ QContactId selfContactId() const;
/* Relationships */
QList<QContactRelationship> relationships(const QContact& participant, QContactRelationship::Role role = QContactRelationship::Either) const;
@@ -182,12 +182,12 @@ public:
Q_SIGNALS:
void dataChanged();
- void contactsAdded(const QList<QContactLocalId>& contactIds);
- void contactsChanged(const QList<QContactLocalId>& contactIds);
- void contactsRemoved(const QList<QContactLocalId>& contactIds);
- void relationshipsAdded(const QList<QContactLocalId>& affectedContactIds);
- void relationshipsRemoved(const QList<QContactLocalId>& affectedContactIds);
- void selfContactIdChanged(const QContactLocalId& oldId, const QContactLocalId& newId); // need both? or just new?
+ void contactsAdded(const QList<QContactId>& contactIds);
+ void contactsChanged(const QList<QContactId>& contactIds);
+ void contactsRemoved(const QList<QContactId>& contactIds);
+ void relationshipsAdded(const QList<QContactId>& affectedContactIds);
+ void relationshipsRemoved(const QList<QContactId>& affectedContactIds);
+ void selfContactIdChanged(const QContactId& oldId, const QContactId& newId); // need both? or just new?
protected:
void connectNotify(const char *signal);
@@ -199,8 +199,8 @@ private:
Q_DISABLE_COPY(QContactManager)
- Q_PRIVATE_SLOT(d, void _q_contactsUpdated(const QList<QContactLocalId>& ids))
- Q_PRIVATE_SLOT(d, void _q_contactsDeleted(const QList<QContactLocalId>& ids))
+ Q_PRIVATE_SLOT(d, void _q_contactsUpdated(const QList<QContactId>& ids))
+ Q_PRIVATE_SLOT(d, void _q_contactsDeleted(const QList<QContactId>& ids))
// private data pointer
QContactManagerData* d;