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

Manager (controller) of daemon. More...

#include <manager.h>

Collaboration diagram for jami::Manager:
Collaboration graph

Classes

struct  ManagerPimpl
 

Public Member Functions

template<class T = Account>
std::size_t accountCount () const
 
std::string addAccount (const std::map< std::string, std::string > &details, const std::string &accountId={})
 Add a new account, and give it a new account ID automatically.
 
void addAudio (Call &call)
 
bool addMainParticipant (const std::string &accountId, const std::string &confId)
 Bind the main participant to a conference (mainly called on a double click action)
 
bool addSubCall (Call &call, Conference &conference)
 
bool addSubCall (const std::string &accountId, const std::string &callId, const std::string &account2Id, const std::string &confId)
 Add a subcall to a conference.
 
bool answerCall (Call &call, const std::vector< libjami::MediaMap > &mediaList={})
 
bool answerCall (const std::string &accountId, const std::string &callId, const std::vector< libjami::MediaMap > &mediaList={})
 Functions which occur with a user's action Answer the call.
 
AudioFormat audioFormatUsed (AudioFormat format)
 Should be called by any component dealing with an external audio source, indicating the format used so the mixer format can be eventually adapted.
 
void bindCallToConference (Call &call, Conference &conf)
 
void callBusy (Call &call)
 Handle played sound when a call is unable to be completed because of a busy recipient.
 
void callFailure (Call &call)
 Handle played sound when a failure occurs.
 
dhtnet::tls::CertificateStore & certStore (const std::string &accountId) const
 
void congestion ()
 Handle played music when a congestion occurs.
 
void createConfFromParticipantList (const std::string &accountId, const std::vector< std::string > &)
 Create a conference from a list of participant.
 
bool detachHost (const std::shared_ptr< Conference > &conf={})
 Detach the local participant from curent conference.
 
bool detachParticipant (const std::string &callId)
 Detach a participant from a conference, put the call on hold, do not hangup it.
 
void enableLocalModerators (const std::string &accountID, bool state)
 
void eraseGitTransport (git_smart_subtransport *tr)
 
template<class T >
std::shared_ptr< TfindAccount (const std::function< bool(const std::shared_ptr< T > &)> &pred)
 
void finish () noexcept
 
template<class T = Account>
std::shared_ptr< TgetAccount (std::string_view accountId) const
 Get an account pointer, looks for account of type T.
 
std::map< std::string, std::string > getAccountDetails (const std::string &accountID) const
 Retrieve details about a given account.
 
std::vector< std::string > getAccountList () const
 Get account list.
 
template<class T = Account>
std::vector< std::shared_ptr< T > > getAllAccounts () const
 Get a list of account pointers of type T (baseclass Account)
 
std::shared_ptr< AudioLayergetAudioDriver ()
 Accessor to audiodriver.
 
int getAudioInputDeviceIndex (const std::string &name)
 Get index of an audio device.
 
std::vector< std::string > getAudioInputDeviceList ()
 Get list of supported audio input device.
 
std::string getAudioManager () const
 Get the audio manager.
 
int getAudioOutputDeviceIndex (const std::string &name)
 
std::vector< std::string > getAudioOutputDeviceList ()
 Get list of supported audio output device.
 
std::shared_ptr< CallgetCallFromCallID (const std::string &callID) const
 Get the Call referred by callID.
 
std::vector< std::string > getCallList () const
 Get list of calls (internal subcalls are filter-out)
 
std::vector< std::map< std::string, std::string > > getChannelList (const std::string &accountId, const std::string &connectionId)
 
std::vector< std::map< std::string, std::string > > getConnectionList (const std::string &accountId, const std::string &conversationId)
 
std::vector< std::string > getCurrentAudioDevicesIndex ()
 Get string array representing integer indexes of output, input, and ringtone device.
 
std::string getCurrentAudioOutputPlugin () const
 Get current alsa plugin.
 
std::shared_ptr< CallgetCurrentCall () const
 Get the current call.
 
const std::string & getCurrentCallId () const
 Get the current call id.
 
std::vector< std::string > getDefaultModerators (const std::string &accountID)
 
int getHistoryLimit () const
 Get the maximum number of days to keep in the history.
 
const std::shared_ptr< dhtnet::IceTransportFactory > & getIceTransportFactory ()
 
bool getIsAlwaysRecording () const
 Get is always recording functionality.
 
std::vector< libjami::MessagegetLastMessages (const std::string &accountID, const uint64_t &base_timestamp)
 
int getMessageStatus (const std::string &accountID, uint64_t id) const
 
int getMessageStatus (uint64_t id) const
 
std::map< std::string, std::string > getNearbyPeers (const std::string &accountID)
 
std::string getNewAccountId ()
 Return a new random accountid that is not present in the list.
 
std::string getNoiseSuppressState () const
 Get the noise reduction engine state from the current audio layer.
 
RingBufferPoolgetRingBufferPool ()
 Return a pointer to the instance of the RingBufferPool.
 
int getRingingTimeout () const
 Get ringing timeout (number of seconds after which a call will enter BUSY state if not answered).
 
std::mt19937_64 getSeededRandomEngine ()
 
std::shared_ptr< AudioLoopgetTelephoneFile ()
 Retrieve the current telephone file.
 
std::shared_ptr< AudioLoopgetTelephoneTone ()
 Retrieve the current telephone tone.
 
VideoManagergetVideoManager () const
 
std::map< std::string, std::string > getVolatileAccountDetails (const std::string &accountID) const
 Retrieve volatile details such as recent registration errors.
 
std::shared_ptr< dhtnet::ChannelSocket > gitSocket (std::string_view accountId, std::string_view deviceId, std::string_view conversationId)
 Return current git socket used for a conversation.
 
bool hangupCall (const std::string &accountId, const std::string &callId)
 Functions which occur with a user's action Hangup the call.
 
bool hangupConference (const std::string &accountId, const std::string &confId)
 Functions which occur with a user's action Hangup the conference (hangup every participants)
 
AudioFormat hardwareAudioFormatChanged (AudioFormat format)
 Callback called when the audio layer initialised with its preferred format.
 
bool hasAccount (const std::string &accountID)
 
bool hasCurrentCall () const
 Tell if there is a current call processed.
 
bool holdConference (const std::string &accountId, const std::string &confId)
 Hold every participant to a conference.
 
void incomingCall (const std::string &accountId, Call &call)
 Handle incoming call and notify user.
 
bool incomingCallsWaiting ()
 
void incomingMessage (const std::string &accountId, const std::string &callId, const std::string &from, const std::map< std::string, std::string > &messages)
 Notify the client with an incoming message.
 
void init (const std::filesystem::path &config_file, libjami::InitFlag flags)
 Initialisation of thread (sound) and map.
 
void insertGitTransport (git_smart_subtransport *tr, std::unique_ptr< P2PSubTransport > &&sub)
 
std::shared_ptr< asio::io_context > ioContext () const
 
bool isAGCEnabled () const
 
bool isAllModerators (const std::string &accountID)
 
bool isCurrentCall (const Call &call) const
 Check if a call is the current one.
 
bool isLocalModeratorsEnabled (const std::string &accountID)
 
bool joinConference (const std::string &accountId, const std::string &confId1, const std::string &account2Id, const std::string &confId2)
 Join two conference together into one unique conference.
 
bool joinParticipant (const std::string &accountId, const std::string &callId1, const std::string &account2Id, const std::string &callId2, bool attached=true)
 Join two participants to create a conference.
 
void loadAccountAndConversation (const std::string &accountId, bool loadAll, const std::string &convId)
 
int loadAccountMap (const YAML::Node &node)
 Load the account map from configuration.
 
std::vector< std::string_view > loadAccountOrder () const
 Load the accounts order set by the user from the jamirc config file.
 
void monitor (bool continuous)
 
std::shared_ptr< CallnewOutgoingCall (std::string_view toUrl, const std::string &accountId, const std::vector< libjami::MediaMap > &mediaList)
 Create a new outgoing call.
 
bool offHoldCall (const std::string &accountId, const std::string &callId)
 Functions which occur with a user's action Put the call off hold.
 
bool onHoldCall (const std::string &accountId, const std::string &callId)
 Functions which occur with a user's action Put the call on hold.
 
std::string outgoingCall (const std::string &accountId, const std::string &callee, const std::vector< libjami::MediaMap > &mediaList={})
 Place a new call.
 
void peerAnsweredCall (Call &call)
 Notify the user that the recipient of the call has answered and the put the call in Current state.
 
void peerHungupCall (Call &call)
 Put the call in Hungup state, remove the call from the list.
 
void peerRingingCall (Call &call)
 Rings back because the outgoing call is ringing and the put the call in Ringing state.
 
void playDtmf (char code)
 Play the dtmf-associated sound.
 
void playRingtone (const std::string &accountID)
 Handle played music when an incoming call occurs.
 
void playTone ()
 Play a ringtone.
 
void playToneWithMessage ()
 Play a special ringtone ( BUSY ) if there's at least one message on the voice mail.
 
void recordingPlaybackSeek (const double value)
 
bool refuseCall (const std::string &accountId, const std::string &id)
 Functions which occur with a user's action Refuse the call.
 
void registerAccount (const std::string &accountID, const std::string &convId={})
 Send registration for one account.
 
void registerAccounts ()
 Send registration for all enabled accounts.
 
void removeAccount (const std::string &accountID, bool flush=false)
 Delete an existing account, unregister VoIPLink associated, and purge from configuration.
 
void removeAccounts ()
 
void removeAudio (Call &call)
 
void removeParticipant (Call &call)
 Remove the conference participant from a conference.
 
void ringback ()
 Handle audio sounds heard by a caller while they wait for their connection to a called party to be completed.
 
void saveConfig ()
 Save config to file.
 
void saveConfig (const std::shared_ptr< Account > &acc)
 
ScheduledExecutorscheduler ()
 
