Skip to content
Snippets Groups Projects
Commit c80794a4 authored by Anthony Léonard's avatar Anthony Léonard Committed by Sébastien Blin
Browse files

newcallmodel: remove unneeded argument


A boolean argument in toggleMedia() was passed specifying if the
chosen media was to be muted or not. This is not consistent with the
other toggle*() methods used to manage calls.

Moreover, it is not needed at all as we can retrieve the current state
of a media and toggle it from LRC itself, thus removing the need to do
it on each client.

Change-Id: I53528d925c8336b92afc47367adef971d11e9a25
Reviewed-by: default avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
parent a964e584
Branches
No related tags found
No related merge requests found
......@@ -132,9 +132,8 @@ public:
* Toggle a media on a call
* @param callId
* @param media {AUDIO, VIDEO}
* @param flag is muted
*/
void toggleMedia(const std::string& callId, const NewCallModel::Media media, bool flag) const;
void toggleMedia(const std::string& callId, const NewCallModel::Media media) const;
/**
* Not implemented yet
*/
......
......@@ -230,7 +230,7 @@ NewCallModel::togglePause(const std::string& callId) const
}
void
NewCallModel::toggleMedia(const std::string& callId, const NewCallModel::Media media, bool flag) const
NewCallModel::toggleMedia(const std::string& callId, const NewCallModel::Media media) const
{
auto it = pimpl_->calls.find(callId);
if (it == pimpl_->calls.end()) return;
......@@ -240,15 +240,15 @@ NewCallModel::toggleMedia(const std::string& callId, const NewCallModel::Media m
case NewCallModel::Media::AUDIO:
CallManager::instance().muteLocalMedia(callId.c_str(),
DRing::Media::Details::MEDIA_TYPE_AUDIO,
flag);
call->audioMuted = flag;
!call->audioMuted);
call->audioMuted = !call->audioMuted;
break;
case NewCallModel::Media::VIDEO:
CallManager::instance().muteLocalMedia(callId.c_str(),
DRing::Media::Details::MEDIA_TYPE_VIDEO,
flag);
call->videoMuted = flag;
!call->videoMuted);
call->videoMuted = !call->videoMuted;
break;
case NewCallModel::Media::NONE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment