Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::Manager::ManagerPimpl Struct Reference
Collaboration diagram for jami::Manager::ManagerPimpl:
Collaboration graph

Public Member Functions

void addMainParticipant (Conference &conf)
 
void addWaitingCall (const std::string &id)
 Add incoming callid to the waiting list.
 
void bindCallToConference (Call &call, Conference &conf)
 
template<class T >
std::shared_ptr< TfindAccount (const std::function< bool(const std::shared_ptr< T > &)> &)
 
int getCurrentDeviceIndex (AudioDeviceType type)
 
bool hangupConference (Conference &conf)
 
void initAudioDriver ()
 Initialization: Main Thread.
 
void loadAccount (const YAML::Node &item, int &errorCount)
 
 ManagerPimpl (Manager &base)
 
bool parseConfiguration ()
 
void playATone (Tone::ToneId toneId)
 Multi Thread.
 
void processIncomingCall (const std::string &accountId, Call &incomCall)
 
void processRemainingParticipants (Conference &conf)
 Process remaining participant given a conference and the current call ID.
 
void removeWaitingCall (const std::string &id)
 Remove incoming callid to the waiting list.
 
std::filesystem::path retrieveConfigPath () const
 Create config directory in home user and return configuration file path.
 
void sendTextMessageToConference (const Conference &conf, const std::map< std::string, std::string > &messages, const std::string &from) const noexcept
 
void switchCall (const std::string &id)
 
void unsetCurrentCall ()
 

Static Public Member Functions

static void stripSipPrefix (Call &incomCall)
 

Public Attributes

std::shared_ptr< AudioLayeraudiodriver_ {nullptr}
 Audio layer.
 
std::mutex audioLayerMutex_
 Mutex used to protect audio layer.
 
std::array< std::atomic_uint, 3 > audioStreamUsers_ {}
 
std::atomic_bool autoAnswer_ {false}
 
Managerbase_
 
std::string currentCall_
 Current Call ID.
 
std::mutex currentCallMutex_
 Protected current call access.
 
std::shared_ptr< AudioFramedtmfBuf_
 Buffer to generate DTMF.
 
std::unique_ptr< DTMFdtmfKey_
 
std::atomic_bool finished_ {false}
 
std::map< git_smart_subtransport *, std::unique_ptr< P2PSubTransport > > gitTransports_ {}
 
std::mutex gitTransportsMtx_ {}
 
std::shared_ptr< dhtnet::IceTransportFactory > ice_tf_
 
std::shared_ptr< asio::io_context > ioContext_
 
std::thread ioContextRunner_
 
std::filesystem::path path_
 Path of the ConfigFile.
 
std::unique_ptr< RingBufferPoolringbufferpool_
 Instance of the RingBufferPool for the whole application.
 
ScheduledExecutor scheduler_ {"manager"}
 Main scheduler.
 
std::map< std::string, std::weak_ptr< video::SinkClient > > sinkMap_
 
std::mutex sinksMutex_
 Protected sinks access.
 
std::unique_ptr< SIPVoIPLinksipLink_
 
ToneControl toneCtrl_
 Application wide tone controller.
 
std::unique_ptr< AudioDeviceGuardtoneDeviceGuard_
 
std::shared_ptr< dhtnet::upnp::UPnPContext > upnpContext_
 
std::unique_ptr< VideoManagervideoManager_
 
CallIDSet waitingCalls_
 Waiting Call Vectors.
 
std::mutex waitingCallsMutex_
 Protect waiting call list, access by many VoIP/audio threads.
 

Detailed Description

Definition at line 256 of file manager.cpp.

Constructor & Destructor Documentation

◆ ManagerPimpl()

jami::Manager::ManagerPimpl::ManagerPimpl ( Manager base)
explicit

Definition at line 409 of file manager.cpp.

References jami::libav_utils::av_init().

Here is the call graph for this function:

Member Function Documentation

◆ addMainParticipant()

void jami::Manager::ManagerPimpl::addMainParticipant ( Conference conf)

Definition at line 1401 of file manager.cpp.

References jami::Conference::attachHost(), jami::Conference::getAccountId(), jami::Conference::getConfId(), and jami::Conference::getStateStr().

Here is the call graph for this function:

◆ addWaitingCall()

void jami::Manager::ManagerPimpl::addWaitingCall ( const std::string &  id)

Add incoming callid to the waiting list.

Parameters
idstd::string to add

Definition at line 572 of file manager.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ bindCallToConference()

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

◆ findAccount()

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

◆ getCurrentDeviceIndex()

int jami::Manager::ManagerPimpl::getCurrentDeviceIndex ( AudioDeviceType  type)

Definition at line 468 of file manager.cpp.

References jami::CAPTURE, jami::emitSignal(), jami::PLAYBACK, and jami::RINGTONE.

Here is the call graph for this function:

◆ hangupConference()

bool jami::Manager::ManagerPimpl::hangupConference ( Conference conf)

◆ initAudioDriver()

void jami::Manager::ManagerPimpl::initAudioDriver ( )

Initialization: Main Thread.

Definition at line 2480 of file manager.cpp.

References audiodriver_, jami::Manager::audioPreference, audioStreamUsers_, base_, jami::CAPTURE, jami::AudioPreference::createAudioLayer(), jami::emitSignal(), jami::PLAYBACK, and jami::RINGTONE.

Here is the call graph for this function:

◆ loadAccount()

void jami::Manager::ManagerPimpl::loadAccount ( const YAML::Node &  item,
int errorCount 
)

Definition at line 591 of file manager.cpp.

References jami::ACCOUNT_TYPE_SIP, jami::emitSignal(), JAMI_ERROR, jami::yaml_utils::parseValue(), and jami::yaml_utils::parseValueOptional().

Here is the call graph for this function:

◆ parseConfiguration()

bool jami::Manager::ManagerPimpl::parseConfiguration ( )

Definition at line 424 of file manager.cpp.

References jami::emitSignal(), and JAMI_WARN.

Here is the call graph for this function:

◆ playATone()

void jami::Manager::ManagerPimpl::playATone ( Tone::ToneId  toneId)

Multi Thread.

Definition at line 450 of file manager.cpp.

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

Here is the call graph for this function:

◆ processIncomingCall()

void jami::Manager::ManagerPimpl::processIncomingCall ( const std::string &  accountId,
Call incomCall 
)

◆ processRemainingParticipants()

void jami::Manager::ManagerPimpl::processRemainingParticipants ( Conference conf)

Process remaining participant given a conference and the current call ID.

Mainly called when a participant is detached or call ended (hang up).

Parameters
currentcall id
conferencepointer

Definition at line 485 of file manager.cpp.

References jami::Conference::ACTIVE_ATTACHED, jami::RingBufferPool::DEFAULT_ID, jami::emitSignal(), jami::Call::getAccount(), jami::Call::getAudioStreams(), jami::Call::getCallId(), JAMI_DBG, JAMI_DEBUG, and JAMI_ERR.

Here is the call graph for this function:

◆ removeWaitingCall()

void jami::Manager::ManagerPimpl::removeWaitingCall ( const std::string &  id)

Remove incoming callid to the waiting list.

Parameters
idstd::string to remove

Definition at line 582 of file manager.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ retrieveConfigPath()

std::filesystem::path jami::Manager::ManagerPimpl::retrieveConfigPath ( ) const

Create config directory in home user and return configuration file path.

Initialization: Main Thread.

Definition at line 551 of file manager.cpp.

References jami::fileutils::get_config_dir().

Here is the call graph for this function:

◆ sendTextMessageToConference()

void jami::Manager::ManagerPimpl::sendTextMessageToConference ( const Conference conf,
const std::map< std::string, std::string > &  messages,
const std::string &  from 
) const
noexcept

Definition at line 616 of file manager.cpp.

References jami::emitSignal(), and JAMI_ERR.

Here is the call graph for this function:

◆ stripSipPrefix()

void jami::Manager::ManagerPimpl::stripSipPrefix ( Call incomCall)
static

Definition at line 2493 of file manager.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ switchCall()

void jami::Manager::ManagerPimpl::switchCall ( const std::string &  id)

Definition at line 564 of file manager.cpp.

References jami::emitSignal(), and JAMI_DBG.

Here is the call graph for this function:

◆ unsetCurrentCall()

void jami::Manager::ManagerPimpl::unsetCurrentCall ( )

Definition at line 558 of file manager.cpp.

Member Data Documentation

◆ audiodriver_

std::shared_ptr<AudioLayer> jami::Manager::ManagerPimpl::audiodriver_ {nullptr}

Audio layer.

Definition at line 345 of file manager.cpp.

Referenced by initAudioDriver().

◆ audioLayerMutex_

std::mutex jami::Manager::ManagerPimpl::audioLayerMutex_

Mutex used to protect audio layer.

Definition at line 362 of file manager.cpp.

◆ audioStreamUsers_

std::array<std::atomic_uint, 3> jami::Manager::ManagerPimpl::audioStreamUsers_ {}

