[Telepathy-commits] [telepathy-qt4/master] ContactManager: Renamed deny to remove on contact publication related methods.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Thu Feb 26 15:29:20 PST 2009
---
TelepathyQt4/Client/contact-manager.cpp | 10 ++++++----
TelepathyQt4/Client/contact-manager.h | 4 ++--
TelepathyQt4/Client/contact.cpp | 4 ++--
TelepathyQt4/Client/contact.h | 2 +-
4 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/TelepathyQt4/Client/contact-manager.cpp b/TelepathyQt4/Client/contact-manager.cpp
index 0bc2eba..909797c 100644
--- a/TelepathyQt4/Client/contact-manager.cpp
+++ b/TelepathyQt4/Client/contact-manager.cpp
@@ -220,7 +220,7 @@ PendingOperation *ContactManager::authorizeContactsPresencePublication(
return publishChannel->groupAddContacts(contacts);
}
-bool ContactManager::canDenyContactsPresencePublication() const
+bool ContactManager::canRemoveContactsPresencePublication() const
{
QSharedPointer<Channel> publishChannel;
if (mPriv->contactListsChannels.contains(ContactListChannel::TypePublish)) {
@@ -229,12 +229,14 @@ bool ContactManager::canDenyContactsPresencePublication() const
return publishChannel && publishChannel->groupCanRemoveContacts();
}
-PendingOperation *ContactManager::denyContactsPresencePublication(
+PendingOperation *ContactManager::removeContactsPresencePublication(
const QList<QSharedPointer<Contact> > &contacts, const QString &message)
{
- if (!canDenyContactsPresencePublication()) {
+ if (!canRemoveContactsPresencePublication()) {
+ warning() << "Contact publication remove requested, "
+ "but unable to remove contacts";
return new PendingFailure(this, TELEPATHY_ERROR_NOT_IMPLEMENTED,
- "Cannot deny contacts presence publication");
+ "Cannot remove contacts presence publication");
}
QSharedPointer<Channel> publishChannel =
diff --git a/TelepathyQt4/Client/contact-manager.h b/TelepathyQt4/Client/contact-manager.h
index 18ba78f..af9d502 100644
--- a/TelepathyQt4/Client/contact-manager.h
+++ b/TelepathyQt4/Client/contact-manager.h
@@ -68,8 +68,8 @@ class ContactManager : public QObject
bool canAuthorizeContactsPresencePublication() const;
PendingOperation *authorizeContactsPresencePublication(
const QList<QSharedPointer<Contact> > &contacts, const QString &message = QString());
- bool canDenyContactsPresencePublication() const;
- PendingOperation *denyContactsPresencePublication(
+ bool canRemoveContactsPresencePublication() const;
+ PendingOperation *removeContactsPresencePublication(
const QList<QSharedPointer<Contact> > &contacts, const QString &message = QString());
PendingContacts *contactsForHandles(const UIntList &handles,
diff --git a/TelepathyQt4/Client/contact.cpp b/TelepathyQt4/Client/contact.cpp
index 3a3f92e..f248fc3 100644
--- a/TelepathyQt4/Client/contact.cpp
+++ b/TelepathyQt4/Client/contact.cpp
@@ -190,11 +190,11 @@ PendingOperation *Contact::authorizePresencePublication(const QString &message)
message);
}
-PendingOperation *Contact::denyPresencePublication(const QString &message)
+PendingOperation *Contact::removePresencePublication(const QString &message)
{
QSharedPointer<Contact> self =
mPriv->manager->lookupContactByHandle(mPriv->handle[0]);
- return mPriv->manager->denyContactsPresencePublication(
+ return mPriv->manager->removeContactsPresencePublication(
QList<QSharedPointer<Contact> >() << self,
message);
}
diff --git a/TelepathyQt4/Client/contact.h b/TelepathyQt4/Client/contact.h
index 57f243b..848c8f2 100644
--- a/TelepathyQt4/Client/contact.h
+++ b/TelepathyQt4/Client/contact.h
@@ -83,7 +83,7 @@ public:
PendingOperation *requestPresenceSubscription(const QString &message = QString());
PendingOperation *removePresenceSubscription(const QString &message = QString());
PendingOperation *authorizePresencePublication(const QString &message = QString());
- PendingOperation *denyPresencePublication(const QString &message = QString());
+ PendingOperation *removePresencePublication(const QString &message = QString());
~Contact();
--
1.5.6.5
More information about the telepathy-commits
mailing list