|
Ring Daemon
|
#include <sippresence.h>

Public Member Functions | |
| void | addPresSubClient (PresSubClient *b) |
| Add a buddy in the buddy list. | |
| void | addPresSubServer (PresSubServer *s) |
| IP2IP context. | |
| void | approvePresSubServer (const std::string &uri, bool flag) |
| IP2IP context. | |
| void | enable (bool enabled) |
| Activate the module. | |
| void | fillDoc (pjsip_tx_data *tdata, const pres_msg_data *msg_data) |
| Fill xml document, the header and the body. | |
| SIPAccount * | getAccount () const |
| Return associated sipaccount. | |
| const std::list< PresSubClient * > & | getClientSubscriptions () const |
| int | getModId () const |
| Return presence module ID which is actually the same as the VOIP link. | |
| std::string | getNote () |
| pj_pool_t * | getPool () const |
| Return a pool for generic functions. | |
| pjsip_pres_status * | getStatus () |
| Return presence data. | |
| bool | isEnabled () |
| bool | isOnline () |
| bool | isSupported (int function) |
| void | lock () |
| void | notifyPresSubServer () |
| IP2IP context. | |
| void | removePresSubClient (PresSubClient *b) |
| Remove a buddy from the list. | |
| void | removePresSubServer (PresSubServer *s) |
| IP2IP context. | |
| void | reportPresSubClientNotification (std::string_view uri, pjsip_pres_status *status) |
| Send a signal to the client on DBus. | |
| void | sendPresence (bool status, const std::string ¬e) |
| Send the presence data in a PUBLISH to the PBX or in a NOTIFY to a remote subscriber (IP2IP) | |
| SIPPresence (SIPAccount *acc) | |
| Constructor. | |
| void | subscribeClient (const std::string &uri, bool flag) |
| Send a SUBSCRIBE request to PBX/IP2IP. | |
| void | support (int function, bool enabled) |
| Support the presence function publish/subscribe. | |
| bool | tryLock () |
| void | unlock () |
| void | updateStatus (bool status, const std::string ¬e) |
| Modify the presence data. | |
| ~SIPPresence () | |
| Destructor. | |
Definition at line 87 of file sippresence.h.
| jami::SIPPresence::SIPPresence | ( | SIPAccount * | acc | ) |
Constructor.
| acc | the associated sipaccount |
Definition at line 40 of file sippresence.cpp.
References jami::emitSignal(), and updateStatus().

| jami::SIPPresence::~SIPPresence | ( | ) |
Destructor.
Definition at line 64 of file sippresence.cpp.
References jami::emitSignal().

| void jami::SIPPresence::addPresSubClient | ( | PresSubClient * | b | ) |
Add a buddy in the buddy list.
| b | PresSubClient pointer |
Definition at line 238 of file sippresence.cpp.
References JAMI_DBG, JAMI_WARN, and MAX_N_SUB_CLIENT.
Referenced by jami::PresSubClient::enable().
| void jami::SIPPresence::addPresSubServer | ( | PresSubServer * | s | ) |
IP2IP context.
Add a server associated to a subscriber in the list.
| s | PresenceSubcription pointer. |
Definition at line 268 of file sippresence.cpp.
References JAMI_WARN, and MAX_N_SUB_SERVER.
IP2IP context.
Process new subscription based on client decision.
| flag | client decision. |
| uri | uri of the remote subscriber |
Definition at line 257 of file sippresence.cpp.
References jami::emitSignal().

| void jami::SIPPresence::fillDoc | ( | pjsip_tx_data * | tdata, |
| const pres_msg_data * | msg_data | ||
| ) |
Fill xml document, the header and the body.
Definition at line 313 of file sippresence.cpp.
References jami::emitSignal(), jami::Account::getUserAgentName(), and JAMI_DBG.
Referenced by jami::PresSubServer::notify(), and jami::PresSubClient::unsubscribe().

| SIPAccount * jami::SIPPresence::getAccount | ( | ) | const |
Return associated sipaccount.
Definition at line 79 of file sippresence.cpp.
Referenced by jami::PresSubClient::PresSubClient(), and jami::PresSubClient::subscribe().
|
inline |
Definition at line 191 of file sippresence.h.
| int jami::SIPPresence::getModId | ( | ) | const |
Return presence module ID which is actually the same as the VOIP link.
Definition at line 91 of file sippresence.cpp.
References jami::SIPVoIPLink::getModId(), jami::Manager::instance(), and jami::Manager::sipVoIPLink().

|
inline |
Definition at line 195 of file sippresence.h.
| pj_pool_t * jami::SIPPresence::getPool | ( | ) | const |
Return a pool for generic functions.
Definition at line 97 of file sippresence.cpp.
Referenced by jami::PresSubClient::subscribe().
| pjsip_pres_status * jami::SIPPresence::getStatus | ( | ) |
Return presence data.
Definition at line 85 of file sippresence.cpp.
Referenced by jami::PresSubServer::approve(), and jami::PresSubServer::notify().
|
inline |
Definition at line 187 of file sippresence.h.
|
inline |
Definition at line 193 of file sippresence.h.
Definition at line 118 of file sippresence.cpp.
References jami::emitSignal(), PRESENCE_FUNCTION_PUBLISH, and PRESENCE_FUNCTION_SUBSCRIBE.

| void jami::SIPPresence::lock | ( | ) |
Definition at line 295 of file sippresence.cpp.
| void jami::SIPPresence::notifyPresSubServer | ( | ) |
IP2IP context.
Iterate through the subscriber list and send NOTIFY to each.
Definition at line 286 of file sippresence.cpp.
References JAMI_DBG.
Referenced by sendPresence().
| void jami::SIPPresence::removePresSubClient | ( | PresSubClient * | b | ) |
Remove a buddy from the list.
| b | PresSubClient pointer |
Definition at line 250 of file sippresence.cpp.
References JAMI_DBG.
| void jami::SIPPresence::removePresSubServer | ( | PresSubServer * | s | ) |
IP2IP context.
Remove a server associated to a subscriber from the list.
| s | PresenceSubcription pointer. |
Definition at line 279 of file sippresence.cpp.
References JAMI_DBG.
| void jami::SIPPresence::reportPresSubClientNotification | ( | std::string_view | uri, |
| pjsip_pres_status * | status | ||
| ) |
Send a signal to the client on DBus.
The signal contain the status of a remote user.
Definition at line 173 of file sippresence.cpp.
References jami::emitSignal(), jami::Account::getAccountID(), jami::SIPAccount::getFromUri(), and JAMI_DBG.

Send the presence data in a PUBLISH to the PBX or in a NOTIFY to a remote subscriber (IP2IP)
Definition at line 159 of file sippresence.cpp.
References jami::emitSignal(), jami::SIPAccount::isIP2IP(), notifyPresSubServer(), and updateStatus().

Send a SUBSCRIBE request to PBX/IP2IP.
| buddyUri | Remote user that we want to subscribe |
Definition at line 198 of file sippresence.cpp.
References jami::emitSignal(), JAMI_WARN, MAX_N_SUB_CLIENT, and jami::PresSubClient::subscribe().

Support the presence function publish/subscribe.
| function | Publish or subscribe to enable |
| enable | Flag |
Definition at line 109 of file sippresence.cpp.
References jami::emitSignal(), PRESENCE_FUNCTION_PUBLISH, and PRESENCE_FUNCTION_SUBSCRIBE.

| bool jami::SIPPresence::tryLock | ( | ) |
Definition at line 301 of file sippresence.cpp.
Referenced by jami::PresSubClient::lock().
| void jami::SIPPresence::unlock | ( | ) |
Definition at line 307 of file sippresence.cpp.
Referenced by jami::PresSubClient::lock(), and jami::PresSubClient::unlock().
Modify the presence data.
| status | is basically "open" or "close" |
Definition at line 129 of file sippresence.cpp.
References jami::emitSignal().
Referenced by sendPresence(), and SIPPresence().
