diff --git a/src/api/newcallmodel.h b/src/api/newcallmodel.h index 55c99dc01a8a6161bb73e62fda79692042ba197c..7189fc120c425e7dadb15625ca6ec8e5ebd9eb74 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 b515815d2f744d51344ee40a98a4fef4e7d5c4cd..152887ad97e8eb3d674cb0f645dccd3729cbaa73 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)