Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::Account Class Referenceabstract

#include <account.h>

Inheritance diagram for jami::Account:
Inheritance graph
Collaboration diagram for jami::Account:
Collaboration graph

Public Member Functions

 Account (const std::string &accountID)
 
void addDefaultModerator (const std::string &peerURI)
 
void attach (const std::shared_ptr< Call > &call)
 
void attach (const std::shared_ptr< Conference > &conf)
 
virtual std::unique_ptr< AccountConfigbuildConfig () const =0
 
virtual bool cancelMessage (uint64_t)
 
const AccountConfigconfig () const
 
virtual void connectivityChanged ()
 Inform the account that the network status has changed.
 
bool detach (const std::shared_ptr< Call > &call)
 
virtual void doRegister ()=0
 Register the account.
 
virtual void doUnregister (bool forceShutdownConnections=false)=0
 Unregister the account.
 
void editConfig (std::function< void(AccountConfig &config)> &&edit)
 
void enableAutoLoadConversations (bool enable)
 
void enableIceCompIdRfc5245Compliance (bool enable)
 
void enableIceForMedia (bool enable)
 
void enableVideo (bool enable)
 
virtual void flush ()
 This method is called to request removal of possible account traces on the system, like internal account setup files.
 
std::map< std::string, std::string > getAccountDetails () const
 
const std::string & getAccountID () const
 Get the account ID.
 
virtual std::string_view getAccountType () const =0
 
std::vector< std::shared_ptr< SystemCodecInfo > > getActiveAccountCodecInfoList (MediaType mediaType) const
 
std::vector< unsignedgetActiveCodecs (MediaType mediaType=MEDIA_ALL) const
 
const std::string & getAlias () const
 
std::shared_ptr< CallgetCall (const std::string &callId) const
 
std::vector< std::string > getCallList () const
 
std::shared_ptr< ConferencegetConference (const std::string &confId) const
 
std::vector< std::string > getConferenceList () const
 
std::set< std::string > getDefaultModerators () const
 
std::string getDisplayName () const
 
virtual std::string getFromUri () const =0
 
const std::string & getHostname () const
 
virtual std::vector< libjami::MessagegetLastMessages (const uint64_t &)
 
std::string getMailBox () const
 
virtual im::MessageStatus getMessageStatus (uint64_t) const
 Return the status corresponding to the token.
 
virtual std::map< std::string, std::string > getNearbyPeers () const
 
const std::filesystem::path & getPath () const
 
std::map< std::string, std::string > getProfileVcard () const
 
RegistrationState getRegistrationState () const
 
bool getRingtoneEnabled () const
 
std::filesystem::path getRingtonePath () const
 
bool getUPnPActive () const
 returns whether or not UPnP is enabled and active ie: if it is able to make port mappings
 
dhtnet::IpAddr getUPnPIpAddress () const
 Get the UPnP IP (external router) address.
 
const std::string & getUserAgentName ()
 Get the user-agent.
 
const std::string & getUsername () const
 
virtual std::map< std::string, std::string > getVolatileAccountDetails () const
 
virtual bool handleMessage (const std::shared_ptr< dht::crypto::Certificate > &, const std::string &, const std::pair< std::string, std::string > &)
 
void hangupCalls ()
 Free all ressources related to this account.
 
bool hasActiveCodec (MediaType mediaType) const
 
bool isActive () const noexcept
 Tell if the account is activated (can currently be used).
 
bool isAllModerators () const
 
bool isAutoAnswerEnabled () const
 
bool isComposingEnabled () const
 
bool isDenySecondCallEnabled () const
 
bool isEmptyOffersEnabled () const
 
bool isEnabled () const
 Tell if the account is enable or not.
 
bool isIceCompIdRfc5245Compliant () const
 
bool isIceForMediaEnabled () const
 
virtual bool isIP2IP () const
 Returns true if this is the IP2IP account.
 
bool isLocalModeratorsEnabled () const
 
bool isReadReceiptEnabled () const
 
bool isRendezVous () const
 
bool isUsable () const
 
bool isVideoEnabled () const
 
virtual void loadConfig ()
 Load the settings in this account.
 
void loadDefaultCodecs ()
 Helper function used to load the default codec order from the codec factory.
 
virtual std::shared_ptr< CallnewOutgoingCall (std::string_view toUrl, const std::vector< libjami::MediaMap > &mediaList)=0
 Create a new outgoing call.
 
bool removeConference (const std::string &confId)
 
void removeDefaultModerator (const std::string &peerURI)
 
virtual void saveConfig () const
 
std::shared_ptr< SystemCodecInfosearchCodecById (unsigned codecId, MediaType mediaType)
 
std::shared_ptr< SystemCodecInfosearchCodecByPayload (unsigned payload, MediaType mediaType)
 
virtual uint64_t sendTextMessage (const std::string &, const std::string &, const std::map< std::string, std::string > &, uint64_t=0, bool=false)
 If supported, send a text message from this account.
 
void setAccountDetails (const std::map< std::string, std::string > &details)
 
void setActive (bool active) noexcept
 
virtual void setActiveCodecs (const std::vector< unsigned > &list)
 Update both the codec order structure and the codec string used for SDP offer and configuration respectively.
 
void setCodecActive (unsigned codecId)
 
void setCodecInactive (unsigned codecId)
 
void setConfig (std::unique_ptr< AccountConfig > &&config)
 
void setEnabled (bool enable)
 
virtual void setIsComposing (const std::string &, bool)
 
virtual bool setMessageDisplayed (const std::string &, const std::string &, int)
 
virtual bool setPushNotificationConfig (const std::map< std::string, std::string > &data)
 
virtual bool setPushNotificationToken (const std::string &pushDeviceToken="")
 
virtual bool setPushNotificationTopic (const std::string &topic="")
 
virtual void setRegistrationState (RegistrationState state, int detail_code=0, const std::string &detail_str={})
 Set the registration state of the specified link.
 
virtual void updateProfile (const std::string &, const std::string &, const std::string &, int32_t)=0
 
virtual ~Account ()
 Virtual destructor.
 

Static Public Member Functions

static std::map< std::string, std::string > getDefaultCodecDetails (const unsigned &codecId)
 
static std::vector< unsignedgetDefaultCodecsId ()
 
static bool meetMinimumRequiredVersion (const std::vector< unsigned > &jamiVersion, const std::vector< unsigned > &minRequiredVersion)
 

Public Attributes

std::mt19937_64 rand
 Random generator engine Logical account state shall never rely on the state of the random generator.
 

Protected Member Functions

std::vector< unsignedgetAccountCodecInfoIdList (MediaType mediaType) const
 
std::shared_ptr< SystemCodecInfosearchCodecByName (const std::string &name, MediaType mediaType)
 private account codec searching functions
 
void setAllCodecsActive (MediaType mediaType, bool active)
 
void sortCodec ()
 
virtual void updateUpnpController ()
 

Static Protected Member Functions

static std::string getDefaultUserAgent ()
 Build the user-agent string.
 
static std::string mapStateNumberToString (RegistrationState state)
 

Protected Attributes

std::vector< std::shared_ptr< SystemCodecInfo > > accountCodecInfoList_
 Vector containing all account codecs (set of system codecs with custom parameters)
 
const std::string accountID_
 Account ID are assign in constructor and shall not changed.
 
bool active_ {true}
 Tells if the account is active now.
 
bool autoLoadConversations_ {true}
 Auto load conversations when creatinf convModule()
 
std::unique_ptr< AccountConfigconfig_ {}
 
std::recursive_mutex configurationMutex_ {}
 
bool iceCompIdRfc5245Compliant_ {false}
 
bool iceForMediaEnabled_ {true}
 
std::filesystem::path idPath_ {}
 path to account
 
RegistrationState registrationState_ {RegistrationState::UNLOADED}
 
std::filesystem::path ringtonePath_
 Ringtone .au file used for this account.
 
std::shared_ptr< SystemCodecContainersystemCodecContainer_
 Vector containing all system codecs (with default parameters)
 
std::mutex upnp_mtx {}
 UPnP IGD controller and the mutex to access it.
 
std::shared_ptr< dhtnet::upnp::Controller > upnpCtrl_
 

Static Protected Attributes

static const std::string DEFAULT_USER_AGENT = Account::getDefaultUserAgent()
 

Friends

class ConfigurationTest
 

Detailed Description

Definition at line 83 of file account.h.

Constructor & Destructor Documentation

◆ Account()

jami::Account::Account ( const std::string &  accountID)

Definition at line 69 of file account.cpp.

References loadDefaultCodecs().

Here is the call graph for this function:

◆ ~Account()

jami::Account::~Account ( )
virtual

Virtual destructor.

Definition at line 79 of file account.cpp.

Member Function Documentation

◆ addDefaultModerator()

void jami::Account::addDefaultModerator ( const std::string &  peerURI)

Definition at line 441 of file account.cpp.

