50 std::shared_ptr<SIPCall>
newSipCall(
const std::shared_ptr<SIPAccountBase>&
account,
52 const std::vector<libjami::MediaMap>&
mediaList);
72 std::shared_ptr<Call>
getCall(
const std::string&
id)
const;
76 std::shared_ptr<C>
getCall(
const std::string&
id)
78 return std::dynamic_pointer_cast<C>(
getCall(
id, C::LINK_TYPE));
84 bool hasCall(
const std::string&
id)
const;
101 std::vector<std::shared_ptr<Call>>
getAllCalls()
const;
126 if (
itermap != callMaps_.cend())
131 std::mt19937_64& rand_;
133 mutable std::recursive_mutex callMapsMutex_ {};
135 std::atomic_bool allowNewCall_ {
true};
137 std::map<Call::LinkType, CallMap> callMaps_ {};
Interface to protocol account (ex: SIPAccount) It can be enable on loading or activate after.
std::size_t callCount() const
Return number of calls.
std::vector< std::shared_ptr< Call > > getAllCalls() const
Return all calls.
std::shared_ptr< SIPCall > newSipCall(const std::shared_ptr< SIPAccountBase > &account, Call::CallType type, const std::vector< libjami::MediaMap > &mediaList)
Create a new call instance.
CallFactory(std::mt19937_64 &rand)
std::shared_ptr< C > getCall(const std::string &id)
void forbid()
Forbid creation of new calls.
std::vector< std::string > getCallIDs() const
Return all call's IDs.
bool hasCall(const std::string &id) const
Return if given call exists.
void removeCall(Call &call)
Remove given call instance from call list.
std::shared_ptr< Call > getCall(const std::string &id) const
Return call pointer associated to given ID.Type can optionally be specified.
std::string getNewCallID() const
void clear()
Erase all calls.
bool empty() const
Return if calls exist.
CallType
This determines if the call originated from the local user (OUTGOING) or from some remote peer (INCOM...
std::map< std::string, std::shared_ptr< Call > > CallMap
void emitSignal(Args... args)