diff --git a/src/api/lrc.h b/src/api/lrc.h index ee73c4b4719e1cc862e16c0d6c7bbc1ff2309ef4..6ee0355a7d406d0872d3e4a3e28a8c49ddb6a1b6 100644 --- a/src/api/lrc.h +++ b/src/api/lrc.h @@ -119,6 +119,11 @@ public: */ static std::atomic_bool holdConferences; + /** + * Make monitor continous or discrete + */ + static void monitor(bool continous); + private: std::unique_ptr<LrcPimpl> lrcPimpl_; }; diff --git a/src/callbackshandler.cpp b/src/callbackshandler.cpp index d0f370ca4cb958140fc8709bb8a5f79223424d4d..a3306facffceb771d4bd829a7bf0f5d27b777794 100644 --- a/src/callbackshandler.cpp +++ b/src/callbackshandler.cpp @@ -239,6 +239,8 @@ CallbacksHandler::CallbacksHandler(const Lrc& parent) this, &CallbacksHandler::slotAudioMeterReceived, Qt::QueuedConnection); + + } CallbacksHandler::~CallbacksHandler() {} @@ -247,10 +249,11 @@ void CallbacksHandler::subscribeToDebugReceived() { connect(&ConfigurationManager::instance(), - &ConfigurationManagerInterface::debugMessageReceived, - this, - &CallbacksHandler::slotDebugMessageReceived, - Qt::QueuedConnection); + &ConfigurationManagerInterface::messageSend, + this, + &CallbacksHandler::slotDebugMessageReceived, + Qt::QueuedConnection); + } void diff --git a/src/lrc.cpp b/src/lrc.cpp index 976af6577a8696d8ef87946732e4b96359ed0efe..74bf381d41c5a963294b07ba5bfe6521b525d758 100644 --- a/src/lrc.cpp +++ b/src/lrc.cpp @@ -214,6 +214,12 @@ isFinished(const QString& callState) return false; } +void +Lrc::monitor(bool continuous) +{ + ConfigurationManager::instance().monitor(continuous); +} + LrcPimpl::LrcPimpl(Lrc& linked, MigrationCb& willMigrateCb, MigrationCb& didMigrateCb) : linked(linked) , behaviorController(std::make_unique<BehaviorController>()) diff --git a/src/qtwrapper/configurationmanager_wrap.h b/src/qtwrapper/configurationmanager_wrap.h index 1f429419d7981d75db0ff183cc7fa0fa8e0b6fe7..ef1f3f13fd00d8fbf57a811823ecbf0551109650 100644 --- a/src/qtwrapper/configurationmanager_wrap.h +++ b/src/qtwrapper/configurationmanager_wrap.h @@ -221,7 +221,7 @@ public: }), exportable_callback<ConfigurationSignal::MessageSend>( [this](const std::string& message) { - Q_EMIT this->debugMessageReceived(QString(message.c_str())); + Q_EMIT this->messageSend(QString(message.c_str())); }), exportable_callback<ConfigurationSignal::ComposingStatusChanged>( [this](const std::string& account_id, const std::string& from, int status) { @@ -517,6 +517,8 @@ public Q_SLOTS: // METHODS void registerAllAccounts() { DRing::registerAllAccounts(); } + void monitor(bool continuous) { DRing::monitor(continuous); } + void removeAccount(const QString& accountID) { DRing::removeAccount(accountID.toStdString()); } bool changeAccountPassword(const QString& id, @@ -889,7 +891,7 @@ Q_SIGNALS: // SIGNALS void accountProfileReceived(const QString& accountId, const QString& displayName, const QString& userPhoto); - void debugMessageReceived(const QString& message); + void messageSend(const QString& message); void composingStatusChanged(const QString& accountId, const QString& contactId, bool isComposing);