Skip to content
Snippets Groups Projects
Commit f9ca31c6 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

newcallmodel: add ability to close all calls and conferences

Change-Id: I1f4b91a472dc4255f393ce33980fdb2c3ddee76d
parent 3e1040a9
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,11 @@ public:
*/
bool isRecording(const std::string& callId) const;
/**
* Close all active calls and conferences
*/
static void hangupCallsAndConferences();
Q_SIGNALS:
/**
* Emitted when a call state changes
......
......@@ -463,6 +463,19 @@ NewCallModel::sendSipMessage(const std::string& callId, const std::string& body)
CallManager::instance().sendTextMessage(callId.c_str(), payloads, true /* not used */);
}
void
NewCallModel::hangupCallsAndConferences()
{
QStringList conferences = CallManager::instance().getConferenceList();
for (const auto& conf : conferences) {
CallManager::instance().hangUpConference(conf);
}
QStringList calls = CallManager::instance().getCallList();
for (const auto &call : calls) {
CallManager::instance().hangUp(call);
}
}
void
NewCallModelPimpl::slotIncomingCall(const std::string& accountId, const std::string& callId, const std::string& fromId)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment