From c2f1bed0f87e65a4b2b0217269310cace9d50b4b Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> Date: Tue, 10 Sep 2013 10:55:20 -0400 Subject: [PATCH] * #29736: presence: Peer review changes --- daemon/src/client/dbus/presencemanager-introspec.xml | 8 ++++---- daemon/src/client/dbus/presencemanager.cpp | 6 +++--- daemon/src/client/presencemanager.h | 8 ++++---- daemon/src/sip/sippresence.cpp | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/daemon/src/client/dbus/presencemanager-introspec.xml b/daemon/src/client/dbus/presencemanager-introspec.xml index 8e10ef8063..cd69b3371a 100644 --- a/daemon/src/client/dbus/presencemanager-introspec.xml +++ b/daemon/src/client/dbus/presencemanager-introspec.xml @@ -3,7 +3,7 @@ <node name="/presencemanager-introspec" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> <interface name="org.sflphone.SFLphone.PresenceManager"> <!-- METHODS !--> - <method name="sendPresence" tp:name-for-bindings="sendPresence"> + <method name="publish" tp:name-for-bindings="publish"> <tp:added version="1.3.0"/> <arg type="s" name="accountID" direction="in"> <tp:docstring> @@ -22,7 +22,7 @@ </arg> </method> - <method name="approvePresSubServer" tp:name-for-bindings="approvePresSubServer"> + <method name="answerServerRequest" tp:name-for-bindings="answerServerRequest"> <tp:docstring> Answer a presence request from the server </tp:docstring> @@ -38,7 +38,7 @@ </arg> </method> - <method name="subscribeClient" tp:name-for-bindings="subscribeClient"> + <method name="subscribeBuddy" tp:name-for-bindings="subscribeBuddy"> <tp:docstring> Ask be be notified when 'uri' presence change </tp:docstring> @@ -103,7 +103,7 @@ <!-- SIGNALS !--> - <signal name="newClientSubscription" tp:name-for-bindings="newClientSubscription"> + <signal name="newBuddySubscription" tp:name-for-bindings="newBuddySubscription"> <tp:added version="1.3.0"/> <tp:docstring> Notify when a registered presence uri presence informations changes diff --git a/daemon/src/client/dbus/presencemanager.cpp b/daemon/src/client/dbus/presencemanager.cpp index 750625bb92..de6c17aefb 100644 --- a/daemon/src/client/dbus/presencemanager.cpp +++ b/daemon/src/client/dbus/presencemanager.cpp @@ -59,7 +59,7 @@ PresenceManager::PresenceManager(DBus::Connection& connection) : * Un/subscribe to buddySipUri for an accountID */ void -PresenceManager::subscribeClient(const std::string& accountID, const std::string& uri, const bool& flag) +PresenceManager::subscribeBuddy(const std::string& accountID, const std::string& uri, const bool& flag) { SIPAccount *sipaccount = Manager::instance().getSipAccount(accountID); @@ -76,7 +76,7 @@ PresenceManager::subscribeClient(const std::string& accountID, const std::string * Notify for IP2IP account and publish for PBX account */ void -PresenceManager::sendPresence(const std::string& accountID, const bool& status, const std::string& note) +PresenceManager::publish(const std::string& accountID, const bool& status, const std::string& note) { SIPAccount *sipaccount = Manager::instance().getSipAccount(accountID); if (!sipaccount) @@ -91,7 +91,7 @@ PresenceManager::sendPresence(const std::string& accountID, const bool& status, * Accept or not a PresSubServer request for IP2IP account */ void -PresenceManager::approvePresSubServer(const std::string& uri, const bool& flag) +PresenceManager::answerServerRequest(const std::string& uri, const bool& flag) { SIPAccount *sipaccount = Manager::instance().getIP2IPAccount(); if (!sipaccount) diff --git a/daemon/src/client/presencemanager.h b/daemon/src/client/presencemanager.h index 349b63dde9..30d8890571 100644 --- a/daemon/src/client/presencemanager.h +++ b/daemon/src/client/presencemanager.h @@ -77,14 +77,14 @@ class PresenceManager #endif #ifdef __ANDROID__ - void newClientSubscription(const std::string& uri, const std::string& basic, const std::string& note); + void newBuddySubscription(const std::string& uri, const std::string& basic, const std::string& note); void newServerSubscriptionRequest(const std::string& remote); #endif //__ANDROID__ /* Presence subscription/Notification. */ - void sendPresence(const std::string& accountID, const bool& status, const std::string& note); - void approvePresSubServer(const std::string& uri, const bool& flag); - void subscribeClient(const std::string& accountID, const std::string& uri, const bool& flag); + void publish(const std::string& accountID, const bool& status, const std::string& note); + void answerServerRequest(const std::string& uri, const bool& flag); + void subscribeBuddy(const std::string& accountID, const std::string& uri, const bool& flag); std::vector<std::map<std::string, std::string> > getSubscriptions(const std::string& accountID); void setSubscriptions(const std::string& accountID, const std::vector<std::string>& uris); diff --git a/daemon/src/sip/sippresence.cpp b/daemon/src/sip/sippresence.cpp index c8ae2b07d8..ea259b3d6a 100644 --- a/daemon/src/sip/sippresence.cpp +++ b/daemon/src/sip/sippresence.cpp @@ -141,7 +141,7 @@ void SIPPresence::reportPresSubClientNotification(const std::string& uri, pjsip_ const std::string note(status->info[0].rpid.note.ptr,status->info[0].rpid.note.slen); DEBUG(" Received status of PresSubClient %s: status=%s note=%s",uri.c_str(),(status->info[0].basic_open?"open":"closed"),note.c_str()); /* report status to client signal */ - Manager::instance().getClient()->getPresenceManager()->newClientSubscription(uri, status->info[0].basic_open, note); + Manager::instance().getClient()->getPresenceManager()->newBuddySubscription(uri, status->info[0].basic_open, note); } void SIPPresence::subscribeClient(const std::string& uri, const bool& flag){ -- GitLab