[telepathy-qt4/master] Contact: Added addToGroup method.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Wed Jul 22 00:51:53 PDT 2009
---
TelepathyQt4/contact.cpp | 8 ++++++++
TelepathyQt4/contact.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/TelepathyQt4/contact.cpp b/TelepathyQt4/contact.cpp
index 0c8eafa..bd59edf 100644
--- a/TelepathyQt4/contact.cpp
+++ b/TelepathyQt4/contact.cpp
@@ -213,6 +213,14 @@ PendingOperation *Contact::block(bool value)
value);
}
+PendingOperation *Contact::addToGroup(const QString &group)
+{
+ ContactPtr self =
+ mPriv->manager->lookupContactByHandle(mPriv->handle[0]);
+ return mPriv->manager->groupAddContacts(
+ group, QList<ContactPtr>() << self);
+}
+
Contact::~Contact()
{
debug() << "Contact" << id() << "destroyed";
diff --git a/TelepathyQt4/contact.h b/TelepathyQt4/contact.h
index ceb8fa1..b066eb3 100644
--- a/TelepathyQt4/contact.h
+++ b/TelepathyQt4/contact.h
@@ -87,6 +87,8 @@ public:
bool isBlocked() const;
PendingOperation *block(bool value = true);
+ PendingOperation *addToGroup(const QString &group);
+
~Contact();
Q_SIGNALS:
--
1.5.6.5
More information about the telepathy-commits
mailing list