std::shared_ptr< TaskscheduleTask (std::function< void()> &&task, std::chrono::steady_clock::time_point when, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 
std::shared_ptr< TaskscheduleTaskIn (std::function< void()> &&task, std::chrono::steady_clock::duration timeout, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 
void sendCallTextMessage (const std::string &accountId, const std::string &callID, const std::map< std::string, std::string > &messages, const std::string &from, bool isMixed)
 Send a new text message to the call, if participate to a conference, send to all participant.
 
void sendRegister (const std::string &accountId, bool enable)
 ConfigurationManager - Send registration request.
 
uint64_t sendTextMessage (const std::string &accountID, const std::string &to, const std::map< std::string, std::string > &payloads, bool fromPlugin=false, bool onlyConnected=false)
 
void setAccountActive (const std::string &accountID, bool active, bool shutdownConnections)
 
void setAccountDetails (const std::string &accountID, const std::map< std::string, std::string > &details)
 Save the details of an existing account, given the account ID This will load the configuration map with the given data.
 
void setAccountsOrder (const std::string &order)
 Set the account order in the config file.
 
void setAGCState (bool enabled)
 
void setAllModerators (const std::string &accountID, bool allModerators)
 
void setAudioDevice (int index, AudioDeviceType streamType)
 Set audio device.
 
bool setAudioManager (const std::string &api)
 Set the audio manager.
 
void setAudioPlugin (const std::string &audioPlugin)
 Set input audio plugin.
 
void setAutoAnswer (bool enable)
 
void setDefaultModerator (const std::string &accountID, const std::string &peerURI, bool state)
 
void setHistoryLimit (int days)
 Set the maximum number of days to keep in the history.
 
void setIsAlwaysRecording (bool isAlwaysRec)
 Set is always recording functionality, every calls will then be set in RECORDING mode once answered.
 
void setNoiseSuppressState (const std::string &state)
 Set the noise reduction engine state in the current audio layer.
 
void setRingingTimeout (int timeout)
 Set ringing timeout (number of seconds after which a call will enter BUSY state if not answered).
 
SIPVoIPLinksipVoIPLink () const
 
void startAudio ()
 
std::unique_ptr< AudioDeviceGuardstartAudioStream (AudioDeviceType stream)
 
bool startRecordedFilePlayback (const std::string &)
 Start playback fo a recorded file if and only if audio layer is not already started.
 
void stopRecordedFilePlayback ()
 Stop playback of recorded file.
 
void stopTone ()
 Acts on the audio streams and audio files.
 
bool toggleRecordingCall (const std::string &accountId, const std::string &id)
 Set recording on / off Start recording.
 
bool transferCall (const std::string &accountId, const std::string &id, const std::string &to)
 Functions which occur with a user's action Transfer the call.
 
void transferFailed ()
 Notify the client that the transfer failed.
 
void transferSucceeded ()
 Notify the client the transfer is successful.
 
bool unHoldConference (const std::string &accountId, const std::string &confId)
 Unhold all conference participants.
 
void unregisterAccounts ()
 Send unregister for all enabled accounts.
 
std::shared_ptr< dhtnet::upnp::UPnPContext > upnpContext () const
 

Static Public Member Functions

static LIBJAMI_TEST_EXPORT Managerinstance ()
 

Public Attributes

AccountFactory accountFactory
 
AudioPreference audioPreference
 Audio preferences.
 
CallFactory callFactory
 
unsigned dhtLogLevel {0}
 
Preferences preferences
 General preferences configuration.
 
VoipPreference voipPreferences
 Voip related preferences.
 

Static Public Attributes

static bool autoLoad = {true}
 
static std::atomic_bool initialized = {false}
 
static bool syncOnRegister = {true}
 

Friends

class AudioDeviceGuard
 

Detailed Description

Manager (controller) of daemon.

Definition at line 66 of file manager.h.

Member Function Documentation

◆ accountCount()

template<class T = Account>
std::size_t jami::Manager::accountCount ( ) const
inline

Definition at line 749 of file manager.h.

Referenced by getAccountList().

◆ addAccount()

std::string jami::Manager::addAccount ( const std::map< std::string, std::string > &  details,
const std::string &  accountId = {} 
)

Add a new account, and give it a new account ID automatically.

Parameters
detailsThe new account parameters
accountIdoptionnal predetermined accountid to use
Returns
The account Id given to the new account
Todo:
Deal with both the accountMap_ and the Configuration

Definition at line 2754 of file manager.cpp.

References accountFactory, jami::Preferences::addAccount(), jami::Conf::CONFIG_ACCOUNT_TYPE, jami::AccountFactory::createAccount(), jami::AccountFactory::DEFAULT_ACCOUNT_TYPE, jami::emitSignal(), getNewAccountId(), JAMI_DEBUG, JAMI_ERROR, preferences, and saveConfig().

Referenced by libjami::addAccount().

Here is the call graph for this function:

◆ addAudio()

void jami::Manager::addAudio ( Call call)

◆ addMainParticipant()

bool jami::Manager::addMainParticipant ( const std::string &  accountId,
const std::string &  confId 
)

Bind the main participant to a conference (mainly called on a double click action)

Parameters
theconference id

Definition at line 1429 of file manager.cpp.

References JAMI_DBG, JAMI_INFO, and JAMI_WARN.

Referenced by libjami::addMainParticipant().

◆ addSubCall() [1/2]

bool jami::Manager::addSubCall ( Call call,
Conference conference 
)

Definition at line 1377 of file manager.cpp.

References jami::Call::getCallId(), jami::Conference::getConfId(), jami::Conference::getState(), and JAMI_DEBUG.

Here is the call graph for this function:

◆ addSubCall() [2/2]

bool jami::Manager::addSubCall ( const std::string &  accountId,
const std::string &  callId,
const std::string &  account2Id,
const std::string &  confId 
)

Add a subcall to a conference.

Parameters
thecall id
theconference id

Definition at line 1357 of file manager.cpp.

References jami::Call::getConference().

Referenced by libjami::addParticipant().

Here is the call graph for this function:

◆ answerCall() [1/2]

bool jami::Manager::answerCall ( Call call,
const std::vector< libjami::MediaMap > &  mediaList = {} 
)

◆ answerCall() [2/2]

bool jami::Manager::answerCall ( const std::string &  accountId,
const std::string &  callId,
const std::vector< libjami::MediaMap > &  mediaList = {} 
)

Functions which occur with a user's action Answer the call.

Parameters
callId

Definition at line 1090 of file manager.cpp.

Referenced by libjami::accept(), and libjami::acceptWithMedia().

◆ audioFormatUsed()

AudioFormat jami::Manager::audioFormatUsed ( AudioFormat  format)

Should be called by any component dealing with an external audio source, indicating the format used so the mixer format can be eventually adapted.

Returns
the new format used by the main buffer.

Definition at line 2638 of file manager.cpp.

References jami::emitSignal(), JAMI_DEBUG, jami::AudioFormat::nb_channels, jami::AudioFormat::sample_rate, jami::AudioFormat::sampleFormat, and jami::AudioFormat::toString().

Referenced by hardwareAudioFormatChanged().

Here is the call graph for this function:

◆ bindCallToConference()

void jami::Manager::bindCallToConference ( Call call,
Conference conf 
)

Definition at line 636 of file manager.cpp.

References jami::emitSignal().

Referenced by jami::Manager::ManagerPimpl::processIncomingCall().

Here is the call graph for this function:

◆ callBusy()

void jami::Manager::callBusy ( Call call)

Handle played sound when a call is unable to be completed because of a busy recipient.

Definition at line 2027 of file manager.cpp.

References jami::Call::getCallId(), and JAMI_LOG.

Here is the call graph for this function:

◆ callFailure()

void jami::Manager::callFailure ( Call call)

Handle played sound when a failure occurs.

Definition at line 2042 of file manager.cpp.

References jami::Call::getCallId(), jami::Call::isConferenceParticipant(), jami::Call::isSubcall(), and JAMI_LOG.

Here is the call graph for this function:

◆ certStore()

dhtnet::tls::CertificateStore & jami::Manager::certStore ( const std::string &  accountId) const

Definition at line 3302 of file manager.cpp.

References jami::emitSignal().

Referenced by jami::ContactList::foundAccountDevice().

Here is the call graph for this function:

◆ congestion()

void jami::Manager::congestion ( )

Handle played music when a congestion occurs.

Multi Thread.

Definition at line 2099 of file manager.cpp.

◆ createConfFromParticipantList()

void jami::Manager::createConfFromParticipantList ( const std::string &  accountId,
const std::vector< std::string > &  participantList 
)

Create a conference from a list of participant.

Parameters
Avector containing the list of participant

Definition at line 1515 of file manager.cpp.

References jami::Conference::addSubCall(), jami::Conference::attachHost(), jami::Conference::getConfId(), JAMI_ERR, and JAMI_WARN.

Referenced by libjami::createConfFromParticipantList().

Here is the call graph for this function:

◆ detachHost()

bool jami::Manager::detachHost ( const std::shared_ptr< Conference > &  conf = {})

Detach the local participant from curent conference.

Remote participants are placed in hold.

Definition at line 1558 of file manager.cpp.

References JAMI_LOG.

Referenced by libjami::detachLocalParticipant(), and jami::Conference::hangupParticipant().

◆ detachParticipant()

bool jami::Manager::detachParticipant ( const std::string &  callId)

Detach a participant from a conference, put the call on hold, do not hangup it.

Parameters
callid
thecurrent call id

Definition at line 1573 of file manager.cpp.

References jami::Call::getAccountId(), jami::Call::getStateStr(), JAMI_DBG, and JAMI_ERR.

Referenced by libjami::detachParticipant().

Here is the call graph for this function:

◆ enableLocalModerators()

void jami::Manager::enableLocalModerators ( const std::string &  accountID,
bool  state 
)

Definition at line 3251 of file manager.cpp.

References jami::emitSignal(), getAccount(), and jami::AccountConfig::localModeratorsEnabled.

Referenced by libjami::enableLocalModerators().

Here is the call graph for this function:

◆ eraseGitTransport()

void jami::Manager::eraseGitTransport ( git_smart_subtransport tr)

Definition at line 3295 of file manager.cpp.

References jami::emitSignal().

Referenced by P2PSubTransportFree().

Here is the call graph for this function:

◆ findAccount()

template<class T >
std::shared_ptr< T > jami::Manager::findAccount ( const std::function< bool(const std::shared_ptr< T > &)> &  pred)
inline

Definition at line 755 of file manager.h.

◆ finish()

void jami::Manager::finish ( )
noexcept

Definition at line 855 of file manager.cpp.

References jami::Call::getAccountId(), jami::Call::getCallId(), JAMI_DBG, and JAMI_ERR.

Referenced by libjami::fini().

Here is the call graph for this function:

◆ getAccount()

template<class T = Account>
std::shared_ptr< T > jami::Manager::getAccount ( std::string_view  accountId) const
inline

◆ getAccountDetails()

std::map< std::string, std::string > jami::Manager::getAccountDetails ( const std::string &  accountID) const

Retrieve details about a given account.

Parameters
accountIDThe account identifier
Returns
std::map< std::string, std::string > The account details

Definition at line 2680 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::getAccountDetails().

Here is the call graph for this function:

◆ getAccountList()

std::vector< std::string > jami::Manager::getAccountList ( ) const

Get account list.

Returns
std::vector<std::string> A list of accoundIDs

Definition at line 2667 of file manager.cpp.

References accountCount(), jami::emitSignal(), and getAllAccounts().

Referenced by libjami::getAccountList(), removeAccounts(), libjami::searchConversation(), and jami::JamiPluginManager::uninstallPlugin().

Here is the call graph for this function:

◆ getAllAccounts()

template<class T = Account>
std::vector< std::shared_ptr< T > > jami::Manager::getAllAccounts ( ) const
inline

◆ getAudioDriver()

std::shared_ptr< AudioLayer > jami::Manager::getAudioDriver ( )

Accessor to audiodriver.

it's multi-thread and use mutex internally

Returns
AudioLayer* The audio layer object

Definition at line 3045 of file manager.cpp.

Referenced by jami::AudioDeviceGuard::AudioDeviceGuard(), and jami::AudioDeviceGuard::~AudioDeviceGuard().

◆ getAudioInputDeviceIndex()

int jami::Manager::getAudioInputDeviceIndex ( const std::string &  name)

Get index of an audio device.

Parameters
nameThe string description of an audio device
Returns
int His index

Definition at line 2421 of file manager.cpp.

References jami::CAPTURE, jami::emitSignal(), and JAMI_ERR.

Referenced by libjami::getAudioInputDeviceIndex().

Here is the call graph for this function:

◆ getAudioInputDeviceList()

std::vector< std::string > jami::Manager::getAudioInputDeviceList ( )

Get list of supported audio input device.

Returns
std::vector<std::string> A list of the audio devices supporting capture

Definition at line 2221 of file manager.cpp.

References JAMI_ERR.

Referenced by libjami::getAudioInputDeviceList().

◆ getAudioManager()

std::string jami::Manager::getAudioManager ( ) const

Get the audio manager.

Returns
int The audio manager "alsa" "pulseaudio"

Definition at line 2415 of file manager.cpp.

References audioPreference, and jami::AudioPreference::getAudioApi().

Referenced by libjami::getAudioManager(), and jami::PortAudioLayer::PortAudioLayerImpl::PortAudioLayerImpl().

Here is the call graph for this function:

◆ getAudioOutputDeviceIndex()

int jami::Manager::getAudioOutputDeviceIndex ( const std::string &  name)

Definition at line 2434 of file manager.cpp.

References jami::emitSignal(), JAMI_ERR, and jami::PLAYBACK.

Referenced by libjami::getAudioOutputDeviceIndex().

Here is the call graph for this function:

◆ getAudioOutputDeviceList()

std::vector< std::string > jami::Manager::getAudioOutputDeviceList ( )

Get list of supported audio output device.

Returns
std::vector<std::string> A list of the audio devices supporting playback

Definition at line 2205 of file manager.cpp.

References JAMI_ERR.

Referenced by libjami::getAudioOutputDeviceList().

◆ getCallFromCallID()

std::shared_ptr< Call > jami::Manager::getCallFromCallID ( const std::string &  callID) const

Get the Call referred by callID.

If the Call does not exist, return empty std::shared_ptr<Call> instance

Definition at line 1445 of file manager.cpp.

◆ getCallList()

std::vector< std::string > jami::Manager::getCallList ( ) const

Get list of calls (internal subcalls are filter-out)

Returns
std::vector<std::string> A list of call IDs (without subcalls)

Definition at line 2901 of file manager.cpp.

References callFactory, jami::emitSignal(), jami::CallFactory::getAllCalls(), jami::Call::getCallId(), and jami::Call::isSubcall().

Referenced by libjami::getCallList(), and libjami::getCallList().

Here is the call graph for this function:

◆ getChannelList()

std::vector< std::map< std::string, std::string > > jami::Manager::getChannelList ( const std::string &  accountId,
const std::string &  connectionId 
)

Definition at line 985 of file manager.cpp.

Referenced by libjami::getChannelList().

◆ getConnectionList()

std::vector< std::map< std::string, std::string > > jami::Manager::getConnectionList ( const std::string &  accountId,
const std::string &  conversationId 
)

Definition at line 958 of file manager.cpp.

Referenced by libjami::getConnectionList().

◆ getCurrentAudioDevicesIndex()

std::vector< std::string > jami::Manager::getCurrentAudioDevicesIndex ( )

Get string array representing integer indexes of output, input, and ringtone device.

Get string array representing integer indexes of output and input device.

Returns
std::vector<std::string> A list of the current audio devices

Definition at line 2237 of file manager.cpp.

References JAMI_ERR.

Referenced by libjami::getCurrentAudioDevicesIndex().

◆ getCurrentAudioOutputPlugin()

std::string jami::Manager::getCurrentAudioOutputPlugin ( ) const

Get current alsa plugin.

Returns
std::string The Alsa plugin

Definition at line 2447 of file manager.cpp.

References audioPreference, and jami::AudioPreference::getAlsaPlugin().

Referenced by libjami::getCurrentAudioOutputPlugin().

Here is the call graph for this function:

◆ getCurrentCall()

std::shared_ptr< Call > jami::Manager::getCurrentCall ( ) const

Get the current call.

Returns
std::shared_ptr<Call> A call shared pointer (could be empty)

Definition at line 1035 of file manager.cpp.

◆ getCurrentCallId()

const std::string & jami::Manager::getCurrentCallId ( ) const

Get the current call id.

Returns
std::string The call id or ""

Definition at line 1041 of file manager.cpp.

◆ getDefaultModerators()

std::vector< std::string > jami::Manager::getDefaultModerators ( const std::string &  accountID)

Definition at line 3238 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::getDefaultModerators().

Here is the call graph for this function:

◆ getHistoryLimit()

int jami::Manager::getHistoryLimit ( ) const

Get the maximum number of days to keep in the history.

Returns
double The number of days

Definition at line 2367 of file manager.cpp.

References jami::Preferences::getHistoryLimit(), and preferences.

Referenced by libjami::getHistoryLimit().

Here is the call graph for this function:

◆ getIceTransportFactory()

const std::shared_ptr< dhtnet::IceTransportFactory > & jami::Manager::getIceTransportFactory ( )

Definition at line 3169 of file manager.cpp.

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

◆ getIsAlwaysRecording()

bool jami::Manager::getIsAlwaysRecording ( ) const

Get is always recording functionality.

Definition at line 2286 of file manager.cpp.

References audioPreference, and jami::AudioPreference::getIsAlwaysRecording().

Referenced by libjami::getIsAlwaysRecording().

Here is the call graph for this function:

◆ getLastMessages()

std::vector< libjami::Message > jami::Manager::getLastMessages ( const std::string &  accountID,
const uint64_t base_timestamp 
)

Definition at line 3181 of file manager.cpp.

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

Here is the call graph for this function:

◆ getMessageStatus() [1/2]

int jami::Manager::getMessageStatus ( const std::string &  accountID,
uint64_t  id 
) const

Definition at line 2969 of file manager.cpp.

References JAMI_ERROR.

◆ getMessageStatus() [2/2]

int jami::Manager::getMessageStatus ( uint64_t  id) const

Definition at line 2962 of file manager.cpp.

References JAMI_ERROR.

Referenced by libjami::getMessageStatus(), and libjami::getMessageStatus().

◆ getNearbyPeers()

std::map< std::string, std::string > jami::Manager::getNearbyPeers ( const std::string &  accountID)

Definition at line 3214 of file manager.cpp.

References jami::emitSignal().

Referenced by libjami::getNearbyPeers().

Here is the call graph for this function:

◆ getNewAccountId()

std::string jami::Manager::getNewAccountId ( )

Return a new random accountid that is not present in the list.

Returns
A brand new accountid

Definition at line 2744 of file manager.cpp.

References jami::emitSignal(), getAccount(), and jami::to_hex_string().

Referenced by addAccount().

Here is the call graph for this function:

◆ getNoiseSuppressState()

std::string jami::Manager::getNoiseSuppressState ( ) const

Get the noise reduction engine state from the current audio layer.

Definition at line 2453 of file manager.cpp.

References audioPreference, and jami::AudioPreference::getNoiseReduce().

Referenced by libjami::getNoiseSuppressState().

Here is the call graph for this function:

◆ getRingBufferPool()

◆ getRingingTimeout()

int jami::Manager::getRingingTimeout ( ) const

Get ringing timeout (number of seconds after which a call will enter BUSY state if not answered).

Returns
timeout in seconds

Definition at line 2381 of file manager.cpp.

References jami::Preferences::getRingingTimeout(), and preferences.

Referenced by jami::Call::Call(), and libjami::getRingingTimeout().

Here is the call graph for this function:

◆ getSeededRandomEngine()

std::mt19937_64 jami::Manager::getSeededRandomEngine ( )

Definition at line 2738 of file manager.cpp.

Referenced by jami::Conversation::Impl::init().

◆ getTelephoneFile()

std::shared_ptr< AudioLoop > jami::Manager::getTelephoneFile ( )

Retrieve the current telephone file.

Returns
AudioLoop* The audio file or 0 if the wav is stopped

Definition at line 2155 of file manager.cpp.

◆ getTelephoneTone()

std::shared_ptr< AudioLoop > jami::Manager::getTelephoneTone ( )

Retrieve the current telephone tone.

Returns
AudioLoop* The audio tone or 0 if no tone (init before calling this function)

Definition at line 2149 of file manager.cpp.

◆ getVideoManager()

VideoManager * jami::Manager::getVideoManager ( ) const

Definition at line 3175 of file manager.cpp.

Referenced by jami::getAudioInput(), and jami::Conference::~Conference().

◆ getVolatileAccountDetails()

std::map< std::string, std::string > jami::Manager::getVolatileAccountDetails ( const std::string &  accountID) const

Retrieve volatile details such as recent registration errors.

Parameters
accountIDThe account identifier
Returns
std::map< std::string, std::string > The account volatile details

Definition at line 2694 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::getVolatileAccountDetails().

Here is the call graph for this function:

◆ gitSocket()

std::shared_ptr< dhtnet::ChannelSocket > jami::Manager::gitSocket ( std::string_view  accountId,
std::string_view  deviceId,
std::string_view  conversationId 
)

Return current git socket used for a conversation.

Parameters
accountIdRelated account
deviceIdRelated device
conversationIdRelated conversation
Returns
std::optional<std::weak_ptr<ChannelSocket>> the related socket

Definition at line 3203 of file manager.cpp.

References jami::emitSignal().

Referenced by P2PSubTransportAction().

Here is the call graph for this function:

◆ hangupCall()

bool jami::Manager::hangupCall ( const std::string &  accountId,
const std::string &  callId 
)

Functions which occur with a user's action Hangup the call.

Parameters
accountId
callIdThe call identifier

Definition at line 1142 of file manager.cpp.

References JAMI_ERR, and JAMI_WARN.

Referenced by libjami::hangUp(), jami::Account::hangupCalls(), jami::Conference::hangupParticipant(), and jami::transferCall().

◆ hangupConference()

bool jami::Manager::hangupConference ( const std::string &  accountId,
const std::string &  confId 
)

Functions which occur with a user's action Hangup the conference (hangup every participants)

Parameters
idThe call identifier

Definition at line 1180 of file manager.cpp.

References JAMI_ERROR.

Referenced by libjami::hangUpConference().

◆ hardwareAudioFormatChanged()

AudioFormat jami::Manager::hardwareAudioFormatChanged ( AudioFormat  format)

Callback called when the audio layer initialised with its preferred format.

Definition at line 2632 of file manager.cpp.

References audioFormatUsed().

Referenced by jami::AudioLayer::hardwareFormatAvailable().

Here is the call graph for this function:

◆ hasAccount()

bool jami::Manager::hasAccount ( const std::string &  accountID)

Definition at line 3163 of file manager.cpp.

References accountFactory, jami::emitSignal(), and jami::AccountFactory::hasAccount().

Here is the call graph for this function:

◆ hasCurrentCall()

bool jami::Manager::hasCurrentCall ( ) const

Tell if there is a current call processed.

Returns
bool True if there is a current call

Definition at line 1025 of file manager.cpp.

References libjami::Call::StateEvent::CURRENT, jami::Call::getStateStr(), and jami::Call::isSubcall().

Here is the call graph for this function:

◆ holdConference()

bool jami::Manager::holdConference ( const std::string &  accountId,
const std::string &  confId 
)

Hold every participant to a conference.

Parameters
theconference id

Definition at line 1313 of file manager.cpp.

References jami::Conference::detachHost(), jami::Conference::getConfId(), jami::Conference::getStateStr(), and JAMI_INFO.

Referenced by libjami::holdConference().

Here is the call graph for this function:

◆ incomingCall()

void jami::Manager::incomingCall ( const std::string &  accountId,
Call call 
)

Handle incoming call and notify user.

Parameters
accountIdan account id
callA call pointer

Definition at line 1872 of file manager.cpp.

References jami::Call::getCallId(), and JAMI_ERROR.

Referenced by jami::transaction_request_cb().

Here is the call graph for this function:

◆ incomingCallsWaiting()

bool jami::Manager::incomingCallsWaiting ( )
Returns
true is there is one or many incoming call waiting new call, not answered or refused

Definition at line 1865 of file manager.cpp.

◆ incomingMessage()

void jami::Manager::incomingMessage ( const std::string &  accountId,
const std::string &  callId,
const std::string &  from,
const std::map< std::string, std::string > &  messages 
)

Notify the client with an incoming message.

Parameters
accountIdThe account identifier
callIdThe call to send the message
messagesA map if mime type as key and mime payload as value

Definition at line 1891 of file manager.cpp.

References jami::Call::getConference(), jami::Conference::getConfId(), jami::Call::isConferenceParticipant(), JAMI_DBG, and JAMI_ERR.

Here is the call graph for this function:

◆ init()

◆ insertGitTransport()

void jami::Manager::insertGitTransport ( git_smart_subtransport tr,
std::unique_ptr< P2PSubTransport > &&  sub 
)

Definition at line 3288 of file manager.cpp.

References jami::emitSignal().

Referenced by P2PSubTransportNew().

Here is the call graph for this function:

◆ instance()

Manager & jami::Manager::instance ( )
static

Definition at line 676 of file manager.cpp.

References jami::emitSignal(), initialized, instance(), and JAMI_DBG.

Referenced by libjami::accept(), libjami::acceptConversationRequest(), libjami::acceptTrustRequest(), libjami::acceptWithMedia(), libjami::addAccount(), libjami::addContact(), libjami::addConversationMember(), libjami::addDevice(), libjami::addMainParticipant(), libjami::addParticipant(), jami::Conference::addSubCall(), jami::Conversation::Impl::announce(), libjami::answerMediaChangeRequest(), libjami::answerServerRequest(), libjami::attendedTransfer(), jami::Call::Call(), jami::ConversationModule::call(), libjami::cancelAddDevice(), libjami::cancelDataTransfer(), libjami::changeAccountPassword(), libjami::clearCache(), jami::closeMediaPlayer(), jami::Conference::Conference(), jami::AudioInput::configureFilePlayback(), libjami::confirmAddDevice(), libjami::connectivityChanged(), jami::ContactList::ContactList(), libjami::conversationInfos(), libjami::countInteractions(), libjami::createConfFromParticipantList(), jami::createMediaPlayer(), libjami::currentMediaList(), libjami::declineConversationRequest(), libjami::detachLocalParticipant(), libjami::detachParticipant(), libjami::discardTrustRequest(), jami::JamiAccount::doUnregister(), libjami::downloadFile(), libjami::enableLocalModerators(), libjami::exportToFile(), libjami::fileTransferInfo(), libjami::fini(), jami::AudioLayer::flush(), jami::AudioLayer::flushMain(), jami::ContactList::foundAccountDevice(), libjami::getAccountDetails(), libjami::getAccountList(), libjami::getActiveCalls(), libjami::getActiveCodecList(), jami::getAudioInput(), libjami::getAudioInputDeviceIndex(), libjami::getAudioInputDeviceList(), libjami::getAudioManager(), libjami::getAudioOutputDeviceIndex(), libjami::getAudioOutputDeviceList(), libjami::getCallDetails(), libjami::getCallList(), libjami::getCallList(), libjami::getCallMediaHandlerDetails(), libjami::getCallMediaHandlers(), libjami::getCallMediaHandlerStatus(), libjami::getCertificateDetails(), libjami::getCertificateDetailsPath(), libjami::getCertificatesByStatus(), libjami::getChannelList(), libjami::getChatHandlerDetails(), libjami::getChatHandlers(), libjami::getChatHandlerStatus(), libjami::getCodecDetails(), libjami::getConferenceDetails(), libjami::getConferenceId(), libjami::getConferenceInfos(), libjami::getConferenceList(), libjami::getConnectionList(), libjami::getContactDetails(), libjami::getContacts(), libjami::getConversationMembers(), libjami::getConversationPreferences(), libjami::getConversationRequests(), libjami::getConversations(), libjami::getCredentials(), libjami::getCurrentAudioDevicesIndex(), libjami::getCurrentAudioOutputPlugin(), libjami::getDecodingAccelerated(), libjami::getDefaultModerators(), libjami::getEncodingAccelerated(), libjami::getHistoryLimit(), jami::SIPAccountBase::getIceOptions(), libjami::getInstalledPlugins(), jami::JamiPluginManager::getInstalledPlugins(), libjami::getIsAlwaysRecording(), libjami::getIsRecording(), libjami::getKnownRingDevices(), libjami::getLastMessages(), libjami::getLoadedPlugins(), jami::getMediaPlayer(), libjami::getMessageStatus(), libjami::getMessageStatus(), jami::SIPPresence::getModId(), libjami::getNearbyPeers(), libjami::getNoiseSuppressState(), libjami::getParticipantList(), libjami::getPasswordKey(), libjami::getPinnedCertificates(), libjami::getPlatformInfo(), libjami::getPluginDetails(), libjami::getPluginPreferences(), libjami::getPluginPreferencesValues(), libjami::getPluginsEnabled(), libjami::getRecordPath(), libjami::getRecordPreview(), libjami::getRecordQuality(), libjami::getRenderer(), libjami::getRingingTimeout(), libjami::getSubscriptions(), libjami::getSupportedCiphers(), jami::AudioLayer::getToPlay(), jami::AudioLayer::getToRing(), libjami::getTrustRequests(), libjami::getVolatileAccountDetails(), libjami::getVolume(), jami::SIPVoIPLink::guessAccount(), libjami::hangUp(), jami::Account::hangupCalls(), libjami::hangUpConference(), libjami::hangupParticipant(), jami::Conference::hangupParticipant(), jami::AudioLayer::hardwareFormatAvailable(), jami::VideoManager::hasRunningPlayers(), libjami::hold(), libjami::holdConference(), jami::Conversation::Impl::init(), libjami::init(), jami::ServerAccountManager::initAuthentication(), jami::video::VideoRtpSession::initRecorder(), libjami::installPlugin(), jami::JamiPluginManager::installPlugin(), instance(), libjami::isAgcEnabled(), libjami::isAllModerators(), libjami::isAudioMeterActive(), libjami::isCaptureMuted(), libjami::isConferenceParticipant(), libjami::isDtmfMuted(), libjami::isLocalModeratorsEnabled(), libjami::isPasswordValid(), libjami::isPlaybackMuted(), libjami::isRingtoneMuted(), libjami::joinConference(), libjami::joinParticipant(), libjami::loadAccountAndConversation(), loadAccountMap(), jami::SIPAccountBase::loadConfig(), libjami::loadConversation(), libjami::loadConversationMessages(), libjami::loadConversationUntil(), libjami::loadPlugin(), jami::JamiPluginManager::loadPlugins(), libjami::loadSwarmUntil(), libjami::lookupAddress(), libjami::lookupName(), libjami::monitor(), libjami::muteCapture(), libjami::muteDtmf(), libjami::muteLocalMedia(), libjami::muteParticipant(), libjami::mutePlayback(), libjami::muteRingtone(), libjami::muteStream(), jami::JamiAccount::newIncomingCall(), jami::SIPAccount::newIncomingCall(), jami::JamiAccount::newOutgoingCall(), jami::SIPAccount::newOutgoingCall(), jami::SIPAccountBase::onTextMessage(), P2PSubTransportAction(), P2PSubTransportFree(), P2PSubTransportNew(), libjami::pinCertificate(), libjami::pinCertificatePath(), libjami::pinRemoteCertificate(), libjami::placeCallWithMedia(), libjami::playDTMF(), jami::PortAudioLayer::PortAudioLayerImpl::PortAudioLayerImpl(), libjami::CallbackWrapperBase::post(), jami::Sdp::printSession(), libjami::provideAccountAuthentication(), libjami::publish(), libjami::pushNotificationReceived(), libjami::raiseHand(), libjami::raiseParticipantHand(), libjami::recordPlaybackSeek(), libjami::refuse(), libjami::registerAllAccounts(), libjami::registerName(), libjami::registerSinkTarget(), libjami::reloadConversationsAndRequests(), libjami::removeAccount(), jami::SIPCall::removeCall(), jami::ContactList::removeContact(), libjami::removeContact(), libjami::removeConversation(), libjami::removeConversationMember(), libjami::requestMediaChange(), jami::Conference::requestMediaChange(), libjami::resetPluginPreferencesValues(), libjami::revokeDevice(), jami::runOnMainThread(), jami::Account::saveConfig(), libjami::searchConversation(), libjami::searchUser(), libjami::sendAccountTextMessage(), libjami::sendFile(), libjami::sendMessage(), libjami::sendRegister(), libjami::sendTextMessage(), libjami::sendTrustRequest(), libjami::sendWebViewAttach(), libjami::sendWebViewDetach(), libjami::sendWebViewMessage(), libjami::setAccountActive(), libjami::setAccountDetails(), libjami::setAccountsOrder(), libjami::setActiveCodecList(), libjami::setActiveParticipant(), libjami::setActiveStream(), libjami::setAgcState(), libjami::setAllModerators(), libjami::setAudioInputDevice(), libjami::setAudioManager(), libjami::setAudioMeterState(), libjami::setAudioOutputDevice(), libjami::setAudioPlugin(), libjami::setAudioRingtoneDevice(), libjami::setCertificateStatus(), libjami::setCodecDetails(), libjami::setConferenceLayout(), libjami::setConversationPreferences(), libjami::setCredentials(), libjami::setDecodingAccelerated(), libjami::setDefaultModerator(), libjami::setEncodingAccelerated(), libjami::setHistoryLimit(), libjami::setIsAlwaysRecording(), libjami::setIsComposing(), jami::Sdp::setLocalMediaCapabilities(), libjami::setMessageDisplayed(), libjami::setModerator(), jami::AudioRtpSession::setMuted(), libjami::setNoiseSuppressState(), jami::AudioInput::setPaused(), libjami::setPluginPreference(), libjami::setPluginsEnabled(), libjami::setPushNotificationConfig(), libjami::setPushNotificationToken(), libjami::setPushNotificationTopic(), libjami::setRecordPath(), libjami::setRecordPreview(), libjami::setRecordQuality(), libjami::setRingingTimeout(), jami::video::VideoInput::setSink(), libjami::setSubscriptions(), libjami::setVolume(), jami::SIPVoIPLink::shutdown(), jami::SIPCall::SIPCall(), libjami::start(), libjami::startAudio(), libjami::startAudioDevice(), libjami::startConversation(), libjami::startRecordedFilePlayback(), jami::LocalRecorder::startRecording(), libjami::startTone(), libjami::stopAudioDevice(), libjami::stopRecordedFilePlayback(), jami::LocalRecorder::stopRecording(), libjami::subscribeBuddy(), libjami::switchInput(), jami::AudioInput::switchInput(), jami::SyncedConversation::SyncedConversation(), jami::SyncedConversation::SyncedConversation(), jami::MediaEncoder::testH265Accel(), libjami::toggleCallMediaHandler(), libjami::toggleChatHandler(), jami::Recordable::toggleRecording(), libjami::toggleRecording(), jami::tp_state_callback(), jami::transaction_request_cb(), libjami::transfer(), jami::transferCall(), libjami::unhold(), libjami::unholdConference(), libjami::uninstallPlugin(), jami::JamiPluginManager::uninstallPlugin(), libjami::unloadPlugin(), libjami::unpinCertificate(), libjami::unpinCertificatePath(), libjami::updateConversationInfos(), libjami::updateProfile(), jami::Account::updateUpnpController(), libjami::validateCertificate(), libjami::validateCertificatePath(), jami::video::VideoInput::VideoInput(), jami::video::VideoSender::VideoSender(), jami::AudioInput::~AudioInput(), and jami::Conference::~Conference().

Here is the call graph for this function:

◆ ioContext()

std::shared_ptr< asio::io_context > jami::Manager::ioContext ( ) const

◆ isAGCEnabled()

bool jami::Manager::isAGCEnabled ( ) const

Definition at line 2465 of file manager.cpp.

References audioPreference, and jami::AudioPreference::isAGCEnabled().

Referenced by libjami::isAgcEnabled().

Here is the call graph for this function:

◆ isAllModerators()

bool jami::Manager::isAllModerators ( const std::string &  accountID)

Definition at line 3277 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::isAllModerators().

Here is the call graph for this function:

◆ isCurrentCall()

bool jami::Manager::isCurrentCall ( const Call call) const

Check if a call is the current one.

Parameters
callthe new call
Returns
bool True if the call is the current

Definition at line 1019 of file manager.cpp.

References jami::Call::getCallId().

Here is the call graph for this function:

◆ isLocalModeratorsEnabled()

bool jami::Manager::isLocalModeratorsEnabled ( const std::string &  accountID)

Definition at line 3259 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::isLocalModeratorsEnabled().

Here is the call graph for this function:

◆ joinConference()

bool jami::Manager::joinConference ( const std::string &  accountId,
const std::string &  confId1,
const std::string &  account2Id,
const std::string &  confId2 
)

Join two conference together into one unique conference.

Definition at line 1614 of file manager.cpp.

References JAMI_DEBUG, JAMI_ERR, and JAMI_ERROR.

Referenced by libjami::joinConference().

◆ joinParticipant()

bool jami::Manager::joinParticipant ( const std::string &  accountId,
const std::string &  callId1,
const std::string &  account2Id,
const std::string &  callId2,
bool  attached = true 
)

Join two participants to create a conference.

Parameters
thefist call id
thesecond call id

Definition at line 1451 of file manager.cpp.

References jami::Conference::attachHost(), jami::Conference::detachHost(), jami::Conference::getConfId(), jami::Conference::getStateStr(), JAMI_ERR, JAMI_INFO, and jami::Conference::setState().

Referenced by libjami::joinParticipant().

Here is the call graph for this function:

◆ loadAccountAndConversation()

void jami::Manager::loadAccountAndConversation ( const std::string &  accountId,
bool  loadAll,
const std::string &  convId 
)

◆ loadAccountMap()

◆ loadAccountOrder()

std::vector< std::string_view > jami::Manager::loadAccountOrder ( ) const

Load the accounts order set by the user from the jamirc config file.

Returns
std::vector<std::string> A vector containing the account ID's

Definition at line 2818 of file manager.cpp.

References jami::Preferences::getAccountOrder(), preferences, and jami::split_string().

Here is the call graph for this function:

◆ monitor()

void jami::Manager::monitor ( bool  continuous)

Definition at line 931 of file manager.cpp.

References JAMI_DBG, and jami::Call::monitor().

Referenced by libjami::monitor().

Here is the call graph for this function:

◆ newOutgoingCall()

std::shared_ptr< Call > jami::Manager::newOutgoingCall ( std::string_view  toUrl,
const std::string &  accountId,
const std::vector< libjami::MediaMap > &  mediaList 
)

Create a new outgoing call.

Parameters
toUrlDestination address
accountIdlocal account
mediaListthe list of medias
Returns
A (shared) pointer of Call class type.
Note
This function raises VoipLinkException() on error.

Definition at line 3051 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_WARN.

Referenced by jami::transferCall().

Here is the call graph for this function:

◆ offHoldCall()

bool jami::Manager::offHoldCall ( const std::string &  accountId,
const std::string &  callId 
)

Functions which occur with a user's action Put the call off hold.

Parameters
accountId
idThe call identifier

Definition at line 1232 of file manager.cpp.

References jami::Conference::getConfId(), and JAMI_ERR.

Referenced by libjami::unhold().

Here is the call graph for this function:

◆ onHoldCall()

bool jami::Manager::onHoldCall ( const std::string &  accountId,
const std::string &  callId 
)

Functions which occur with a user's action Put the call on hold.

Parameters
accountId
callIdThe call identifier

Definition at line 1194 of file manager.cpp.

References JAMI_DBG, JAMI_ERR, and jami::Call::onhold().

Referenced by libjami::hold().

Here is the call graph for this function:

◆ outgoingCall()

std::string jami::Manager::outgoingCall ( const std::string &  accountId,
const std::string &  callee,
const std::vector< libjami::MediaMap > &  mediaList = {} 
)

Place a new call.

Parameters
accountIdthe user's account ID
calleethe callee's ID/URI. Depends on the account type. Refer to placeCall/placeCallWithMedia documentations.
mediaLista list of media to include
Returns
the call ID on success, empty string otherwise

Definition at line 1062 of file manager.cpp.

References JAMI_DBG, JAMI_ERROR, and jami::trim().

Referenced by libjami::placeCallWithMedia().

Here is the call graph for this function:

◆ peerAnsweredCall()

void jami::Manager::peerAnsweredCall ( Call call)

Notify the user that the recipient of the call has answered and the put the call in Current state.

Parameters
idThe call identifier

Definition at line 1969 of file manager.cpp.

References jami::Call::getCallId(), jami::Recordable::getPath(), JAMI_DBG, and jami::Call::toggleRecording().

Here is the call graph for this function:

◆ peerHungupCall()

void jami::Manager::peerHungupCall ( Call call)

Put the call in Hungup state, remove the call from the list.

Parameters
idThe call identifier

Definition at line 2004 of file manager.cpp.

References jami::Call::getCallId(), jami::Call::isConferenceParticipant(), JAMI_LOG, and jami::Call::peerHungup().

Here is the call graph for this function:

◆ peerRingingCall()

void jami::Manager::peerRingingCall ( Call call)

Rings back because the outgoing call is ringing and the put the call in Ringing state.

Parameters
idThe call identifier

Definition at line 1995 of file manager.cpp.

References jami::Call::getCallId(), and JAMI_LOG.

Here is the call graph for this function:

◆ playDtmf()

void jami::Manager::playDtmf ( char  code)

Play the dtmf-associated sound.

Parameters
codeThe pressed key

Definition at line 1805 of file manager.cpp.

References JAMI_DBG, JAMI_ERR, and JAMI_WARN.

Referenced by libjami::playDTMF().

◆ playRingtone()

void jami::Manager::playRingtone ( const std::string &  accountID)

Handle played music when an incoming call occurs.

Multi Thread.

Definition at line 2117 of file manager.cpp.

References JAMI_ERR, and JAMI_WARN.

◆ playTone()

void jami::Manager::playTone ( )

Play a ringtone.

Multi Thread.

Definition at line 2081 of file manager.cpp.

Referenced by libjami::startTone().

◆ playToneWithMessage()

void jami::Manager::playToneWithMessage ( )

Play a special ringtone ( BUSY ) if there's at least one message on the voice mail.

Multi Thread.

Definition at line 2090 of file manager.cpp.

Referenced by libjami::startTone().

◆ recordingPlaybackSeek()

void jami::Manager::recordingPlaybackSeek ( const double  value)

Definition at line 2344 of file manager.cpp.

References jami::emitSignal().

Referenced by libjami::recordPlaybackSeek().

Here is the call graph for this function:

◆ refuseCall()

bool jami::Manager::refuseCall ( const std::string &  accountId,
const std::string &  id 
)

Functions which occur with a user's action Refuse the call.

Parameters
idThe call identifier

Definition at line 1298 of file manager.cpp.

References jami::Call::refuse().

Referenced by libjami::refuse().

Here is the call graph for this function:

◆ registerAccount()

void jami::Manager::registerAccount ( const std::string &  accountID,
const std::string &  convId = {} 
)

Send registration for one account.

◆ registerAccounts()

void jami::Manager::registerAccounts ( )

Send registration for all enabled accounts.

Definition at line 2912 of file manager.cpp.

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

Referenced by libjami::registerAllAccounts().

Here is the call graph for this function:

◆ removeAccount()

void jami::Manager::removeAccount ( const std::string &  accountID,
bool  flush = false 
)

Delete an existing account, unregister VoIPLink associated, and purge from configuration.

If 'flush' argument is true, filesystem entries are also removed.

Parameters
accountIDThe account unique ID

Definition at line 2790 of file manager.cpp.

References accountFactory, jami::emitSignal(), getAccount(), preferences, jami::AccountFactory::removeAccount(), jami::Preferences::removeAccount(), and saveConfig().

Referenced by libjami::removeAccount(), and removeAccounts().

Here is the call graph for this function:

◆ removeAccounts()

void jami::Manager::removeAccounts ( )

Definition at line 2811 of file manager.cpp.

References getAccountList(), and removeAccount().

Referenced by init().

Here is the call graph for this function:

◆ removeAudio()

void jami::Manager::removeAudio ( Call call)

Definition at line 1695 of file manager.cpp.

References jami::Call::getAudioStreams(), jami::Call::getCallId(), and JAMI_DEBUG.

Here is the call graph for this function:

◆ removeParticipant()

void jami::Manager::removeParticipant ( Call call)

Remove the conference participant from a conference.

Parameters
callid

Definition at line 1592 of file manager.cpp.

References jami::Call::getCallId(), jami::Call::getConference(), JAMI_DBG, and JAMI_ERR.

Here is the call graph for this function:

◆ ringback()

void jami::Manager::ringback ( )

Handle audio sounds heard by a caller while they wait for their connection to a called party to be completed.

Multi Thread.

Definition at line 2108 of file manager.cpp.

◆ saveConfig() [1/2]

◆ saveConfig() [2/2]

void jami::Manager::saveConfig ( const std::shared_ptr< Account > &  acc)

Definition at line 1742 of file manager.cpp.

◆ scheduler()

ScheduledExecutor & jami::Manager::scheduler ( )

Definition at line 1706 of file manager.cpp.

Referenced by jami::Call::Call(), and jami::runOnMainThread().

◆ scheduleTask()

std::shared_ptr< Task > jami::Manager::scheduleTask ( std::function< void()> &&  task,
std::chrono::steady_clock::time_point  when,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Definition at line 1724 of file manager.cpp.

References jami::ScheduledExecutor::schedule().

Here is the call graph for this function:

◆ scheduleTaskIn()

std::shared_ptr< Task > jami::Manager::scheduleTaskIn ( std::function< void()> &&  task,
std::chrono::steady_clock::duration  timeout,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Definition at line 1733 of file manager.cpp.

◆ sendCallTextMessage()

void jami::Manager::sendCallTextMessage ( const std::string &  accountId,
const std::string &  callID,
const std::map< std::string, std::string > &  messages,
const std::string &  from,
bool  isMixed 
)

Send a new text message to the call, if participate to a conference, send to all participant.

Parameters
accountId
callIdThe call to send the message
messageA list of pair of mime types and payloads
fromThe sender of this message (could be another participant of a conference)

Definition at line 1931 of file manager.cpp.

References jami::Call::getCallId(), jami::Call::getConference(), jami::Call::isConferenceParticipant(), JAMI_DBG, JAMI_ERR, and jami::Call::sendTextMessage().

Referenced by libjami::sendTextMessage().

Here is the call graph for this function:

◆ sendRegister()

void jami::Manager::sendRegister ( const std::string &  accountId,
bool  enable 
)

ConfigurationManager - Send registration request.

Parameters
accountIdThe account to register/unregister
enableThe flag for the type of registration false for unregistration request true for registration request

Definition at line 2921 of file manager.cpp.

References jami::emitSignal(), getAccount(), and saveConfig().

Referenced by libjami::sendRegister().

Here is the call graph for this function:

◆ sendTextMessage()

uint64_t jami::Manager::sendTextMessage ( const std::string &  accountID,
const std::string &  to,
const std::map< std::string, std::string > &  payloads,
bool  fromPlugin = false,
bool  onlyConnected = false 
)

Definition at line 2937 of file manager.cpp.

References jami::emitSignal(), getAccount(), and JAMI_ERR.

Referenced by libjami::sendAccountTextMessage().

Here is the call graph for this function:

◆ setAccountActive()

void jami::Manager::setAccountActive ( const std::string &  accountID,
bool  active,
bool  shutdownConnections 
)

Definition at line 2976 of file manager.cpp.

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

Referenced by libjami::setAccountActive().

Here is the call graph for this function:

◆ setAccountDetails()

void jami::Manager::setAccountDetails ( const std::string &  accountID,
const std::map< std::string, std::string > &  details 
)

Save the details of an existing account, given the account ID This will load the configuration map with the given data.

It will also register/unregister links where the 'Enabled' switched.

Parameters
accountIDThe account identifier
detailsThe account parameters

Definition at line 2708 of file manager.cpp.

References jami::emitSignal(), getAccount(), JAMI_DBG, and JAMI_ERR.

Referenced by libjami::setAccountDetails().

Here is the call graph for this function:

◆ setAccountsOrder()

void jami::Manager::setAccountsOrder ( const std::string &  order)

Set the account order in the config file.

Definition at line 2658 of file manager.cpp.

References jami::emitSignal(), JAMI_LOG, preferences, saveConfig(), and jami::Preferences::setAccountOrder().

Referenced by libjami::setAccountsOrder().

Here is the call graph for this function:

◆ setAGCState()

void jami::Manager::setAGCState ( bool  enabled)

Definition at line 2471 of file manager.cpp.

References audioPreference, and jami::AudioPreference::setAGCState().

Referenced by libjami::setAgcState().

Here is the call graph for this function:

◆ setAllModerators()

void jami::Manager::setAllModerators ( const std::string &  accountID,
bool  allModerators 
)

Definition at line 3270 of file manager.cpp.

References jami::AccountConfig::allModeratorsEnabled, jami::emitSignal(), and getAccount().

Referenced by libjami::setAllModerators().

Here is the call graph for this function:

◆ setAudioDevice()

void jami::Manager::setAudioDevice ( int  index,
AudioDeviceType  streamType 
)

Set audio device.

Set audio output device.

Parameters
indexThe index of the soundcard
thetype of stream, either PLAYBACK, CAPTURE, RINGTONE

Definition at line 2180 of file manager.cpp.

References JAMI_ERR, and JAMI_WARN.

Referenced by libjami::setAudioInputDevice(), libjami::setAudioOutputDevice(), and libjami::setAudioRingtoneDevice().

◆ setAudioManager()

bool jami::Manager::setAudioManager ( const std::string &  api)

Set the audio manager.

Returns
true if api is now in use, false otherwise

Definition at line 2387 of file manager.cpp.

References audioPreference, jami::emitSignal(), jami::AudioPreference::getAudioApi(), JAMI_DBG, saveConfig(), and jami::AudioPreference::setAudioApi().

Referenced by libjami::setAudioManager().

Here is the call graph for this function:

◆ setAudioPlugin()

void jami::Manager::setAudioPlugin ( const std::string &  audioPlugin)

Set input audio plugin.

Parameters
audioPluginThe audio plugin

Definition at line 2164 of file manager.cpp.

Referenced by jami::PortAudioLayer::PortAudioLayerImpl::PortAudioLayerImpl(), and libjami::setAudioPlugin().

◆ setAutoAnswer()

void jami::Manager::setAutoAnswer ( bool  enable)

Definition at line 712 of file manager.cpp.

◆ setDefaultModerator()

void jami::Manager::setDefaultModerator ( const std::string &  accountID,
const std::string &  peerURI,
bool  state 
)

Definition at line 3222 of file manager.cpp.

References jami::emitSignal(), getAccount(), JAMI_ERR, and saveConfig().

Referenced by libjami::setDefaultModerator().

Here is the call graph for this function:

◆ setHistoryLimit()

void jami::Manager::setHistoryLimit ( int  days)

Set the maximum number of days to keep in the history.

Parameters
callsThe number of days

Definition at line 2359 of file manager.cpp.

References jami::emitSignal(), JAMI_DBG, preferences, saveConfig(), and jami::Preferences::setHistoryLimit().

Referenced by libjami::setHistoryLimit().

Here is the call graph for this function:

◆ setIsAlwaysRecording()

void jami::Manager::setIsAlwaysRecording ( bool  isAlwaysRec)

Set is always recording functionality, every calls will then be set in RECORDING mode once answered.

Definition at line 2292 of file manager.cpp.

References audioPreference, jami::emitSignal(), saveConfig(), and jami::AudioPreference::setIsAlwaysRecording().

Referenced by libjami::setIsAlwaysRecording().

Here is the call graph for this function:

◆ setNoiseSuppressState()

void jami::Manager::setNoiseSuppressState ( const std::string &  state)

Set the noise reduction engine state in the current audio layer.

Definition at line 2459 of file manager.cpp.

References audioPreference, and jami::AudioPreference::setNoiseReduce().

Referenced by libjami::setNoiseSuppressState().

Here is the call graph for this function:

◆ setRingingTimeout()

void jami::Manager::setRingingTimeout ( int  timeout)

Set ringing timeout (number of seconds after which a call will enter BUSY state if not answered).

Parameters
timeoutin seconds

Definition at line 2373 of file manager.cpp.

References JAMI_DBG, preferences, saveConfig(), and jami::Preferences::setRingingTimeout().

Referenced by libjami::setRingingTimeout().

Here is the call graph for this function:

◆ sipVoIPLink()

SIPVoIPLink & jami::Manager::sipVoIPLink ( ) const

Definition at line 3189 of file manager.cpp.

Referenced by jami::SIPPresence::getModId(), and jami::transaction_request_cb().

◆ startAudio()

void jami::Manager::startAudio ( )

Definition at line 2251 of file manager.cpp.

Referenced by libjami::startAudio().

◆ startAudioStream()

std::unique_ptr< AudioDeviceGuard > jami::Manager::startAudioStream ( AudioDeviceType  stream)
inline

◆ startRecordedFilePlayback()

bool jami::Manager::startRecordedFilePlayback ( const std::string &  filepath)

Start playback fo a recorded file if and only if audio layer is not already started.

Parameters
Filepath of the file to play

Definition at line 2322 of file manager.cpp.

References jami::emitSignal(), JAMI_DBG, JAMI_ERR, jami::RINGTONE, and startAudioStream().

Referenced by libjami::startRecordedFilePlayback().

Here is the call graph for this function:

◆ stopRecordedFilePlayback()

void jami::Manager::stopRecordedFilePlayback ( )

Stop playback of recorded file.

Definition at line 2350 of file manager.cpp.

References JAMI_DBG.

Referenced by libjami::stopRecordedFilePlayback().

◆ stopTone()

void jami::Manager::stopTone ( )

Acts on the audio streams and audio files.

Multi Thread.

Definition at line 2068 of file manager.cpp.

Referenced by libjami::startTone().

◆ toggleRecordingCall()

bool jami::Manager::toggleRecordingCall ( const std::string &  accountId,
const std::string &  id 
)

Set recording on / off Start recording.

Parameters
idThe call identifier Returns true if the call was set to record

Definition at line 2299 of file manager.cpp.

References jami::emitSignal(), getAccount(), JAMI_DBG, and JAMI_ERR.

Referenced by libjami::toggleRecording().

Here is the call graph for this function:

◆ transferCall()

bool jami::Manager::transferCall ( const std::string &  accountId,
const std::string &  id,
const std::string &  to 
)

Functions which occur with a user's action Transfer the call.

Parameters
idThe call identifier
toThe recipient of the transfer

Definition at line 1266 of file manager.cpp.

References jami::Call::isConferenceParticipant(), and jami::Call::transfer().

Referenced by libjami::transfer().

Here is the call graph for this function:

◆ transferFailed()

void jami::Manager::transferFailed ( )

Notify the client that the transfer failed.

Definition at line 1285 of file manager.cpp.

◆ transferSucceeded()

void jami::Manager::transferSucceeded ( )

Notify the client the transfer is successful.

Definition at line 1291 of file manager.cpp.

◆ unHoldConference()

bool jami::Manager::unHoldConference ( const std::string &  accountId,
const std::string &  confId 
)

Unhold all conference participants.

Parameters
theconference id

Definition at line 1330 of file manager.cpp.

References jami::Conference::getConfId(), jami::Conference::getState(), jami::Conference::getStateStr(), jami::Conference::getSubCalls(), JAMI_DBG, and jami::Conference::setState().

Referenced by libjami::unholdConference().

Here is the call graph for this function:

◆ unregisterAccounts()

void jami::Manager::unregisterAccounts ( )

Send unregister for all enabled accounts.

Definition at line 1047 of file manager.cpp.

◆ upnpContext()

std::shared_ptr< dhtnet::upnp::UPnPContext > jami::Manager::upnpContext ( ) const

Definition at line 1718 of file manager.cpp.

Referenced by libjami::connectivityChanged().

Friends And Related Symbol Documentation

◆ AudioDeviceGuard

Definition at line 888 of file manager.h.

Member Data Documentation

◆ accountFactory

AccountFactory jami::Manager::accountFactory

◆ audioPreference

◆ autoLoad

bool jami::Manager::autoLoad = {true}
static

Definition at line 116 of file manager.h.

Referenced by init(), and loadAccountAndConversation().

◆ callFactory

◆ dhtLogLevel

unsigned jami::Manager::dhtLogLevel {0}

Definition at line 852 of file manager.h.

Referenced by init().

◆ initialized

std::atomic_bool jami::Manager::initialized = {false}
static

Definition at line 108 of file manager.h.

Referenced by init(), libjami::initialized(), instance(), and jami::video::notify().

◆ preferences

Preferences jami::Manager::preferences

◆ syncOnRegister

bool jami::Manager::syncOnRegister = {true}
static

Definition at line 114 of file manager.h.

◆ voipPreferences

VoipPreference jami::Manager::voipPreferences

Voip related preferences.

Definition at line 85 of file manager.h.

Referenced by libjami::isDtmfMuted(), loadAccountMap(), and libjami::muteDtmf().


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