[telepathy-qt4/master] ContactManager: Added groupContacts method.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Wed Jul 22 00:07:32 PDT 2009
---
TelepathyQt4/contact-manager.cpp | 10 ++++++++++
TelepathyQt4/contact-manager.h | 2 ++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/TelepathyQt4/contact-manager.cpp b/TelepathyQt4/contact-manager.cpp
index 169530c..412204f 100644
--- a/TelepathyQt4/contact-manager.cpp
+++ b/TelepathyQt4/contact-manager.cpp
@@ -163,6 +163,16 @@ QStringList ContactManager::allKnownGroups() const
return mPriv->contactListGroupsChannels.keys();
}
+Contacts ContactManager::groupContacts(const QString &group) const
+{
+ if (!mPriv->contactListGroupsChannels.contains(group)) {
+ return Contacts();
+ }
+
+ ChannelPtr channel = mPriv->contactListGroupsChannels[group];
+ return channel->groupContacts();
+}
+
/**
* 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 d040137..9190a1d 100644
--- a/TelepathyQt4/contact-manager.h
+++ b/TelepathyQt4/contact-manager.h
@@ -56,6 +56,8 @@ public:
Contacts allKnownContacts() const;
QStringList allKnownGroups() const;
+ Contacts groupContacts(const QString &group) const;
+
bool canRequestPresenceSubscription() const;
bool subscriptionRequestHasMessage() const;
PendingOperation *requestPresenceSubscription(
--
1.5.6.5
More information about the telepathy-commits
mailing list