From 6f8e2f5c2b409bdf49df3d7d1cf17b57898383b8 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 13 Feb 2018 17:58:57 +0100 Subject: [PATCH] Remove const in CallSessionListener methods to allow the session to be modified. --- src/call/call-p.h | 76 ++++++++--------- src/call/call.cpp | 82 +++++++++---------- .../basic-to-client-group-chat-room.cpp | 2 +- src/chat/chat-room/client-group-chat-room-p.h | 4 +- src/chat/chat-room/client-group-chat-room.cpp | 4 +- .../client-group-to-basic-chat-room.cpp | 6 +- src/chat/chat-room/server-group-chat-room-p.h | 3 +- .../chat-room/server-group-chat-room-stub.cpp | 4 +- .../session/call-session-listener.h | 76 ++++++++--------- src/conference/session/call-session-p.h | 2 +- src/conference/session/call-session.cpp | 2 +- src/conference/session/call-session.h | 2 +- src/conference/session/media-session-p.h | 2 +- src/conference/session/media-session.cpp | 2 +- 14 files changed, 135 insertions(+), 132 deletions(-) diff --git a/src/call/call-p.h b/src/call/call-p.h index 09f796d4c..0c6f9ae65 100644 --- a/src/call/call-p.h +++ b/src/call/call-p.h @@ -74,44 +74,44 @@ private: void terminateBecauseOfLostMedia (); /* CallSessionListener */ - void onAckBeingSent (const std::shared_ptr &session, LinphoneHeaders *headers) override; - void onAckReceived (const std::shared_ptr &session, LinphoneHeaders *headers) override; - void onBackgroundTaskToBeStarted (const std::shared_ptr &session) override; - void onBackgroundTaskToBeStopped (const std::shared_ptr &session) override; - bool onCallSessionAccepted (const std::shared_ptr &session) override; - void onCallSessionConferenceStreamStarting (const std::shared_ptr &session, bool mute) override; - void onCallSessionConferenceStreamStopping (const std::shared_ptr &session) override; - void onCallSessionEarlyFailed (const std::shared_ptr &session, LinphoneErrorInfo *ei) override; - void onCallSessionSetReleased (const std::shared_ptr &session) override; - void onCallSessionSetTerminated (const std::shared_ptr &session) override; - void onCallSessionStartReferred (const std::shared_ptr &session) override; - void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) override; - void onCallSessionTransferStateChanged (const std::shared_ptr &session, CallSession::State state) override; - void onCheckForAcceptation (const std::shared_ptr &session) override; - void onDtmfReceived (const std::shared_ptr &session, char dtmf) override; - void onIncomingCallSessionNotified (const std::shared_ptr &session) override; - void onIncomingCallSessionStarted (const std::shared_ptr &session) override; - void onIncomingCallSessionTimeoutCheck (const std::shared_ptr &session, int elapsed, bool oneSecondElapsed) override; - void onInfoReceived (const std::shared_ptr &session, const LinphoneInfoMessage *im) override; - void onNoMediaTimeoutCheck (const std::shared_ptr &session, bool oneSecondElapsed) override; - void onEncryptionChanged (const std::shared_ptr &session, bool activated, const std::string &authToken) override; - void onCallSessionStateChangedForReporting (const std::shared_ptr &session) override; - void onRtcpUpdateForReporting (const std::shared_ptr &session, SalStreamType type) override; - void onStatsUpdated (const std::shared_ptr &session, const LinphoneCallStats *stats) override; - void onUpdateMediaInfoForReporting (const std::shared_ptr &session, int statsType) override; - void onResetCurrentSession (const std::shared_ptr &session) override; - void onSetCurrentSession (const std::shared_ptr &session) override; - void onFirstVideoFrameDecoded (const std::shared_ptr &session) override; - void onResetFirstVideoFrameDecoded (const std::shared_ptr &session) override; - void onPlayErrorTone (const std::shared_ptr &session, LinphoneReason reason) override; - void onRingbackToneRequested (const std::shared_ptr &session, bool requested) override; - void onStartRinging (const std::shared_ptr &session) override; - void onStopRinging (const std::shared_ptr &session) override; - void onStopRingingIfInCall (const std::shared_ptr &session) override; - void onStopRingingIfNeeded (const std::shared_ptr &session) override; - bool areSoundResourcesAvailable (const std::shared_ptr &session) override; - bool isPlayingRingbackTone (const std::shared_ptr &session) override; - void onRealTimeTextCharacterReceived (const std::shared_ptr &session, RealtimeTextReceivedCharacter *character) override; + void onAckBeingSent (const std::shared_ptr &session, LinphoneHeaders *headers) override; + void onAckReceived (const std::shared_ptr &session, LinphoneHeaders *headers) override; + void onBackgroundTaskToBeStarted (const std::shared_ptr &session) override; + void onBackgroundTaskToBeStopped (const std::shared_ptr &session) override; + bool onCallSessionAccepted (const std::shared_ptr &session) override; + void onCallSessionConferenceStreamStarting (const std::shared_ptr &session, bool mute) override; + void onCallSessionConferenceStreamStopping (const std::shared_ptr &session) override; + void onCallSessionEarlyFailed (const std::shared_ptr &session, LinphoneErrorInfo *ei) override; + void onCallSessionSetReleased (const std::shared_ptr &session) override; + void onCallSessionSetTerminated (const std::shared_ptr &session) override; + void onCallSessionStartReferred (const std::shared_ptr &session) override; + void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) override; + void onCallSessionTransferStateChanged (const std::shared_ptr &session, CallSession::State state) override; + void onCheckForAcceptation (const std::shared_ptr &session) override; + void onDtmfReceived (const std::shared_ptr &session, char dtmf) override; + void onIncomingCallSessionNotified (const std::shared_ptr &session) override; + void onIncomingCallSessionStarted (const std::shared_ptr &session) override; + void onIncomingCallSessionTimeoutCheck (const std::shared_ptr &session, int elapsed, bool oneSecondElapsed) override; + void onInfoReceived (const std::shared_ptr &session, const LinphoneInfoMessage *im) override; + void onNoMediaTimeoutCheck (const std::shared_ptr &session, bool oneSecondElapsed) override; + void onEncryptionChanged (const std::shared_ptr &session, bool activated, const std::string &authToken) override; + void onCallSessionStateChangedForReporting (const std::shared_ptr &session) override; + void onRtcpUpdateForReporting (const std::shared_ptr &session, SalStreamType type) override; + void onStatsUpdated (const std::shared_ptr &session, const LinphoneCallStats *stats) override; + void onUpdateMediaInfoForReporting (const std::shared_ptr &session, int statsType) override; + void onResetCurrentSession (const std::shared_ptr &session) override; + void onSetCurrentSession (const std::shared_ptr &session) override; + void onFirstVideoFrameDecoded (const std::shared_ptr &session) override; + void onResetFirstVideoFrameDecoded (const std::shared_ptr &session) override; + void onPlayErrorTone (const std::shared_ptr &session, LinphoneReason reason) override; + void onRingbackToneRequested (const std::shared_ptr &session, bool requested) override; + void onStartRinging (const std::shared_ptr &session) override; + void onStopRinging (const std::shared_ptr &session) override; + void onStopRingingIfInCall (const std::shared_ptr &session) override; + void onStopRingingIfNeeded (const std::shared_ptr &session) override; + bool areSoundResourcesAvailable (const std::shared_ptr &session) override; + bool isPlayingRingbackTone (const std::shared_ptr &session) override; + void onRealTimeTextCharacterReceived (const std::shared_ptr &session, RealtimeTextReceivedCharacter *character) override; mutable LinphonePlayer *player = nullptr; diff --git a/src/call/call.cpp b/src/call/call.cpp index 6153c3848..9cd36d9ed 100644 --- a/src/call/call.cpp +++ b/src/call/call.cpp @@ -187,25 +187,25 @@ void CallPrivate::terminateBecauseOfLostMedia () { // ----------------------------------------------------------------------------- -void CallPrivate::onAckBeingSent (const shared_ptr &session, LinphoneHeaders *headers) { +void CallPrivate::onAckBeingSent (const shared_ptr &session, LinphoneHeaders *headers) { L_Q(); linphone_call_notify_ack_processing(L_GET_C_BACK_PTR(q), headers, false); } -void CallPrivate::onAckReceived (const shared_ptr &session, LinphoneHeaders *headers) { +void CallPrivate::onAckReceived (const shared_ptr &session, LinphoneHeaders *headers) { L_Q(); linphone_call_notify_ack_processing(L_GET_C_BACK_PTR(q), headers, true); } -void CallPrivate::onBackgroundTaskToBeStarted (const shared_ptr &session) { +void CallPrivate::onBackgroundTaskToBeStarted (const shared_ptr &session) { bgTask.start(); } -void CallPrivate::onBackgroundTaskToBeStopped (const shared_ptr &session) { +void CallPrivate::onBackgroundTaskToBeStopped (const shared_ptr &session) { bgTask.stop(); } -bool CallPrivate::onCallSessionAccepted (const shared_ptr &session) { +bool CallPrivate::onCallSessionAccepted (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); bool wasRinging = false; @@ -226,21 +226,21 @@ bool CallPrivate::onCallSessionAccepted (const shared_ptr &se return wasRinging; } -void CallPrivate::onCallSessionConferenceStreamStarting (const shared_ptr &session, bool mute) { +void CallPrivate::onCallSessionConferenceStreamStarting (const shared_ptr &session, bool mute) { L_Q(); if (q->getCore()->getCCore()->conf_ctx) { linphone_conference_on_call_stream_starting(q->getCore()->getCCore()->conf_ctx, L_GET_C_BACK_PTR(q), mute); } } -void CallPrivate::onCallSessionConferenceStreamStopping (const shared_ptr &session) { +void CallPrivate::onCallSessionConferenceStreamStopping (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); if (lc->conf_ctx && _linphone_call_get_endpoint(L_GET_C_BACK_PTR(q))) linphone_conference_on_call_stream_stopping(lc->conf_ctx, L_GET_C_BACK_PTR(q)); } -void CallPrivate::onCallSessionEarlyFailed (const shared_ptr &session, LinphoneErrorInfo *ei) { +void CallPrivate::onCallSessionEarlyFailed (const shared_ptr &session, LinphoneErrorInfo *ei) { L_Q(); LinphoneCallLog *log = session->getLog(); linphone_core_report_early_failed_call(q->getCore()->getCCore(), @@ -251,12 +251,12 @@ void CallPrivate::onCallSessionEarlyFailed (const shared_ptr linphone_call_unref(L_GET_C_BACK_PTR(q)); } -void CallPrivate::onCallSessionSetReleased (const shared_ptr &session) { +void CallPrivate::onCallSessionSetReleased (const shared_ptr &session) { L_Q(); linphone_call_unref(L_GET_C_BACK_PTR(q)); } -void CallPrivate::onCallSessionSetTerminated (const shared_ptr &session) { +void CallPrivate::onCallSessionSetTerminated (const shared_ptr &session) { L_Q(); LinphoneCore *core = q->getCore()->getCCore(); if (q->getSharedFromThis() == q->getCore()->getCurrentCall()) { @@ -279,21 +279,21 @@ void CallPrivate::onCallSessionSetTerminated (const shared_ptrbw_controller); } -void CallPrivate::onCallSessionStartReferred (const shared_ptr &session) { +void CallPrivate::onCallSessionStartReferred (const shared_ptr &session) { startReferredCall(nullptr); } -void CallPrivate::onCallSessionStateChanged (const shared_ptr &session, CallSession::State state, const string &message) { +void CallPrivate::onCallSessionStateChanged (const shared_ptr &session, CallSession::State state, const string &message) { L_Q(); linphone_call_notify_state_changed(L_GET_C_BACK_PTR(q), static_cast(state), message.c_str()); } -void CallPrivate::onCallSessionTransferStateChanged (const shared_ptr &session, CallSession::State state) { +void CallPrivate::onCallSessionTransferStateChanged (const shared_ptr &session, CallSession::State state) { L_Q(); linphone_call_notify_transfer_state_changed(L_GET_C_BACK_PTR(q), static_cast(state)); } -void CallPrivate::onCheckForAcceptation (const shared_ptr &session) { +void CallPrivate::onCheckForAcceptation (const shared_ptr &session) { L_Q(); LinphoneCall *lcall = L_GET_C_BACK_PTR(q); bctbx_list_t *copy = bctbx_list_copy(linphone_core_get_calls(q->getCore()->getCCore())); @@ -316,23 +316,23 @@ void CallPrivate::onCheckForAcceptation (const shared_ptr &se bctbx_list_free(copy); } -void CallPrivate::onDtmfReceived (const shared_ptr &session, char dtmf) { +void CallPrivate::onDtmfReceived (const shared_ptr &session, char dtmf) { L_Q(); linphone_call_notify_dtmf_received(L_GET_C_BACK_PTR(q), dtmf); } -void CallPrivate::onIncomingCallSessionNotified (const shared_ptr &session) { +void CallPrivate::onIncomingCallSessionNotified (const shared_ptr &session) { L_Q(); /* The call is acceptable so we can now add it to our list */ q->getCore()->getPrivate()->addCall(q->getSharedFromThis()); } -void CallPrivate::onIncomingCallSessionStarted (const shared_ptr &session) { +void CallPrivate::onIncomingCallSessionStarted (const shared_ptr &session) { L_Q(); linphone_core_notify_incoming_call(q->getCore()->getCCore(), L_GET_C_BACK_PTR(q)); } -void CallPrivate::onIncomingCallSessionTimeoutCheck (const shared_ptr &session, int elapsed, bool oneSecondElapsed) { +void CallPrivate::onIncomingCallSessionTimeoutCheck (const shared_ptr &session, int elapsed, bool oneSecondElapsed) { L_Q(); if (oneSecondElapsed) lInfo() << "Incoming call ringing for " << elapsed << " seconds"; @@ -344,12 +344,12 @@ void CallPrivate::onIncomingCallSessionTimeoutCheck (const shared_ptr &session, const LinphoneInfoMessage *im) { +void CallPrivate::onInfoReceived (const shared_ptr &session, const LinphoneInfoMessage *im) { L_Q(); linphone_call_notify_info_message_received(L_GET_C_BACK_PTR(q), im); } -void CallPrivate::onNoMediaTimeoutCheck (const shared_ptr &session, bool oneSecondElapsed) { +void CallPrivate::onNoMediaTimeoutCheck (const shared_ptr &session, bool oneSecondElapsed) { L_Q(); int disconnectTimeout = linphone_core_get_nortp_timeout(q->getCore()->getCCore()); bool disconnected = false; @@ -361,42 +361,42 @@ void CallPrivate::onNoMediaTimeoutCheck (const shared_ptr &se terminateBecauseOfLostMedia(); } -void CallPrivate::onEncryptionChanged (const shared_ptr &session, bool activated, const string &authToken) { +void CallPrivate::onEncryptionChanged (const shared_ptr &session, bool activated, const string &authToken) { L_Q(); linphone_call_notify_encryption_changed(L_GET_C_BACK_PTR(q), activated, authToken.empty() ? nullptr : authToken.c_str()); } -void CallPrivate::onCallSessionStateChangedForReporting (const shared_ptr &session) { +void CallPrivate::onCallSessionStateChangedForReporting (const shared_ptr &session) { L_Q(); linphone_reporting_call_state_updated(L_GET_C_BACK_PTR(q)); } -void CallPrivate::onRtcpUpdateForReporting (const shared_ptr &session, SalStreamType type) { +void CallPrivate::onRtcpUpdateForReporting (const shared_ptr &session, SalStreamType type) { L_Q(); linphone_reporting_on_rtcp_update(L_GET_C_BACK_PTR(q), type); } -void CallPrivate::onStatsUpdated (const shared_ptr &session, const LinphoneCallStats *stats) { +void CallPrivate::onStatsUpdated (const shared_ptr &session, const LinphoneCallStats *stats) { L_Q(); linphone_call_notify_stats_updated(L_GET_C_BACK_PTR(q), stats); } -void CallPrivate::onUpdateMediaInfoForReporting (const std::shared_ptr &session, int statsType) { +void CallPrivate::onUpdateMediaInfoForReporting (const shared_ptr &session, int statsType) { L_Q(); linphone_reporting_update_media_info(L_GET_C_BACK_PTR(q), statsType); } -void CallPrivate::onResetCurrentSession (const shared_ptr &session) { +void CallPrivate::onResetCurrentSession (const shared_ptr &session) { L_Q(); q->getCore()->getPrivate()->setCurrentCall(nullptr); } -void CallPrivate::onSetCurrentSession (const shared_ptr &session) { +void CallPrivate::onSetCurrentSession (const shared_ptr &session) { L_Q(); q->getCore()->getPrivate()->setCurrentCall(q->getSharedFromThis()); } -void CallPrivate::onFirstVideoFrameDecoded (const shared_ptr &session) { +void CallPrivate::onFirstVideoFrameDecoded (const shared_ptr &session) { L_Q(); if (nextVideoFrameDecoded._func) { nextVideoFrameDecoded._func(L_GET_C_BACK_PTR(q), nextVideoFrameDecoded._user_data); @@ -405,16 +405,16 @@ void CallPrivate::onFirstVideoFrameDecoded (const shared_ptr } } -void CallPrivate::onResetFirstVideoFrameDecoded (const shared_ptr &session) { +void CallPrivate::onResetFirstVideoFrameDecoded (const shared_ptr &session) { resetFirstVideoFrameDecoded(); } -void CallPrivate::onPlayErrorTone (const shared_ptr &session, LinphoneReason reason) { +void CallPrivate::onPlayErrorTone (const shared_ptr &session, LinphoneReason reason) { L_Q(); linphone_core_play_call_error_tone(q->getCore()->getCCore(), reason); } -void CallPrivate::onRingbackToneRequested (const shared_ptr &session, bool requested) { +void CallPrivate::onRingbackToneRequested (const shared_ptr &session, bool requested) { L_Q(); if (requested && linphone_core_get_remote_ringback_tone(q->getCore()->getCCore())) playingRingbackTone = true; @@ -422,7 +422,7 @@ void CallPrivate::onRingbackToneRequested (const shared_ptr & playingRingbackTone = false; } -void CallPrivate::onStartRinging (const shared_ptr &session) { +void CallPrivate::onStartRinging (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); if (lc->ringstream) @@ -430,12 +430,12 @@ void CallPrivate::onStartRinging (const shared_ptr &session) startRemoteRing(); } -void CallPrivate::onStopRinging (const shared_ptr &session) { +void CallPrivate::onStopRinging (const shared_ptr &session) { L_Q(); linphone_core_stop_ringing(q->getCore()->getCCore()); } -void CallPrivate::onStopRingingIfInCall (const shared_ptr &session) { +void CallPrivate::onStopRingingIfInCall (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); // We stop the ring only if we have this current call or if we are in call @@ -444,7 +444,7 @@ void CallPrivate::onStopRingingIfInCall (const shared_ptr &se } } -void CallPrivate::onStopRingingIfNeeded (const shared_ptr &session) { +void CallPrivate::onStopRingingIfNeeded (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); bool stopRinging = true; @@ -460,18 +460,18 @@ void CallPrivate::onStopRingingIfNeeded (const shared_ptr &se linphone_core_stop_ringing(lc); } -bool CallPrivate::areSoundResourcesAvailable (const shared_ptr &session) { +bool CallPrivate::areSoundResourcesAvailable (const shared_ptr &session) { L_Q(); LinphoneCore *lc = q->getCore()->getCCore(); shared_ptr currentCall = q->getCore()->getCurrentCall(); return !linphone_core_is_in_conference(lc) && (!currentCall || (currentCall == q->getSharedFromThis())); } -bool CallPrivate::isPlayingRingbackTone (const shared_ptr &session) { +bool CallPrivate::isPlayingRingbackTone (const shared_ptr &session) { return playingRingbackTone; } -void CallPrivate::onRealTimeTextCharacterReceived (const shared_ptr &session, RealtimeTextReceivedCharacter *data) { +void CallPrivate::onRealTimeTextCharacterReceived (const shared_ptr &session, RealtimeTextReceivedCharacter *data) { L_Q(); getChatRoom()->getPrivate()->realtimeTextReceived(data->character, q->getSharedFromThis()); } @@ -538,7 +538,7 @@ LinphoneStatus Call::pause () { return static_pointer_cast(d->getActiveSession())->pause(); } -LinphoneStatus Call::redirect (const std::string &redirectUri) { +LinphoneStatus Call::redirect (const string &redirectUri) { L_D(); return d->getActiveSession()->redirect(redirectUri); } @@ -553,7 +553,7 @@ LinphoneStatus Call::sendDtmf (char dtmf) { return static_pointer_cast(d->getActiveSession())->sendDtmf(dtmf); } -LinphoneStatus Call::sendDtmfs (const std::string &dtmfs) { +LinphoneStatus Call::sendDtmfs (const string &dtmfs) { L_D(); return static_pointer_cast(d->getActiveSession())->sendDtmfs(dtmfs); } @@ -840,7 +840,7 @@ const Address &Call::getToAddress () const { return d->getActiveSession()->getToAddress(); } -string Call::getToHeader (const std::string &name) const { +string Call::getToHeader (const string &name) const { L_D(); return d->getActiveSession()->getToHeader(name); } diff --git a/src/chat/chat-room/basic-to-client-group-chat-room.cpp b/src/chat/chat-room/basic-to-client-group-chat-room.cpp index 827d9b3d9..e75c56337 100644 --- a/src/chat/chat-room/basic-to-client-group-chat-room.cpp +++ b/src/chat/chat-room/basic-to-client-group-chat-room.cpp @@ -77,7 +77,7 @@ public: } void onCallSessionStateChanged ( - const shared_ptr &session, + const shared_ptr &session, CallSession::State newState, const string &message ) override { diff --git a/src/chat/chat-room/client-group-chat-room-p.h b/src/chat/chat-room/client-group-chat-room-p.h index fa51cf8a3..f75a5abac 100644 --- a/src/chat/chat-room/client-group-chat-room-p.h +++ b/src/chat/chat-room/client-group-chat-room-p.h @@ -46,8 +46,8 @@ public: void onChatRoomDeleteRequested (const std::shared_ptr &chatRoom) override; // CallSessionListener - void onCallSessionSetReleased (const std::shared_ptr &session) override; - void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) override; + void onCallSessionSetReleased (const std::shared_ptr &session) override; + void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) override; private: CallSessionListener *callSessionListener = this; diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index 7ff1e7979..36f583820 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -119,7 +119,7 @@ void ClientGroupChatRoomPrivate::onChatRoomDeleteRequested (const shared_ptr &session) { +void ClientGroupChatRoomPrivate::onCallSessionSetReleased (const shared_ptr &session) { L_Q_T(RemoteConference, qConference); ParticipantPrivate *participantPrivate = qConference->getPrivate()->focus->getPrivate(); @@ -128,7 +128,7 @@ void ClientGroupChatRoomPrivate::onCallSessionSetReleased (const shared_ptr &session, + const shared_ptr &session, CallSession::State newState, const string &message ) { diff --git a/src/chat/chat-room/client-group-to-basic-chat-room.cpp b/src/chat/chat-room/client-group-to-basic-chat-room.cpp index e5c31bb8c..7ca4ab61f 100644 --- a/src/chat/chat-room/client-group-to-basic-chat-room.cpp +++ b/src/chat/chat-room/client-group-to-basic-chat-room.cpp @@ -52,14 +52,14 @@ public: setState(AbstractChatRoom::State::Deleted); } - void onCallSessionSetReleased (const std::shared_ptr &session) override { + void onCallSessionSetReleased (const shared_ptr &session) override { if (!(chatRoom->getCapabilities() & ChatRoom::Capabilities::Conference)) return; static_pointer_cast(chatRoom)->getPrivate()->onCallSessionSetReleased(session); } void onCallSessionStateChanged ( - const shared_ptr &session, + const shared_ptr &session, CallSession::State newState, const string &message ) override { @@ -111,7 +111,7 @@ void ClientGroupToBasicChatRoom::addParticipant ( ProxyChatRoom::addParticipant(participantAddress, params, hasMedia); } void ClientGroupToBasicChatRoom::addParticipants ( - const std::list &addresses, + const list &addresses, const CallSessionParams *params, bool hasMedia ) { diff --git a/src/chat/chat-room/server-group-chat-room-p.h b/src/chat/chat-room/server-group-chat-room-p.h index 9d8ec8946..2780e0a08 100644 --- a/src/chat/chat-room/server-group-chat-room-p.h +++ b/src/chat/chat-room/server-group-chat-room-p.h @@ -45,6 +45,7 @@ public: ParticipantDevice::State getParticipantDeviceState (const std::shared_ptr &device) const; void setParticipantDeviceState (const std::shared_ptr &device, ParticipantDevice::State state); + void acceptSession (const std::shared_ptr &session); void confirmCreation (); void confirmJoining (SalCallOp *op); void confirmRecreation (SalCallOp *op); @@ -93,7 +94,7 @@ private: // CallSessionListener void onCallSessionStateChanged ( - const std::shared_ptr &session, + const std::shared_ptr &session, CallSession::State newState, const std::string &message ) override; diff --git a/src/chat/chat-room/server-group-chat-room-stub.cpp b/src/chat/chat-room/server-group-chat-room-stub.cpp index 23ea6d49b..57a4d2491 100644 --- a/src/chat/chat-room/server-group-chat-room-stub.cpp +++ b/src/chat/chat-room/server-group-chat-room-stub.cpp @@ -52,6 +52,8 @@ void ServerGroupChatRoomPrivate::setParticipantDeviceState (const std::shared_pt // ----------------------------------------------------------------------------- +void ServerGroupChatRoomPrivate::acceptSession (const shared_ptr &session) {} + void ServerGroupChatRoomPrivate::confirmCreation () {} void ServerGroupChatRoomPrivate::confirmJoining (SalCallOp *) {} @@ -117,7 +119,7 @@ void ServerGroupChatRoomPrivate::onChatRoomDeleteRequested (const shared_ptr &, + const shared_ptr &, CallSession::State, const string & ) {} diff --git a/src/conference/session/call-session-listener.h b/src/conference/session/call-session-listener.h index 65f76eeb6..a334614ea 100644 --- a/src/conference/session/call-session-listener.h +++ b/src/conference/session/call-session-listener.h @@ -34,51 +34,51 @@ class LINPHONE_PUBLIC CallSessionListener { public: virtual ~CallSessionListener() = default; - virtual void onAckBeingSent (const std::shared_ptr &session, LinphoneHeaders *headers) {} - virtual void onAckReceived (const std::shared_ptr &session, LinphoneHeaders *headers) {} - virtual void onBackgroundTaskToBeStarted (const std::shared_ptr &session) {} - virtual void onBackgroundTaskToBeStopped (const std::shared_ptr &session) {} - virtual bool onCallSessionAccepted (const std::shared_ptr &session) { return false; } - virtual void onCallSessionConferenceStreamStarting (const std::shared_ptr &session, bool mute) {} - virtual void onCallSessionConferenceStreamStopping (const std::shared_ptr &session) {} - virtual void onCallSessionEarlyFailed (const std::shared_ptr &session, LinphoneErrorInfo *ei) {} - virtual void onCallSessionSetReleased (const std::shared_ptr &session) {} - virtual void onCallSessionSetTerminated (const std::shared_ptr &session) {} - virtual void onCallSessionStartReferred (const std::shared_ptr &session) {} - virtual void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) {} - virtual void onCallSessionTransferStateChanged (const std::shared_ptr &session, CallSession::State state) {} - virtual void onCheckForAcceptation (const std::shared_ptr &session) {} - virtual void onDtmfReceived (const std::shared_ptr &session, char dtmf) {} - virtual void onIncomingCallSessionNotified (const std::shared_ptr &session) {} - virtual void onIncomingCallSessionStarted (const std::shared_ptr &session) {} - virtual void onIncomingCallSessionTimeoutCheck (const std::shared_ptr &session, int elapsed, bool oneSecondElapsed) {} - virtual void onInfoReceived (const std::shared_ptr &session, const LinphoneInfoMessage *im) {} - virtual void onNoMediaTimeoutCheck (const std::shared_ptr &session, bool oneSecondElapsed) {} + virtual void onAckBeingSent (const std::shared_ptr &session, LinphoneHeaders *headers) {} + virtual void onAckReceived (const std::shared_ptr &session, LinphoneHeaders *headers) {} + virtual void onBackgroundTaskToBeStarted (const std::shared_ptr &session) {} + virtual void onBackgroundTaskToBeStopped (const std::shared_ptr &session) {} + virtual bool onCallSessionAccepted (const std::shared_ptr &session) { return false; } + virtual void onCallSessionConferenceStreamStarting (const std::shared_ptr &session, bool mute) {} + virtual void onCallSessionConferenceStreamStopping (const std::shared_ptr &session) {} + virtual void onCallSessionEarlyFailed (const std::shared_ptr &session, LinphoneErrorInfo *ei) {} + virtual void onCallSessionSetReleased (const std::shared_ptr &session) {} + virtual void onCallSessionSetTerminated (const std::shared_ptr &session) {} + virtual void onCallSessionStartReferred (const std::shared_ptr &session) {} + virtual void onCallSessionStateChanged (const std::shared_ptr &session, CallSession::State state, const std::string &message) {} + virtual void onCallSessionTransferStateChanged (const std::shared_ptr &session, CallSession::State state) {} + virtual void onCheckForAcceptation (const std::shared_ptr &session) {} + virtual void onDtmfReceived (const std::shared_ptr &session, char dtmf) {} + virtual void onIncomingCallSessionNotified (const std::shared_ptr &session) {} + virtual void onIncomingCallSessionStarted (const std::shared_ptr &session) {} + virtual void onIncomingCallSessionTimeoutCheck (const std::shared_ptr &session, int elapsed, bool oneSecondElapsed) {} + virtual void onInfoReceived (const std::shared_ptr &session, const LinphoneInfoMessage *im) {} + virtual void onNoMediaTimeoutCheck (const std::shared_ptr &session, bool oneSecondElapsed) {} - virtual void onEncryptionChanged (const std::shared_ptr &session, bool activated, const std::string &authToken) {} + virtual void onEncryptionChanged (const std::shared_ptr &session, bool activated, const std::string &authToken) {} - virtual void onCallSessionStateChangedForReporting (const std::shared_ptr &session) {} - virtual void onRtcpUpdateForReporting (const std::shared_ptr &session, SalStreamType type) {} - virtual void onStatsUpdated (const std::shared_ptr &session, const LinphoneCallStats *stats) {} - virtual void onUpdateMediaInfoForReporting (const std::shared_ptr &session, int statsType) {} + virtual void onCallSessionStateChangedForReporting (const std::shared_ptr &session) {} + virtual void onRtcpUpdateForReporting (const std::shared_ptr &session, SalStreamType type) {} + virtual void onStatsUpdated (const std::shared_ptr &session, const LinphoneCallStats *stats) {} + virtual void onUpdateMediaInfoForReporting (const std::shared_ptr &session, int statsType) {} - virtual void onResetCurrentSession (const std::shared_ptr &session) {} - virtual void onSetCurrentSession (const std::shared_ptr &session) {} + virtual void onResetCurrentSession (const std::shared_ptr &session) {} + virtual void onSetCurrentSession (const std::shared_ptr &session) {} - virtual void onFirstVideoFrameDecoded (const std::shared_ptr &session) {} - virtual void onResetFirstVideoFrameDecoded (const std::shared_ptr &session) {} + virtual void onFirstVideoFrameDecoded (const std::shared_ptr &session) {} + virtual void onResetFirstVideoFrameDecoded (const std::shared_ptr &session) {} - virtual void onPlayErrorTone (const std::shared_ptr &session, LinphoneReason reason) {} - virtual void onRingbackToneRequested (const std::shared_ptr &session, bool requested) {} - virtual void onStartRinging (const std::shared_ptr &session) {} - virtual void onStopRinging (const std::shared_ptr &session) {} - virtual void onStopRingingIfInCall (const std::shared_ptr &session) {} - virtual void onStopRingingIfNeeded (const std::shared_ptr &session) {} + virtual void onPlayErrorTone (const std::shared_ptr &session, LinphoneReason reason) {} + virtual void onRingbackToneRequested (const std::shared_ptr &session, bool requested) {} + virtual void onStartRinging (const std::shared_ptr &session) {} + virtual void onStopRinging (const std::shared_ptr &session) {} + virtual void onStopRingingIfInCall (const std::shared_ptr &session) {} + virtual void onStopRingingIfNeeded (const std::shared_ptr &session) {} - virtual bool areSoundResourcesAvailable (const std::shared_ptr &session) { return true; } - virtual bool isPlayingRingbackTone (const std::shared_ptr &session) { return false; } + virtual bool areSoundResourcesAvailable (const std::shared_ptr &session) { return true; } + virtual bool isPlayingRingbackTone (const std::shared_ptr &session) { return false; } - virtual void onRealTimeTextCharacterReceived (const std::shared_ptr &session, RealtimeTextReceivedCharacter *data) {} + virtual void onRealTimeTextCharacterReceived (const std::shared_ptr &session, RealtimeTextReceivedCharacter *data) {} }; LINPHONE_END_NAMESPACE diff --git a/src/conference/session/call-session-p.h b/src/conference/session/call-session-p.h index 091fd20ca..8ad819ce7 100644 --- a/src/conference/session/call-session-p.h +++ b/src/conference/session/call-session-p.h @@ -75,7 +75,7 @@ protected: void accept (const CallSessionParams *params); virtual LinphoneStatus acceptUpdate (const CallSessionParams *csp, CallSession::State nextState, const std::string &stateInfo); - LinphoneStatus checkForAcceptation () const; + LinphoneStatus checkForAcceptation (); virtual void handleIncomingReceivedStateInIncomingNotification (); virtual bool isReadyForInvite () const; bool isUpdateAllowed (CallSession::State &nextState) const; diff --git a/src/conference/session/call-session.cpp b/src/conference/session/call-session.cpp index 944fb8b91..1e640f584 100644 --- a/src/conference/session/call-session.cpp +++ b/src/conference/session/call-session.cpp @@ -521,7 +521,7 @@ LinphoneStatus CallSessionPrivate::acceptUpdate (const CallSessionParams *csp, C return startAcceptUpdate(nextState, stateInfo); } -LinphoneStatus CallSessionPrivate::checkForAcceptation () const { +LinphoneStatus CallSessionPrivate::checkForAcceptation () { L_Q(); switch (state) { case CallSession::State::IncomingReceived: diff --git a/src/conference/session/call-session.h b/src/conference/session/call-session.h index 4fc531734..563ca89bb 100644 --- a/src/conference/session/call-session.h +++ b/src/conference/session/call-session.h @@ -57,7 +57,7 @@ public: virtual ~CallSession (); LinphoneStatus accept (const CallSessionParams *csp = nullptr); - LinphoneStatus acceptUpdate (const CallSessionParams *csp); + LinphoneStatus acceptUpdate (const CallSessionParams *csp = nullptr); virtual void configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg, SalCallOp *op, const Address &from, const Address &to); LinphoneStatus decline (LinphoneReason reason); LinphoneStatus decline (const LinphoneErrorInfo *ei); diff --git a/src/conference/session/media-session-p.h b/src/conference/session/media-session-p.h index a4ba68257..a238078c1 100644 --- a/src/conference/session/media-session-p.h +++ b/src/conference/session/media-session-p.h @@ -135,7 +135,7 @@ private: void updateRemoteSessionIdAndVer (); void initStats (LinphoneCallStats *stats, LinphoneStreamType type); - void notifyStatsUpdated (int streamIndex) const; + void notifyStatsUpdated (int streamIndex); OrtpEvQueue *getEventQueue (int streamIndex) const; MediaStream *getMediaStream (int streamIndex) const; diff --git a/src/conference/session/media-session.cpp b/src/conference/session/media-session.cpp index 89ab3d443..c21b2fa22 100644 --- a/src/conference/session/media-session.cpp +++ b/src/conference/session/media-session.cpp @@ -933,7 +933,7 @@ void MediaSessionPrivate::initStats (LinphoneCallStats *stats, LinphoneStreamTyp _linphone_call_stats_set_ice_state(stats, LinphoneIceStateNotActivated); } -void MediaSessionPrivate::notifyStatsUpdated (int streamIndex) const { +void MediaSessionPrivate::notifyStatsUpdated (int streamIndex) { L_Q(); LinphoneCallStats *stats = nullptr; if (streamIndex == mainAudioStreamIndex)