[telepathy-qt4/master] Contact: Added groups method.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Wed Jul 22 01:02:32 PDT 2009
---
TelepathyQt4/contact.cpp | 7 +++++++
TelepathyQt4/contact.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/TelepathyQt4/contact.cpp b/TelepathyQt4/contact.cpp
index 7817291..c104347 100644
--- a/TelepathyQt4/contact.cpp
+++ b/TelepathyQt4/contact.cpp
@@ -213,6 +213,13 @@ PendingOperation *Contact::block(bool value)
value);
}
+QStringList Contact::groups() const
+{
+ ContactPtr self =
+ mPriv->manager->lookupContactByHandle(mPriv->handle[0]);
+ return mPriv->manager->contactGroups(self);
+}
+
PendingOperation *Contact::addToGroup(const QString &group)
{
ContactPtr self =
diff --git a/TelepathyQt4/contact.h b/TelepathyQt4/contact.h
index 7d8f886..5565e39 100644
--- a/TelepathyQt4/contact.h
+++ b/TelepathyQt4/contact.h
@@ -87,6 +87,7 @@ public:
bool isBlocked() const;
PendingOperation *block(bool value = true);
+ QStringList groups() const;
PendingOperation *addToGroup(const QString &group);
PendingOperation *removeFromGroup(const QString &group);
--
1.5.6.5
More information about the telepathy-commits
mailing list