Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
c2f1bed0
Commit
c2f1bed0
authored
Sep 10, 2013
by
Emmanuel Lepage Vallee
Browse files
* #29736: presence: Peer review changes
parent
8c6633be
Changes
4
Hide whitespace changes
Inline
Side-by-side
daemon/src/client/dbus/presencemanager-introspec.xml
View file @
c2f1bed0
...
...
@@ -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=
"a
pprovePresSubServer
"
tp:name-for-bindings=
"a
pprovePresSubServer
"
>
<method
name=
"a
nswerServerRequest
"
tp:name-for-bindings=
"a
nswerServerRequest
"
>
<tp:docstring>
Answer a presence request from the server
</tp:docstring>
...
...
@@ -38,7 +38,7 @@
</arg>
</method>
<method
name=
"subscribe
Client
"
tp:name-for-bindings=
"subscribe
Client
"
>
<method
name=
"subscribe
Buddy
"
tp:name-for-bindings=
"subscribe
Buddy
"
>
<tp:docstring>
Ask be be notified when 'uri' presence change
</tp:docstring>
...
...
@@ -103,7 +103,7 @@
<!-- SIGNALS !-->
<signal
name=
"new
Client
Subscription"
tp:name-for-bindings=
"new
Client
Subscription"
>
<signal
name=
"new
Buddy
Subscription"
tp:name-for-bindings=
"new
Buddy
Subscription"
>
<tp:added
version=
"1.3.0"
/>
<tp:docstring>
Notify when a registered presence uri presence informations changes
...
...
daemon/src/client/dbus/presencemanager.cpp
View file @
c2f1bed0
...
...
@@ -59,7 +59,7 @@ PresenceManager::PresenceManager(DBus::Connection& connection) :
* Un/subscribe to buddySipUri for an accountID
*/
void
PresenceManager
::
subscribe
Client
(
const
std
::
string
&
accountID
,
const
std
::
string
&
uri
,
const
bool
&
flag
)
PresenceManager
::
subscribe
Buddy
(
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
::
a
pprovePresSubServer
(
const
std
::
string
&
uri
,
const
bool
&
flag
)
PresenceManager
::
a
nswerServerRequest
(
const
std
::
string
&
uri
,
const
bool
&
flag
)
{
SIPAccount
*
sipaccount
=
Manager
::
instance
().
getIP2IPAccount
();
if
(
!
sipaccount
)
...
...
daemon/src/client/presencemanager.h
View file @
c2f1bed0
...
...
@@ -77,14 +77,14 @@ class PresenceManager
#endif
#ifdef __ANDROID__
void
new
Client
Subscription
(
const
std
::
string
&
uri
,
const
std
::
string
&
basic
,
const
std
::
string
&
note
);
void
new
Buddy
Subscription
(
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
a
pprovePresSubServer
(
const
std
::
string
&
uri
,
const
bool
&
flag
);
void
subscribe
Client
(
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
a
nswerServerRequest
(
const
std
::
string
&
uri
,
const
bool
&
flag
);
void
subscribe
Buddy
(
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
);
...
...
daemon/src/sip/sippresence.cpp
View file @
c2f1bed0
...
...
@@ -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
()
->
new
Client
Subscription
(
uri
,
status
->
info
[
0
].
basic_open
,
note
);
Manager
::
instance
().
getClient
()
->
getPresenceManager
()
->
new
Buddy
Subscription
(
uri
,
status
->
info
[
0
].
basic_open
,
note
);
}
void
SIPPresence
::
subscribeClient
(
const
std
::
string
&
uri
,
const
bool
&
flag
){
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment