Commit ac1c821c authored by Aline Gondim Santos's avatar Aline Gondim Santos Committed by Sébastien Blin

plugin: toggle callmediahandler with callID

Change-Id: Ieba982cf9988b7837328fba81d597f23b068ea1f
parent 4dc5fcc3
......@@ -770,11 +770,6 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st
if (call->status == call::Status::ENDED) {
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) {
if (previousStatus == call::Status::INCOMING_RINGING
|| previousStatus == call::Status::OUTGOING_RINGING) {
......
/****************************************************************************
* Copyright (C) 2018-2020 Savoir-faire Linux Inc. *
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* 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, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/
/**
* Copyright (C) 2020 Savoir-faire Linux Inc.
* Author: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* 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,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "api/pluginmodel.h"
// Std
......@@ -136,10 +136,9 @@ void
PluginModel::toggleCallMediaHandler(const QString& id)
{
MapStringString toggleInfo = PluginManager::instance().getCallMediaHandlerStatus();
if (toggleInfo["state"] == "true"){
PluginManager::instance().toggleCallMediaHandler(toggleInfo["name"], false);
}
if (!id.isEmpty() && id != toggleInfo["name"]) {
if (toggleInfo["name"] == id){
PluginManager::instance().toggleCallMediaHandler(id, false);
} else {
PluginManager::instance().toggleCallMediaHandler(id, true);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment