[telepathy-qt4/master] ClientRegistrar: Changed AbstractClientHandler isListeningRequests method and listenRequests constructor param to wantsRequestNotification.

Andre Moreira Magalhaes (andrunko) andre.magalhaes at collabora.co.uk
Wed May 6 10:14:52 PDT 2009


---
 TelepathyQt4/abstract-client.cpp  |   10 +++++-----
 TelepathyQt4/abstract-client.h    |    4 ++--
 TelepathyQt4/client-registrar.cpp |    2 +-
 tests/dbus/client-handler.cpp     |    8 ++++----
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/TelepathyQt4/abstract-client.cpp b/TelepathyQt4/abstract-client.cpp
index df1127b..59a4f02 100644
--- a/TelepathyQt4/abstract-client.cpp
+++ b/TelepathyQt4/abstract-client.cpp
@@ -31,15 +31,15 @@ namespace Tp
 struct AbstractClientHandler::Private
 {
     ChannelClassList channelFilter;
-    bool listenRequests;
+    bool wantsRequestNotification;
 };
 
 AbstractClientHandler::AbstractClientHandler(const ChannelClassList &channelFilter,
-        bool listenRequests)
+        bool wantsRequestNotification)
     : mPriv(new Private)
 {
     mPriv->channelFilter = channelFilter;
-    mPriv->listenRequests = listenRequests;
+    mPriv->wantsRequestNotification = wantsRequestNotification;
 }
 
 AbstractClientHandler::~AbstractClientHandler()
@@ -52,9 +52,9 @@ ChannelClassList AbstractClientHandler::channelFilter() const
     return mPriv->channelFilter;
 }
 
-bool AbstractClientHandler::isListeningRequests() const
+bool AbstractClientHandler::wantsRequestNotification() const
 {
-    return mPriv->listenRequests;
+    return mPriv->wantsRequestNotification;
 }
 
 void AbstractClientHandler::addRequest(
diff --git a/TelepathyQt4/abstract-client.h b/TelepathyQt4/abstract-client.h
index 97cc99c..b26a6f9 100644
--- a/TelepathyQt4/abstract-client.h
+++ b/TelepathyQt4/abstract-client.h
@@ -58,14 +58,14 @@ public:
             const QDateTime &userActionTime,
             const QVariantMap &handlerInfo) = 0;
 
-    bool isListeningRequests() const;
+    bool wantsRequestNotification() const;
     virtual void addRequest(const ChannelRequestPtr &request);
     virtual void removeRequest(const ChannelRequestPtr &request,
             const QString &errorName, const QString &errorMessage);
 
 protected:
     AbstractClientHandler(const ChannelClassList &channelFilter,
-            bool listenRequests = false);
+            bool wantsRequestNotification = false);
 
 private:
     struct Private;
diff --git a/TelepathyQt4/client-registrar.cpp b/TelepathyQt4/client-registrar.cpp
index 11feb61..c55e638 100644
--- a/TelepathyQt4/client-registrar.cpp
+++ b/TelepathyQt4/client-registrar.cpp
@@ -420,7 +420,7 @@ bool ClientRegistrar::registerClient(const ClientObjectPtr &client,
         clientHandlerAdaptor = new ClientHandlerAdaptor(mPriv->bus, handler, object);
         interfaces.append(
                 QLatin1String("org.freedesktop.Telepathy.Client.Handler"));
-        if (handler->isListeningRequests()) {
+        if (handler->wantsRequestNotification()) {
             // export o.f.T.Client.Interface.Requests
             clientHandlerRequestsAdaptor =
                 new ClientHandlerRequestsAdaptor(mPriv->bus, handler, object);
diff --git a/tests/dbus/client-handler.cpp b/tests/dbus/client-handler.cpp
index c5d4902..c0218cd 100644
--- a/tests/dbus/client-handler.cpp
+++ b/tests/dbus/client-handler.cpp
@@ -134,16 +134,16 @@ class MyHandler : public QObject, public AbstractClientHandler
 public:
     static AbstractClientHandlerPtr create(const ChannelClassList &channelFilter,
             bool bypassApproval = false,
-            bool listenRequests = false)
+            bool wantsRequestNotification = false)
     {
         return AbstractClientHandlerPtr(new MyHandler(channelFilter,
-                    bypassApproval, listenRequests));
+                    bypassApproval, wantsRequestNotification));
     }
 
     MyHandler(const ChannelClassList &channelFilter,
             bool bypassApproval = false,
-            bool listenRequests = false)
-        : AbstractClientHandler(channelFilter, listenRequests),
+            bool wantsRequestNotification = false)
+        : AbstractClientHandler(channelFilter, wantsRequestNotification),
           mBypassApproval(bypassApproval)
     {
     }
-- 
1.5.6.5




More information about the telepathy-commits mailing list