Definition at line 346 of file manager.cpp.

Referenced by initAudioDriver().

◆ autoAnswer_

std::atomic_bool jami::Manager::ManagerPimpl::autoAnswer_ {false}

Definition at line 329 of file manager.cpp.

◆ base_

Manager& jami::Manager::ManagerPimpl::base_

Definition at line 319 of file manager.cpp.

Referenced by initAudioDriver().

◆ currentCall_

std::string jami::Manager::ManagerPimpl::currentCall_

Current Call ID.

Definition at line 336 of file manager.cpp.

◆ currentCallMutex_

std::mutex jami::Manager::ManagerPimpl::currentCallMutex_

Protected current call access.

Definition at line 339 of file manager.cpp.

◆ dtmfBuf_

std::shared_ptr<AudioFrame> jami::Manager::ManagerPimpl::dtmfBuf_

Buffer to generate DTMF.

Definition at line 352 of file manager.cpp.

◆ dtmfKey_

std::unique_ptr<DTMF> jami::Manager::ManagerPimpl::dtmfKey_

Definition at line 349 of file manager.cpp.

◆ finished_

std::atomic_bool jami::Manager::ManagerPimpl::finished_ {false}

Definition at line 389 of file manager.cpp.

◆ gitTransports_

std::map<git_smart_subtransport*, std::unique_ptr<P2PSubTransport> > jami::Manager::ManagerPimpl::gitTransports_ {}

Definition at line 406 of file manager.cpp.

◆ gitTransportsMtx_

std::mutex jami::Manager::ManagerPimpl::gitTransportsMtx_ {}

Definition at line 405 of file manager.cpp.

◆ ice_tf_

std::shared_ptr<dhtnet::IceTransportFactory> jami::Manager::ManagerPimpl::ice_tf_

Definition at line 392 of file manager.cpp.

◆ ioContext_

std::shared_ptr<asio::io_context> jami::Manager::ManagerPimpl::ioContext_

Definition at line 321 of file manager.cpp.

◆ ioContextRunner_

std::thread jami::Manager::ManagerPimpl::ioContextRunner_

Definition at line 322 of file manager.cpp.

◆ path_

std::filesystem::path jami::Manager::ManagerPimpl::path_

Path of the ConfigFile.

Definition at line 377 of file manager.cpp.

◆ ringbufferpool_

std::unique_ptr<RingBufferPool> jami::Manager::ManagerPimpl::ringbufferpool_

Instance of the RingBufferPool for the whole application.

In order to send signal to other parts of the application, one must pass through the RingBufferMananger. Audio instances must be registered into the RingBufferMananger and bound together via the Manager.

Definition at line 387 of file manager.cpp.

◆ scheduler_

ScheduledExecutor jami::Manager::ManagerPimpl::scheduler_ {"manager"}

Main scheduler.

Definition at line 327 of file manager.cpp.

◆ sinkMap_

std::map<std::string, std::weak_ptr<video::SinkClient> > jami::Manager::ManagerPimpl::sinkMap_

Definition at line 395 of file manager.cpp.

◆ sinksMutex_

std::mutex jami::Manager::ManagerPimpl::sinksMutex_

Protected sinks access.

Definition at line 342 of file manager.cpp.

◆ sipLink_

std::unique_ptr<SIPVoIPLink> jami::Manager::ManagerPimpl::sipLink_

Definition at line 399 of file manager.cpp.

◆ toneCtrl_

ToneControl jami::Manager::ManagerPimpl::toneCtrl_

Application wide tone controller.

Definition at line 332 of file manager.cpp.

◆ toneDeviceGuard_

std::unique_ptr<AudioDeviceGuard> jami::Manager::ManagerPimpl::toneDeviceGuard_

Definition at line 333 of file manager.cpp.

◆ upnpContext_

std::shared_ptr<dhtnet::upnp::UPnPContext> jami::Manager::ManagerPimpl::upnpContext_

Definition at line 324 of file manager.cpp.

◆ videoManager_

std::unique_ptr<VideoManager> jami::Manager::ManagerPimpl::videoManager_

Definition at line 397 of file manager.cpp.

◆ waitingCalls_

CallIDSet jami::Manager::ManagerPimpl::waitingCalls_

Waiting Call Vectors.

Definition at line 367 of file manager.cpp.

◆ waitingCallsMutex_

std::mutex jami::Manager::ManagerPimpl::waitingCallsMutex_

Protect waiting call list, access by many VoIP/audio threads.

Definition at line 372 of file manager.cpp.


The documentation for this struct was generated from the following file: