From e2d3703d8c7cc86b3efa5f914178253a984e8ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Fri, 8 Jun 2018 10:50:04 -0400 Subject: [PATCH] newcallmodel: link to isRecording Clients should be able to get if a call is recording or not. Change-Id: I325f5ec5cc6c07295c9d3335f0f235a32a441ba3 Reviewed-by: Philippe Gorley <philippe.gorley@savoirfairelinux.com> --- src/api/newcallmodel.h | 7 +++++++ src/newcallmodel.cpp | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/src/api/newcallmodel.h b/src/api/newcallmodel.h index 55c99dc0..7189fc12 100644 --- a/src/api/newcallmodel.h +++ b/src/api/newcallmodel.h @@ -173,6 +173,13 @@ public: */ std::string getFormattedCallDuration(const std::string& callId) const; + /** + * Get if a call is recording + * @param callId + * @return true if the call is recording else false + */ + bool isRecording(const std::string& callId) const; + Q_SIGNALS: /** * Emitted when a call state changes diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index b515815d..152887ad 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -350,6 +350,13 @@ NewCallModel::getFormattedCallDuration(const std::string& callId) const return formattedString; } +bool +NewCallModel::isRecording(const std::string& callId) const +{ + if (pimpl_->calls.find(callId) == pimpl_->calls.end()) return false; + return CallManager::instance().getIsRecording(callId.c_str()); +} + NewCallModelPimpl::NewCallModelPimpl(const NewCallModel& linked, const CallbacksHandler& callbacksHandler) : linked(linked) -- GitLab