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

#include <call_factory.h>

Collaboration diagram for jami::CallFactory:
Collaboration graph

Public Member Functions

std::size_t callCount () const
 Return number of calls.
 
std::size_t callCount (Call::LinkType link) const
 
 CallFactory (std::mt19937_64 &rand)
 
void clear ()
 Erase all calls.
 
bool empty () const
 Return if calls exist.
 
bool empty (Call::LinkType link) const
 
void forbid ()
 Forbid creation of new calls.
 
std::vector< std::shared_ptr< Call > > getAllCalls () const
 Return all calls.
 
std::vector< std::shared_ptr< Call > > getAllCalls (Call::LinkType link) const
 
template<class C >
std::shared_ptr< CgetCall (const std::string &id)
 
std::shared_ptr< CallgetCall (const std::string &id) const
 Return call pointer associated to given ID.Type can optionally be specified.
 
std::shared_ptr< CallgetCall (const std::string &id, Call::LinkType link) const
 
std::vector< std::string > getCallIDs () const
 Return all call's IDs.
 
std::vector< std::string > getCallIDs (Call::LinkType link) const
 
std::string getNewCallID () const
 
bool hasCall (const std::string &id) const
 Return if given call exists.
 
bool hasCall (const std::string &id, Call::LinkType link) const
 
std::shared_ptr< SIPCallnewSipCall (const std::shared_ptr< SIPAccountBase > &account, Call::CallType type, const std::vector< libjami::MediaMap > &mediaList)
 Create a new call instance.
 
void removeCall (Call &call)
 Remove given call instance from call list.
 
void removeCall (const std::string &id)
 Accessor on removeCall with callID than instance.
 

Detailed Description

Definition at line 34 of file call_factory.h.

Constructor & Destructor Documentation

◆ CallFactory()

jami::CallFactory::CallFactory ( std::mt19937_64 &  rand)
inline

Definition at line 37 of file call_factory.h.

Member Function Documentation

◆ callCount() [1/2]

std::size_t jami::CallFactory::callCount ( ) const

Return number of calls.

Type can optionally be specified.

Definition at line 167 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ callCount() [2/2]

std::size_t jami::CallFactory::callCount ( Call::LinkType  link) const

Definition at line 245 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ clear()

void jami::CallFactory::clear ( )

Erase all calls.

Definition at line 114 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ empty() [1/2]

bool jami::CallFactory::empty ( ) const

Return if calls exist.

Type can optionally be specified.

Definition at line 101 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ empty() [2/2]

bool jami::CallFactory::empty ( Call::LinkType  link) const

Definition at line 188 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ forbid()

void jami::CallFactory::forbid ( )

Forbid creation of new calls.

Definition at line 58 of file call_factory.cpp.

◆ getAllCalls() [1/2]

std::vector< std::shared_ptr< Call > > jami::CallFactory::getAllCalls ( ) const

Return all calls.

Type can optionally be specified.

Definition at line 136 of file call_factory.cpp.

References jami::emitSignal().

Referenced by jami::Manager::getCallList().

Here is the call graph for this function:

◆ getAllCalls() [2/2]

std::vector< std::shared_ptr< Call > > jami::CallFactory::getAllCalls ( Call::LinkType  link) const

Definition at line 213 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ getCall() [1/3]

template<class C >
std::shared_ptr< C > jami::CallFactory::getCall ( const std::string &  id)
inline

Definition at line 76 of file call_factory.h.

References getCall().

Here is the call graph for this function:

◆ getCall() [2/3]

std::shared_ptr< Call > jami::CallFactory::getCall ( const std::string &  id) const

Return call pointer associated to given ID.Type can optionally be specified.

Definition at line 121 of file call_factory.cpp.

References jami::emitSignal().

Referenced by getCall(), and removeCall().

Here is the call graph for this function:

◆ getCall() [3/3]

std::shared_ptr< Call > jami::CallFactory::getCall ( const std::string &  id,
Call::LinkType  link 
) const

Definition at line 197 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ getCallIDs() [1/2]

std::vector< std::string > jami::CallFactory::getCallIDs ( ) const

Return all call's IDs.

Type can optionally be specified.

Definition at line 152 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ getCallIDs() [2/2]

std::vector< std::string > jami::CallFactory::getCallIDs ( Call::LinkType  link) const

Definition at line 229 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ getNewCallID()

std::string jami::CallFactory::getNewCallID ( ) const

Definition at line 29 of file call_factory.cpp.

References jami::emitSignal(), hasCall(), and jami::JAMI_ID_MAX_VAL.

Referenced by jami::ConversationModule::call(), and newSipCall().

Here is the call graph for this function:

◆ hasCall() [1/2]

bool jami::CallFactory::hasCall ( const std::string &  id) const

Return if given call exists.

Type can optionally be specified.

Definition at line 87 of file call_factory.cpp.

References jami::emitSignal().

Referenced by getNewCallID().

Here is the call graph for this function:

◆ hasCall() [2/2]

bool jami::CallFactory::hasCall ( const std::string &  id,
Call::LinkType  link 
) const

Definition at line 179 of file call_factory.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ newSipCall()

std::shared_ptr< SIPCall > jami::CallFactory::newSipCall ( const std::shared_ptr< SIPAccountBase > &  account,
Call::CallType  type,
const std::vector< libjami::MediaMap > &  mediaList 
)

Create a new call instance.

Parameters
accountAccount used to create this call
typeSet definitely this call as incoming/outgoing
mediaListThe list of media to include
Returns
A shared pointer to the created call

Definition at line 40 of file call_factory.cpp.

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

Referenced by jami::JamiAccount::newIncomingCall(), and jami::SIPAccount::newIncomingCall().

Here is the call graph for this function:

◆ removeCall() [1/2]

void jami::CallFactory::removeCall ( Call call)

Remove given call instance from call list.

Definition at line 64 of file call_factory.cpp.

References jami::emitSignal(), jami::Call::getCallId(), jami::Call::getLinkType(), and JAMI_DBG.

Referenced by removeCall().

Here is the call graph for this function:

◆ removeCall() [2/2]

void jami::CallFactory::removeCall ( const std::string &  id)

Accessor on removeCall with callID than instance.

Definition at line 76 of file call_factory.cpp.

References jami::emitSignal(), getCall(), JAMI_ERR, and removeCall().

Here is the call graph for this function:

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