References config_.

◆ attach() [1/2]

void jami::Account::attach ( const std::shared_ptr< Call > &  call)
inline

Definition at line 425 of file account.h.

References jami::CallSet::add().

Here is the call graph for this function:

◆ attach() [2/2]

void jami::Account::attach ( const std::shared_ptr< Conference > &  conf)
inline

Definition at line 427 of file account.h.

References jami::CallSet::add(), and jami::emitSignal().

Here is the call graph for this function:

◆ buildConfig()

virtual std::unique_ptr< AccountConfig > jami::Account::buildConfig ( ) const
pure virtual

Implemented in jami::JamiAccount, and jami::SIPAccount.

Referenced by setAccountDetails().

◆ cancelMessage()

virtual bool jami::Account::cancelMessage ( uint64_t  )
inlinevirtual

Definition at line 231 of file account.h.

◆ config()

◆ connectivityChanged()

virtual void jami::Account::connectivityChanged ( )
inlinevirtual

Inform the account that the network status has changed.

Reimplemented in jami::JamiAccount, jami::SIPAccount, and jami::SIPAccountBase.

Definition at line 354 of file account.h.

◆ detach()

bool jami::Account::detach ( const std::shared_ptr< Call > &  call)
inline

Definition at line 426 of file account.h.

References jami::CallSet::remove().

Here is the call graph for this function:

◆ doRegister()

virtual void jami::Account::doRegister ( )
pure virtual

Register the account.

This should update the getRegistrationState() return value.

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ doUnregister()

virtual void jami::Account::doUnregister ( bool  forceShutdownConnections = false)
pure virtual

Unregister the account.

This should update the getRegistrationState() return value.

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ editConfig()

void jami::Account::editConfig ( std::function< void(AccountConfig &config)> &&  edit)
inline

Definition at line 121 of file account.h.

References config_, configurationMutex_, jami::emitSignal(), and saveConfig().

Referenced by jami::JamiAccount::editConfig(), jami::SIPAccount::editConfig(), and enableVideo().

Here is the call graph for this function:

◆ enableAutoLoadConversations()

void jami::Account::enableAutoLoadConversations ( bool  enable)
inline

Definition at line 413 of file account.h.

References autoLoadConversations_.

◆ enableIceCompIdRfc5245Compliance()

void jami::Account::enableIceCompIdRfc5245Compliance ( bool  enable)
inline

Definition at line 412 of file account.h.

References iceCompIdRfc5245Compliant_.

◆ enableIceForMedia()

void jami::Account::enableIceForMedia ( bool  enable)
inline

Definition at line 387 of file account.h.

References iceForMediaEnabled_.

◆ enableVideo()

void jami::Account::enableVideo ( bool  enable)
inline

Definition at line 282 of file account.h.

References config(), editConfig(), and jami::AccountConfig::videoEnabled.

Here is the call graph for this function:

◆ flush()

virtual void jami::Account::flush ( )
inlinevirtual

This method is called to request removal of possible account traces on the system, like internal account setup files.

Reimplemented in jami::JamiAccount, and jami::SIPAccountBase.

Definition at line 442 of file account.h.

Referenced by jami::SIPAccountBase::flush().

◆ getAccountCodecInfoIdList()

std::vector< unsigned > jami::Account::getAccountCodecInfoIdList ( MediaType  mediaType) const
protected

Definition at line 370 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Here is the call graph for this function:

◆ getAccountDetails()

std::map< std::string, std::string > jami::Account::getAccountDetails ( ) const
inline

Definition at line 140 of file account.h.

References config(), configurationMutex_, and jami::AccountConfig::toMap().

Here is the call graph for this function:

◆ getAccountID()

◆ getAccountType()

virtual std::string_view jami::Account::getAccountType ( ) const
pure virtual

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ getActiveAccountCodecInfoList()

std::vector< std::shared_ptr< SystemCodecInfo > > jami::Account::getActiveAccountCodecInfoList ( MediaType  mediaType) const

Definition at line 414 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Here is the call graph for this function:

◆ getActiveCodecs()

std::vector< unsigned > jami::Account::getActiveCodecs ( MediaType  mediaType = MEDIA_ALL) const

Definition at line 356 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Here is the call graph for this function:

◆ getAlias()

const std::string & jami::Account::getAlias ( ) const
inline

Definition at line 298 of file account.h.

References jami::AccountConfig::alias, and config().

Here is the call graph for this function:

◆ getCall()

std::shared_ptr< Call > jami::Account::getCall ( const std::string &  callId) const
inline

Definition at line 415 of file account.h.

References jami::CallSet::getCall().

Here is the call graph for this function:

◆ getCallList()

std::vector< std::string > jami::Account::getCallList ( ) const
inline

Definition at line 419 of file account.h.

References jami::CallSet::getCallIds().

Here is the call graph for this function:

◆ getConference()

std::shared_ptr< Conference > jami::Account::getConference ( const std::string &  confId) const
inline

Definition at line 420 of file account.h.

References jami::emitSignal(), and jami::CallSet::getConference().

Here is the call graph for this function:

◆ getConferenceList()

std::vector< std::string > jami::Account::getConferenceList ( ) const
inline

Definition at line 424 of file account.h.

References jami::CallSet::getConferenceIds().

Here is the call graph for this function:

◆ getDefaultCodecDetails()

std::map< std::string, std::string > jami::Account::getDefaultCodecDetails ( const unsigned codecId)
static

Definition at line 270 of file account.cpp.

References jami::emitSignal(), jami::getSystemCodecContainer, jami::MEDIA_ALL, jami::MEDIA_AUDIO, and jami::MEDIA_VIDEO.

Referenced by libjami::getCodecDetails().

Here is the call graph for this function:

◆ getDefaultCodecsId()

std::vector< unsigned > jami::Account::getDefaultCodecsId ( )
static

Definition at line 264 of file account.cpp.

References jami::getSystemCodecContainer, and jami::MEDIA_ALL.

Referenced by libjami::getActiveCodecList().

◆ getDefaultModerators()

std::set< std::string > jami::Account::getDefaultModerators ( ) const
inline

Definition at line 377 of file account.h.

References config(), and jami::AccountConfig::defaultModerators.

Here is the call graph for this function:

◆ getDefaultUserAgent()

std::string jami::Account::getDefaultUserAgent ( )
staticprotected

Build the user-agent string.

Definition at line 435 of file account.cpp.

References jami::emitSignal(), jami::platform(), and libjami::version().

Here is the call graph for this function:

◆ getDisplayName()

std::string jami::Account::getDisplayName ( ) const
inline

Definition at line 321 of file account.h.

References config(), and jami::AccountConfig::displayName.

Here is the call graph for this function:

◆ getFromUri()

virtual std::string jami::Account::getFromUri ( ) const
pure virtual

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ getHostname()

const std::string & jami::Account::getHostname ( ) const
inline

Definition at line 297 of file account.h.

References config(), and jami::AccountConfig::hostname.

Here is the call graph for this function:

◆ getLastMessages()

virtual std::vector< libjami::Message > jami::Account::getLastMessages ( const uint64_t )
inlinevirtual

Reimplemented in jami::JamiAccount, and jami::SIPAccountBase.

Definition at line 212 of file account.h.

◆ getMailBox()

std::string jami::Account::getMailBox ( ) const
inline

Definition at line 322 of file account.h.

References config(), and jami::AccountConfig::mailbox.

Here is the call graph for this function:

◆ getMessageStatus()

virtual im::MessageStatus jami::Account::getMessageStatus ( uint64_t  ) const
inlinevirtual

Return the status corresponding to the token.

Reimplemented in jami::SIPAccountBase.

Definition at line 226 of file account.h.

References jami::im::UNKNOWN.

◆ getNearbyPeers()

virtual std::map< std::string, std::string > jami::Account::getNearbyPeers ( ) const
inlinevirtual

Reimplemented in jami::JamiAccount.

Definition at line 217 of file account.h.

◆ getPath()

const std::filesystem::path & jami::Account::getPath ( ) const
inline

Definition at line 158 of file account.h.

References idPath_.

◆ getProfileVcard()

std::map< std::string, std::string > jami::Account::getProfileVcard ( ) const

Definition at line 186 of file account.cpp.

References jami::emitSignal(), idPath_, JAMI_ERROR, jami::fileutils::loadTextFile(), and vCard::utils::toMap().

Referenced by jami::SIPAccount::updateProfile().

Here is the call graph for this function:

◆ getRegistrationState()

RegistrationState jami::Account::getRegistrationState ( ) const
inline

Definition at line 177 of file account.h.

References registrationState_.

◆ getRingtoneEnabled()

bool jami::Account::getRingtoneEnabled ( ) const
inline

Definition at line 320 of file account.h.

References config(), and jami::AccountConfig::ringtoneEnabled.

Here is the call graph for this function:

◆ getRingtonePath()

std::filesystem::path jami::Account::getRingtonePath ( ) const
inline

Definition at line 319 of file account.h.

References ringtonePath_.

◆ getUPnPActive()

bool jami::Account::getUPnPActive ( ) const

returns whether or not UPnP is enabled and active ie: if it is able to make port mappings

returns whether or not UPnP is enabled and active_ ie: if it is able to make port mappings

Definition at line 304 of file account.cpp.

References jami::emitSignal(), upnp_mtx, and upnpCtrl_.

Referenced by jami::SIPAccountBase::getIceOptions(), and jami::SIPAccount::newOutgoingCall().

Here is the call graph for this function:

◆ getUPnPIpAddress()

dhtnet::IpAddr jami::Account::getUPnPIpAddress ( ) const

Get the UPnP IP (external router) address.

If use UPnP is set to false, the address will be empty.

Definition at line 291 of file account.cpp.

References jami::emitSignal(), upnp_mtx, and upnpCtrl_.

Referenced by jami::SIPAccount::newOutgoingCall().

Here is the call graph for this function:

◆ getUserAgentName()

const std::string & jami::Account::getUserAgentName ( )

Get the user-agent.

Definition at line 429 of file account.cpp.

References config_, and DEFAULT_USER_AGENT.

Referenced by jami::SIPPresence::fillDoc().

◆ getUsername()

const std::string & jami::Account::getUsername ( ) const
inline

Definition at line 296 of file account.h.

References config(), and jami::AccountConfig::username.

Here is the call graph for this function:

◆ getVolatileAccountDetails()

std::map< std::string, std::string > jami::Account::getVolatileAccountDetails ( ) const
virtual

◆ handleMessage()

virtual bool jami::Account::handleMessage ( const std::shared_ptr< dht::crypto::Certificate > &  ,
const std::string &  ,
const std::pair< std::string, std::string > &   
)
inlinevirtual

Reimplemented in jami::JamiAccount.

Definition at line 356 of file account.h.

Referenced by jami::SIPAccountBase::onTextMessage().

◆ hangupCalls()

void jami::Account::hangupCalls ( )

Free all ressources related to this account.

Current calls using this account are HANG-UP

Definition at line 82 of file account.cpp.

References getAccountID(), jami::CallSet::getCallIds(), jami::Manager::hangupCall(), and jami::Manager::instance().

Here is the call graph for this function:

◆ hasActiveCodec()

bool jami::Account::hasActiveCodec ( MediaType  mediaType) const

Definition at line 200 of file account.cpp.

References accountCodecInfoList_, and jami::emitSignal().

Here is the call graph for this function:

◆ isActive()

bool jami::Account::isActive ( ) const
inlinenoexcept

Tell if the account is activated (can currently be used).

Definition at line 276 of file account.h.

References active_.

◆ isAllModerators()

bool jami::Account::isAllModerators ( ) const
inline

Definition at line 383 of file account.h.

References jami::AccountConfig::allModeratorsEnabled, and config().

Here is the call graph for this function:

◆ isAutoAnswerEnabled()

bool jami::Account::isAutoAnswerEnabled ( ) const
inline

Definition at line 325 of file account.h.

References jami::AccountConfig::autoAnswerEnabled, and config().

Here is the call graph for this function:

◆ isComposingEnabled()

bool jami::Account::isComposingEnabled ( ) const
inline

Definition at line 331 of file account.h.

References config(), and jami::AccountConfig::sendComposing.

Here is the call graph for this function:

◆ isDenySecondCallEnabled()

bool jami::Account::isDenySecondCallEnabled ( ) const
inline

Definition at line 326 of file account.h.

References config(), and jami::AccountConfig::denySecondCallEnabled.

Here is the call graph for this function:

◆ isEmptyOffersEnabled()

bool jami::Account::isEmptyOffersEnabled ( ) const
inline

Definition at line 390 of file account.h.

Referenced by jami::SIPAccount::newOutgoingCall().

◆ isEnabled()

bool jami::Account::isEnabled ( ) const
inline

Tell if the account is enable or not.

Returns
true if enabled, false otherwise

Definition at line 261 of file account.h.

References config(), and jami::AccountConfig::enabled.

Here is the call graph for this function:

◆ isIceCompIdRfc5245Compliant()

bool jami::Account::isIceCompIdRfc5245Compliant ( ) const
inline

Definition at line 411 of file account.h.

References iceCompIdRfc5245Compliant_.

◆ isIceForMediaEnabled()

bool jami::Account::isIceForMediaEnabled ( ) const
inline

Definition at line 386 of file account.h.

References iceForMediaEnabled_.

◆ isIP2IP()

virtual bool jami::Account::isIP2IP ( ) const
inlinevirtual

Returns true if this is the IP2IP account.

Reimplemented in jami::SIPAccount.

Definition at line 163 of file account.h.

Referenced by jami::SIPAccountBase::getVolatileAccountDetails().

◆ isLocalModeratorsEnabled()

bool jami::Account::isLocalModeratorsEnabled ( ) const
inline

Definition at line 382 of file account.h.

References config(), and jami::AccountConfig::localModeratorsEnabled.

Here is the call graph for this function:

◆ isReadReceiptEnabled()

bool jami::Account::isReadReceiptEnabled ( ) const
inline

Definition at line 330 of file account.h.

References config(), and jami::AccountConfig::sendReadReceipt.

Here is the call graph for this function:

◆ isRendezVous()

bool jami::Account::isRendezVous ( ) const
inline

Definition at line 324 of file account.h.

References config(), and jami::AccountConfig::isRendezVous.

Here is the call graph for this function:

◆ isUsable()

bool jami::Account::isUsable ( ) const
inline

Definition at line 280 of file account.h.

References active_, config(), jami::emitSignal(), and jami::AccountConfig::enabled.

Referenced by updateUpnpController().

Here is the call graph for this function:

◆ isVideoEnabled()

bool jami::Account::isVideoEnabled ( ) const
inline

Definition at line 286 of file account.h.

References config(), and jami::AccountConfig::videoEnabled.

Referenced by jami::SIPAccountBase::createDefaultMediaList(), jami::JamiAccount::newOutgoingCall(), and jami::SIPAccount::newOutgoingCall().

Here is the call graph for this function:

◆ loadConfig()

void jami::Account::loadConfig ( )
virtual

◆ loadDefaultCodecs()

void jami::Account::loadDefaultCodecs ( )

Helper function used to load the default codec order from the codec factory.

Definition at line 131 of file account.cpp.

References accountCodecInfoList_, jami::CODEC_ENCODER_DECODER, jami::emitSignal(), jami::MEDIA_AUDIO, jami::MEDIA_VIDEO, and systemCodecContainer_.

Referenced by Account().

Here is the call graph for this function:

◆ mapStateNumberToString()

◆ meetMinimumRequiredVersion()

bool jami::Account::meetMinimumRequiredVersion ( const std::vector< unsigned > &  jamiVersion,
const std::vector< unsigned > &  minRequiredVersion 
)
static

Definition at line 453 of file account.cpp.

References jami::emitSignal(), and jami::swarm_protocol::version.

Here is the call graph for this function:

◆ newOutgoingCall()

virtual std::shared_ptr< Call > jami::Account::newOutgoingCall ( std::string_view  toUrl,
const std::vector< libjami::MediaMap > &  mediaList 
)
pure virtual

Create a new outgoing call.

Parameters
toUrlThe address to call
mediaListA list of media
Returns
The created call

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ removeConference()

bool jami::Account::removeConference ( const std::string &  confId)
inline

Definition at line 428 of file account.h.

References jami::emitSignal(), getAccountID(), and jami::CallSet::removeConference().

Here is the call graph for this function:

◆ removeDefaultModerator()

void jami::Account::removeDefaultModerator ( const std::string &  peerURI)

Definition at line 447 of file account.cpp.

References config_.

◆ saveConfig()

void jami::Account::saveConfig ( ) const
virtual

Reimplemented in jami::JamiAccount.

Definition at line 173 of file account.cpp.

References jami::Manager::instance(), and jami::Manager::saveConfig().

Referenced by editConfig(), setAccountDetails(), setPushNotificationConfig(), setPushNotificationToken(), and setPushNotificationTopic().

Here is the call graph for this function:

◆ searchCodecById()

std::shared_ptr< SystemCodecInfo > jami::Account::searchCodecById ( unsigned  codecId,
MediaType  mediaType 
)

Definition at line 317 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Referenced by setActiveCodecs().

Here is the call graph for this function:

◆ searchCodecByName()

std::shared_ptr< SystemCodecInfo > jami::Account::searchCodecByName ( const std::string &  name,
MediaType  mediaType 
)
protected

private account codec searching functions

Definition at line 330 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Here is the call graph for this function:

◆ searchCodecByPayload()

std::shared_ptr< SystemCodecInfo > jami::Account::searchCodecByPayload ( unsigned  payload,
MediaType  mediaType 
)

Definition at line 343 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Here is the call graph for this function:

◆ sendTextMessage()

virtual uint64_t jami::Account::sendTextMessage ( const std::string &  ,
const std::string &  ,
const std::map< std::string, std::string > &  ,
uint64_t  = 0,
bool  = false 
)
inlinevirtual

If supported, send a text message from this account.

Returns
a token to query the message status

Reimplemented in jami::JamiAccount, and jami::SIPAccountBase.

Definition at line 194 of file account.h.

◆ setAccountDetails()

void jami::Account::setAccountDetails ( const std::map< std::string, std::string > &  details)
inline

Definition at line 130 of file account.h.

References buildConfig(), config_, configurationMutex_, jami::emitSignal(), loadConfig(), and saveConfig().

Here is the call graph for this function:

◆ setActive()

void jami::Account::setActive ( bool  active)
inlinenoexcept

Definition at line 278 of file account.h.

References active_.

◆ setActiveCodecs()

void jami::Account::setActiveCodecs ( const std::vector< unsigned > &  list)
virtual

Update both the codec order structure and the codec string used for SDP offer and configuration respectively.

Reimplemented in jami::JamiAccount, and jami::SIPAccount.

Definition at line 209 of file account.cpp.

References jami::emitSignal(), jami::MEDIA_ALL, searchCodecById(), setAllCodecsActive(), and sortCodec().

Referenced by loadConfig().

Here is the call graph for this function:

◆ setAllCodecsActive()

void jami::Account::setAllCodecsActive ( MediaType  mediaType,
bool  active 
)
protected

Definition at line 385 of file account.cpp.

References accountCodecInfoList_, jami::emitSignal(), and jami::MEDIA_NONE.

Referenced by setActiveCodecs().

Here is the call graph for this function:

◆ setCodecActive()

void jami::Account::setCodecActive ( unsigned  codecId)

Definition at line 396 of file account.cpp.

References accountCodecInfoList_, and jami::emitSignal().

Here is the call graph for this function:

◆ setCodecInactive()

void jami::Account::setCodecInactive ( unsigned  codecId)

Definition at line 405 of file account.cpp.

References accountCodecInfoList_, and jami::emitSignal().

Here is the call graph for this function:

◆ setConfig()

void jami::Account::setConfig ( std::unique_ptr< AccountConfig > &&  config)
inline

Definition at line 101 of file account.h.

References config(), config_, configurationMutex_, and loadConfig().

Here is the call graph for this function:

◆ setEnabled()

void jami::Account::setEnabled ( bool  enable)
inline

Definition at line 263 of file account.h.

References config_, and updateUpnpController().

Here is the call graph for this function:

◆ setIsComposing()

virtual void jami::Account::setIsComposing ( const std::string &  ,
bool   
)
inlinevirtual

Reimplemented in jami::JamiAccount.

Definition at line 203 of file account.h.

◆ setMessageDisplayed()

virtual bool jami::Account::setMessageDisplayed ( const std::string &  ,
const std::string &  ,
int   
)
inlinevirtual

Reimplemented in jami::JamiAccount.

Definition at line 205 of file account.h.

◆ setPushNotificationConfig()

bool jami::Account::setPushNotificationConfig ( const std::map< std::string, std::string > &  data)
virtual

Reimplemented in jami::JamiAccount, and jami::SIPAccount.

Definition at line 466 of file account.cpp.

References config_, configurationMutex_, jami::emitSignal(), jami::platform(), and saveConfig().

Here is the call graph for this function:

◆ setPushNotificationToken()

virtual bool jami::Account::setPushNotificationToken ( const std::string &  pushDeviceToken = "")
inlinevirtual

Reimplemented in jami::JamiAccount, and jami::SIPAccount.

Definition at line 233 of file account.h.

References config_, configurationMutex_, jami::emitSignal(), and saveConfig().

Here is the call graph for this function:

◆ setPushNotificationTopic()

virtual bool jami::Account::setPushNotificationTopic ( const std::string &  topic = "")
inlinevirtual

Reimplemented in jami::JamiAccount.

Definition at line 244 of file account.h.

References config_, configurationMutex_, jami::emitSignal(), and saveConfig().

Here is the call graph for this function:

◆ setRegistrationState()

void jami::Account::setRegistrationState ( RegistrationState  state,
int  detail_code = 0,
const std::string &  detail_str = {} 
)
virtual

Set the registration state of the specified link.

Parameters
stateThe registration state of underlying VoIPLink

Reimplemented in jami::SIPAccount, jami::SIPAccountBase, and jami::JamiAccount.

Definition at line 108 of file account.cpp.

References accountID_, jami::emitSignal(), getVolatileAccountDetails(), mapStateNumberToString(), registrationState_, and jami::runOnMainThread().

Referenced by jami::SIPAccountBase::setRegistrationState().

Here is the call graph for this function:

◆ sortCodec()

void jami::Account::sortCodec ( )
protected

Definition at line 229 of file account.cpp.

References accountCodecInfoList_, and jami::emitSignal().

Referenced by setActiveCodecs().

Here is the call graph for this function:

◆ updateProfile()

virtual void jami::Account::updateProfile ( const std::string &  ,
const std::string &  ,
const std::string &  ,
int32_t   
)
pure virtual

Implemented in jami::JamiAccount, and jami::SIPAccount.

◆ updateUpnpController()

void jami::Account::updateUpnpController ( )
protectedvirtual

Definition at line 89 of file account.cpp.

References config(), jami::Manager::instance(), isUsable(), upnp_mtx, and upnpCtrl_.

Referenced by loadConfig(), and setEnabled().

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ConfigurationTest

friend class ConfigurationTest
friend

Definition at line 457 of file account.h.

Member Data Documentation

◆ accountCodecInfoList_

std::vector<std::shared_ptr<SystemCodecInfo> > jami::Account::accountCodecInfoList_
protected

◆ accountID_

const std::string jami::Account::accountID_
protected

Account ID are assign in constructor and shall not changed.

Definition at line 471 of file account.h.

Referenced by getAccountID(), jami::SIPAccountBase::onTextMessage(), and setRegistrationState().

◆ active_

bool jami::Account::active_ {true}
protected

Tells if the account is active now.

This allows doRegister to be called. When an account is unactivated, doUnregister must be called.

Definition at line 480 of file account.h.

Referenced by getVolatileAccountDetails(), isActive(), isUsable(), and setActive().

◆ autoLoadConversations_

bool jami::Account::autoLoadConversations_ {true}
protected

Auto load conversations when creatinf convModule()

Definition at line 518 of file account.h.

Referenced by enableAutoLoadConversations().

◆ config_

◆ configurationMutex_

std::recursive_mutex jami::Account::configurationMutex_ {}
mutableprotected

◆ DEFAULT_USER_AGENT

const std::string jami::Account::DEFAULT_USER_AGENT = Account::getDefaultUserAgent()
staticprotected

Definition at line 459 of file account.h.

Referenced by getUserAgentName().

◆ iceCompIdRfc5245Compliant_

bool jami::Account::iceCompIdRfc5245Compliant_ {false}
protected

Definition at line 514 of file account.h.

Referenced by enableIceCompIdRfc5245Compliance(), and isIceCompIdRfc5245Compliant().

◆ iceForMediaEnabled_

bool jami::Account::iceForMediaEnabled_ {true}
protected

Definition at line 513 of file account.h.

Referenced by enableIceForMedia(), and isIceForMediaEnabled().

◆ idPath_

std::filesystem::path jami::Account::idPath_ {}
protected

◆ rand

std::mt19937_64 jami::Account::rand
mutable

Random generator engine Logical account state shall never rely on the state of the random generator.

Definition at line 349 of file account.h.

Referenced by jami::SIPAccountBase::acquireRandomEvenPort(), jami::SIPAccountBase::getRandomEvenPort(), jami::im::MessageEngine::sendMessage(), and jami::SIPAccountBase::sendTextMessage().

◆ registrationState_

◆ ringtonePath_

std::filesystem::path jami::Account::ringtonePath_
protected

Ringtone .au file used for this account.

Definition at line 505 of file account.h.

Referenced by getRingtonePath(), and loadConfig().

◆ systemCodecContainer_

std::shared_ptr<SystemCodecContainer> jami::Account::systemCodecContainer_
protected

Vector containing all system codecs (with default parameters)

Definition at line 491 of file account.h.

Referenced by loadDefaultCodecs().

◆ upnp_mtx

std::mutex jami::Account::upnp_mtx {}
mutableprotected

UPnP IGD controller and the mutex to access it.

Definition at line 510 of file account.h.

Referenced by getUPnPActive(), getUPnPIpAddress(), and updateUpnpController().

◆ upnpCtrl_

std::shared_ptr<dhtnet::upnp::Controller> jami::Account::upnpCtrl_
protected

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