Skip to content
Snippets Groups Projects
Unverified Commit 7d8f2ce9 authored by Amin Bandali's avatar Amin Bandali
Browse files

api: newcallmodel: add isConferenceHost()

Change-Id: Ie621a10fec496c70da8f28fdc689407226c2131f
parent 0a3545ac
No related branches found
No related tags found
No related merge requests found
......@@ -270,6 +270,13 @@ public:
*/
void hangupParticipant(const QString& confId, const QString& participant);
/**
* Check if a call is a conference or not
* @param callId The call to check
* @return if conference
*/
bool isConferenceHost(const QString& callId);
Q_SIGNALS:
/**
* Emitted when a call state changes
......
......@@ -270,7 +270,7 @@ NewCallModel::createCall(const QString& uri, bool isAudioOnly)
auto callId = isAudioOnly
? CallManager::instance().placeCall(owner.id, uri, {{"AUDIO_ONLY", "true"}})
: CallManager::instance().placeCall(owner.id, uri);
#else // dbus
#else // dbus
// do not use auto here (QDBusPendingReply<QString>)
QString callId = isAudioOnly
? CallManager::instance().placeCallWithDetails(owner.id,
......@@ -808,6 +808,16 @@ NewCallModel::hangupCallsAndConferences()
}
}
bool
NewCallModel::isConferenceHost(const QString& callId)
{
auto call = pimpl_->calls.find(callId);
if (call == pimpl_->calls.end() or not call->second)
return false;
else
return call->second->type == lrc::api::call::Type::CONFERENCE;
}
void
NewCallModelPimpl::slotIncomingCall(const QString& accountId,
const QString& callId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment