[telepathy-qt4/master] ContactManager: Added groupRemoveContacts method.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed Jul 22 00:30:51 PDT 2009


---
 TelepathyQt4/contact-manager.cpp |   12 ++++++++++++
 TelepathyQt4/contact-manager.h   |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/contact-manager.cpp b/TelepathyQt4/contact-manager.cpp
index 8e8442a..f84252c 100644
--- a/TelepathyQt4/contact-manager.cpp
+++ b/TelepathyQt4/contact-manager.cpp
@@ -185,6 +185,18 @@ PendingOperation *ContactManager::groupAddContacts(const QString &group,
     return channel->groupAddContacts(contacts);
 }
 
+PendingOperation *ContactManager::groupRemoveContacts(const QString &group,
+        const QList<ContactPtr> &contacts)
+{
+    if (!mPriv->contactListGroupsChannels.contains(group)) {
+        return new PendingFailure(this, TELEPATHY_ERROR_INVALID_ARGUMENT,
+                "Invalid group");
+    }
+
+    ChannelPtr channel = mPriv->contactListGroupsChannels[group];
+    return channel->groupRemoveContacts(contacts);
+}
+
 /**
  * Return whether subscribing to additional contacts' presence is supported
  * on this channel.
diff --git a/TelepathyQt4/contact-manager.h b/TelepathyQt4/contact-manager.h
index 19b7aca..36e0686 100644
--- a/TelepathyQt4/contact-manager.h
+++ b/TelepathyQt4/contact-manager.h
@@ -59,6 +59,8 @@ public:
     Contacts groupContacts(const QString &group) const;
     PendingOperation *groupAddContacts(const QString &group,
             const QList<ContactPtr> &contacts);
+    PendingOperation *groupRemoveContacts(const QString &group,
+            const QList<ContactPtr> &contacts);
 
     bool canRequestPresenceSubscription() const;
     bool subscriptionRequestHasMessage() const;
-- 
1.5.6.5




More information about the telepathy-commits mailing list