Skip to content
Snippets Groups Projects
Unverified Commit ac1c821c authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Sébastien Blin
Browse files

plugin: toggle callmediahandler with callID

Change-Id: Ieba982cf9988b7837328fba81d597f23b068ea1f
parent 4dc5fcc3
Branches
No related tags found
No related merge requests found
...@@ -770,11 +770,6 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st ...@@ -770,11 +770,6 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st
if (call->status == call::Status::ENDED) { if (call->status == call::Status::ENDED) {
emit linked.callEnded(callId); emit linked.callEnded(callId);
// NOTE: this line stops all mediaHandlers after the end of any call.
// The mediaHandler will be linked with the callID soon and each mediaHandler
// will be activated/deactivated with respect to the callID.
// This modification will allow to remove the next line.
PluginModel().toggleCallMediaHandler("");
} else if (call->status == call::Status::IN_PROGRESS) { } else if (call->status == call::Status::IN_PROGRESS) {
if (previousStatus == call::Status::INCOMING_RINGING if (previousStatus == call::Status::INCOMING_RINGING
|| previousStatus == call::Status::OUTGOING_RINGING) { || previousStatus == call::Status::OUTGOING_RINGING) {
......
/**************************************************************************** /**
* Copyright (C) 2018-2020 Savoir-faire Linux Inc. * * Copyright (C) 2020 Savoir-faire Linux Inc.
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> * * Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
* * *
* This library is free software; you can redistribute it and/or * * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * * modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either * * License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version. * * version 2.1 of the License, or (at your option) any later version.
* * *
* This library is distributed in the hope that it will be useful, * * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details. * * Lesser General Public License for more details.
* * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>.
***************************************************************************/ */
#include "api/pluginmodel.h" #include "api/pluginmodel.h"
// Std // Std
...@@ -136,10 +136,9 @@ void ...@@ -136,10 +136,9 @@ void
PluginModel::toggleCallMediaHandler(const QString& id) PluginModel::toggleCallMediaHandler(const QString& id)
{ {
MapStringString toggleInfo = PluginManager::instance().getCallMediaHandlerStatus(); MapStringString toggleInfo = PluginManager::instance().getCallMediaHandlerStatus();
if (toggleInfo["state"] == "true"){ if (toggleInfo["name"] == id){
PluginManager::instance().toggleCallMediaHandler(toggleInfo["name"], false); PluginManager::instance().toggleCallMediaHandler(id, false);
} } else {
if (!id.isEmpty() && id != toggleInfo["name"]) {
PluginManager::instance().toggleCallMediaHandler(id, true); PluginManager::instance().toggleCallMediaHandler(id, true);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment