Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::PresSubClient Class Reference

#include <pres_sub_client.h>

Collaboration diagram for jami::PresSubClient:
Collaboration graph

Public Member Functions

void decLock ()
 
void enable (bool flag)
 Enable the monitoring and report signal to the client.
 
std::string_view getLineStatus ()
 A message from the URIs.
 
SIPPresencegetPresence ()
 Get associated parent presence_module.
 
std::string_view getURI ()
 Return the pres_client URI.
 
void incLock ()
 TODO: explain this:
 
bool isPresent ()
 Is the buddy present.
 
bool isSubscribed ()
 Return the monitor variable.
 
bool lock ()
 Data lock function.
 
bool match (PresSubClient *b)
 Compare with another pres_client's uris.
 
 PresSubClient (const std::string &uri, SIPPresence *pres)
 Constructor.
 
bool subscribe ()
 Send a SUBCRIBE to the PXB or directly to a pres_client in the IP2IP context.
 
void unlock ()
 Data unlock function.
 
bool unsubscribe ()
 Send a SUBCRIBE to the PXB or directly to a pres_client in the IP2IP context but the 0s timeout make the dialog expire immediately.
 
 ~PresSubClient ()
 Destructor.
 

Detailed Description

Definition at line 39 of file pres_sub_client.h.

Constructor & Destructor Documentation

◆ PresSubClient()

jami::PresSubClient::PresSubClient ( const std::string &  uri,
SIPPresence pres 
)

Constructor.

Parameters
uriSIP uri of remote user that we want to subscribe,

Definition at line 325 of file pres_sub_client.cpp.

References jami::emitSignal(), jami::SIPPresence::getAccount(), and jami::SIPAccount::getFromUri().

Here is the call graph for this function:

◆ ~PresSubClient()

jami::PresSubClient::~PresSubClient ( )

Destructor.

Process the the unsubscription before the destruction.

Definition at line 350 of file pres_sub_client.cpp.

References jami::emitSignal(), JAMI_DBG, and unsubscribe().

Here is the call graph for this function:

Member Function Documentation

◆ decLock()

void jami::PresSubClient::decLock ( )
inline

Definition at line 108 of file pres_sub_client.h.

◆ enable()

void jami::PresSubClient::enable ( bool  flag)

Enable the monitoring and report signal to the client.

The PBX server must approve and maintain the subrciption before the pres_client is added in the pres_client list.

Parameters
flagState of subscription. True if active.

Definition at line 427 of file pres_sub_client.cpp.

References jami::SIPPresence::addPresSubClient(), jami::emitSignal(), getURI(), and JAMI_DBG.

Here is the call graph for this function:

◆ getLineStatus()

std::string_view jami::PresSubClient::getLineStatus ( )

A message from the URIs.

Definition at line 383 of file pres_sub_client.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ getPresence()

SIPPresence * jami::PresSubClient::getPresence ( )

Get associated parent presence_module.

Definition at line 371 of file pres_sub_client.cpp.

◆ getURI()

std::string_view jami::PresSubClient::getURI ( )

Return the pres_client URI.

Definition at line 365 of file pres_sub_client.cpp.

References jami::emitSignal().

Referenced by enable(), and match().

Here is the call graph for this function:

◆ incLock()

void jami::PresSubClient::incLock ( )
inline

TODO: explain this:

Definition at line 107 of file pres_sub_client.h.

◆ isPresent()

bool jami::PresSubClient::isPresent ( )

Is the buddy present.

Definition at line 377 of file pres_sub_client.cpp.

◆ isSubscribed()

bool jami::PresSubClient::isSubscribed ( )

Return the monitor variable.

Definition at line 359 of file pres_sub_client.cpp.

◆ lock()

bool jami::PresSubClient::lock ( )

Data lock function.

Definition at line 443 of file pres_sub_client.cpp.

References jami::emitSignal(), JAMI_DBG, PRESENCE_CLIENT_LOCK_FLAG, PRESENCE_LOCK_FLAG, jami::SIPPresence::tryLock(), and jami::SIPPresence::unlock().

Referenced by unsubscribe().

Here is the call graph for this function:

◆ match()

bool jami::PresSubClient::match ( PresSubClient b)

Compare with another pres_client's uris.

Parameters
bOther pres_client pointer

Definition at line 647 of file pres_sub_client.cpp.

References jami::emitSignal(), and getURI().

Here is the call graph for this function:

◆ subscribe()

◆ unlock()

void jami::PresSubClient::unlock ( )

Data unlock function.

Definition at line 480 of file pres_sub_client.cpp.

References jami::emitSignal(), PRESENCE_CLIENT_LOCK_FLAG, PRESENCE_LOCK_FLAG, and jami::SIPPresence::unlock().

Referenced by unsubscribe().

Here is the call graph for this function:

◆ unsubscribe()

bool jami::PresSubClient::unsubscribe ( )

Send a SUBCRIBE to the PXB or directly to a pres_client in the IP2IP context but the 0s timeout make the dialog expire immediately.

Definition at line 490 of file pres_sub_client.cpp.

References jami::emitSignal(), jami::SIPPresence::fillDoc(), JAMI_WARN, lock(), and unlock().

Referenced by ~PresSubClient().

Here is the call graph for this function:

The documentation for this class was generated from the following files: