[telepathy-qt4/master] ContactManager: Added groupAddContacts method.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Wed Jul 22 00:28:52 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 173d2fa..8e8442a 100644
--- a/TelepathyQt4/contact-manager.cpp
+++ b/TelepathyQt4/contact-manager.cpp
@@ -173,6 +173,18 @@ Contacts ContactManager::groupContacts(const QString &group) const
return channel->groupContacts();
}
+PendingOperation *ContactManager::groupAddContacts(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->groupAddContacts(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 1180b68..19b7aca 100644
--- a/TelepathyQt4/contact-manager.h
+++ b/TelepathyQt4/contact-manager.h
@@ -57,6 +57,8 @@ public:
QStringList allKnownGroups() const;
Contacts groupContacts(const QString &group) const;
+ PendingOperation *groupAddContacts(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