Skip to content
Snippets Groups Projects
Commit 942a81b0 authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk
Browse files

instancemanager: add runtime mute dring option

Change-Id: I8389ac70809ce55635603df0926cee041d2a62f9
parent a17ee41e
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ public:
* @param willMigrateCb
* @param didMigrateCb
*/
Lrc(MigrationCb willMigrateCb = {}, MigrationCb didMigrateCb = {});
Lrc(MigrationCb willMigrateCb = {}, MigrationCb didMigrateCb = {}, bool muteDring = false);
~Lrc();
/**
* get a reference on account model.
......
......@@ -29,10 +29,10 @@
#include "../interfaces/dbuserrorhandleri.h"
InstanceManagerInterface&
InstanceManager::instance()
InstanceManager::instance(bool muteDring)
{
#ifdef ENABLE_LIBWRAP
static auto interface = new InstanceManagerInterface();
static auto interface = new InstanceManagerInterface(muteDring);
#else
if (!dbus_metaTypeInit)
registerCommTypes();
......
......@@ -32,6 +32,6 @@
namespace InstanceManager {
LIB_EXPORT InstanceManagerInterface& instance();
LIB_EXPORT InstanceManagerInterface& instance(bool muteDring = false);
}
......@@ -65,7 +65,7 @@ public:
std::unique_ptr<PluginModel> PluginModel_;
};
Lrc::Lrc(MigrationCb willDoMigrationCb, MigrationCb didDoMigrationCb)
Lrc::Lrc(MigrationCb willDoMigrationCb, MigrationCb didDoMigrationCb, bool muteDring)
{
lrc::api::Lrc::holdConferences.store(true);
#ifndef ENABLE_LIBWRAP
......@@ -74,7 +74,7 @@ Lrc::Lrc(MigrationCb willDoMigrationCb, MigrationCb didDoMigrationCb)
#endif
// Ensure Daemon is running/loaded (especially on non-DBus platforms)
// before instantiating LRC and its members
InstanceManager::instance();
InstanceManager::instance(muteDring);
lrcPimpl_ = std::make_unique<LrcPimpl>(*this, willDoMigrationCb, didDoMigrationCb);
}
......
......@@ -27,7 +27,7 @@
static int ringFlags = 0;
InstanceManagerInterface::InstanceManagerInterface()
InstanceManagerInterface::InstanceManagerInterface(bool muteDring)
{
using namespace std::placeholders;
......@@ -43,8 +43,10 @@ InstanceManagerInterface::InstanceManagerInterface()
#endif
#ifndef MUTE_DRING
if (!muteDring) {
ringFlags |= DRing::DRING_FLAG_DEBUG;
ringFlags |= DRing::DRING_FLAG_CONSOLE_LOG;
}
#endif
DRing::init(static_cast<DRing::InitFlag>(ringFlags));
......
......@@ -38,7 +38,7 @@ class InstanceManagerInterface : public QObject
{
Q_OBJECT
public:
InstanceManagerInterface();
InstanceManagerInterface(bool muteDring = false);
~InstanceManagerInterface();
// TODO: These are not present in dring.h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment