* #29736: presence: Peer review changes

parent 8c6633be
......@@ -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
......
......@@ -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)
......
......@@ -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);
......
......@@ -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){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment