diff --git a/include/linphone/api/c-event-log.h b/include/linphone/api/c-event-log.h index 4a13f21d6..c3f9e67c6 100644 --- a/include/linphone/api/c-event-log.h +++ b/include/linphone/api/c-event-log.h @@ -83,13 +83,6 @@ LINPHONE_PUBLIC const LinphoneAddress *linphone_event_log_get_conference_address */ LINPHONE_PUBLIC unsigned int linphone_event_log_get_notify_id (const LinphoneEventLog *event_log); -/** - * Returns whether or not the event comes from a full state notify. - * @param[in] event_log A #LinphoneEventLog object. - * @return whether or not the event comes from a full state notify. - */ -LINPHONE_PUBLIC bool_t linphone_event_log_is_full_state (const LinphoneEventLog *event_log); - // ----------------------------------------------------------------------------- // ConferenceCallEvent. // ----------------------------------------------------------------------------- diff --git a/src/c-wrapper/api/c-event-log.cpp b/src/c-wrapper/api/c-event-log.cpp index a9514ee67..132982327 100644 --- a/src/c-wrapper/api/c-event-log.cpp +++ b/src/c-wrapper/api/c-event-log.cpp @@ -193,15 +193,6 @@ unsigned int linphone_event_log_get_notify_id (const LinphoneEventLog *event_log )->getNotifyId(); } -bool_t linphone_event_log_is_full_state (const LinphoneEventLog *event_log) { - if (!isConferenceNotifiedType(linphone_event_log_get_type(event_log))) - return FALSE; - - return static_pointer_cast( - L_GET_CPP_PTR_FROM_C_OBJECT(event_log) - )->isFullState(); -} - // ----------------------------------------------------------------------------- // ConferenceCallEvent. // ----------------------------------------------------------------------------- diff --git a/src/chat/chat-room/client-group-chat-room.cpp b/src/chat/chat-room/client-group-chat-room.cpp index b5430c0e5..329ef2c8c 100644 --- a/src/chat/chat-room/client-group-chat-room.cpp +++ b/src/chat/chat-room/client-group-chat-room.cpp @@ -263,7 +263,7 @@ void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) { d->setState(ChatRoom::State::Terminated); } -void ClientGroupChatRoom::onParticipantAdded (shared_ptr event) { +void ClientGroupChatRoom::onParticipantAdded (const shared_ptr &event, bool isFullState) { L_D_T(RemoteConference, dConference); const Address &addr = event->getParticipantAddress(); @@ -278,6 +278,10 @@ void ClientGroupChatRoom::onParticipantAdded (shared_ptr(addr); dConference->participants.push_back(participant); + + if (isFullState) + return; + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbsParticipantAddedCb cb = linphone_chat_room_cbs_get_participant_added(cbs); @@ -287,7 +291,9 @@ void ClientGroupChatRoom::onParticipantAdded (shared_ptr event) { +void ClientGroupChatRoom::onParticipantRemoved (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused + L_D_T(RemoteConference, dConference); const Address &addr = event->getParticipantAddress(); @@ -308,7 +314,7 @@ void ClientGroupChatRoom::onParticipantRemoved (shared_ptrparticipants.remove(participant); } -void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr event) { +void ClientGroupChatRoom::onParticipantSetAdmin (const shared_ptr &event, bool isFullState) { const Address &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) @@ -325,6 +331,9 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptrgetPrivate()->setAdmin(isAdmin); + if (isFullState) + return; + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs); @@ -334,11 +343,14 @@ void ClientGroupChatRoom::onParticipantSetAdmin (shared_ptr event) { +void ClientGroupChatRoom::onSubjectChanged (const shared_ptr &event, bool isFullState) { if (getSubject() == event->getSubject()) return; // No change in the local subject, do not notify RemoteConference::setSubject(event->getSubject()); + if (isFullState) + return; + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbsSubjectChangedCb cb = linphone_chat_room_cbs_get_subject_changed(cbs); @@ -348,7 +360,7 @@ void ClientGroupChatRoom::onSubjectChanged (shared_ptr e cb(cr, L_GET_C_BACK_PTR(event)); } -void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptr event) { +void ClientGroupChatRoom::onParticipantDeviceAdded (const shared_ptr &event, bool isFullState) { const Address &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) @@ -360,6 +372,10 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptrgetPrivate()->addDevice(event->getGruuAddress()); + + if (isFullState) + return; + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this); LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); LinphoneChatRoomCbsParticipantDeviceAddedCb cb = linphone_chat_room_cbs_get_participant_device_added(cbs); @@ -369,7 +385,9 @@ void ClientGroupChatRoom::onParticipantDeviceAdded (shared_ptr event) { +void ClientGroupChatRoom::onParticipantDeviceRemoved (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused + const Address &addr = event->getParticipantAddress(); shared_ptr participant; if (isMe(addr)) diff --git a/src/chat/chat-room/client-group-chat-room.h b/src/chat/chat-room/client-group-chat-room.h index 9d96aac54..d9a3f0dc4 100644 --- a/src/chat/chat-room/client-group-chat-room.h +++ b/src/chat/chat-room/client-group-chat-room.h @@ -64,12 +64,12 @@ private: /* ConferenceListener */ void onConferenceCreated (const Address &addr) override; void onConferenceTerminated (const Address &addr) override; - void onParticipantAdded (std::shared_ptr event) override; - void onParticipantRemoved (std::shared_ptr event) override; - void onParticipantSetAdmin (std::shared_ptr event) override; - void onSubjectChanged (std::shared_ptr event) override; - void onParticipantDeviceAdded (std::shared_ptr event) override; - void onParticipantDeviceRemoved (std::shared_ptr event) override; + void onParticipantAdded (const std::shared_ptr &event, bool isFullState) override; + void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) override; + void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) override; + void onSubjectChanged (const std::shared_ptr &event, bool isFullState) override; + void onParticipantDeviceAdded (const std::shared_ptr &event, bool isFullState) override; + void onParticipantDeviceRemoved (const std::shared_ptr &event, bool isFullState) override; private: /* CallSessionListener */ diff --git a/src/conference/conference-listener.h b/src/conference/conference-listener.h index fe0dbc90d..de5e4604c 100644 --- a/src/conference/conference-listener.h +++ b/src/conference/conference-listener.h @@ -23,9 +23,10 @@ #include #include -#include "event-log/events.h" #include "linphone/utils/general.h" +#include "event-log/events.h" + // ============================================================================= LINPHONE_BEGIN_NAMESPACE @@ -36,12 +37,12 @@ class ConferenceListener { public: virtual void onConferenceCreated (const Address &addr) = 0; virtual void onConferenceTerminated (const Address &addr) = 0; - virtual void onParticipantAdded (std::shared_ptr event) = 0; - virtual void onParticipantRemoved (std::shared_ptr event) = 0; - virtual void onParticipantSetAdmin (std::shared_ptr event) = 0; - virtual void onSubjectChanged (std::shared_ptr event) = 0; - virtual void onParticipantDeviceAdded (std::shared_ptr event) = 0; - virtual void onParticipantDeviceRemoved (std::shared_ptr event) = 0; + virtual void onParticipantAdded (const std::shared_ptr &event, bool isFullState) = 0; + virtual void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) = 0; + virtual void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) = 0; + virtual void onSubjectChanged (const std::shared_ptr &event, bool isFullState) = 0; + virtual void onParticipantDeviceAdded (const std::shared_ptr &event, bool isFullState) = 0; + virtual void onParticipantDeviceRemoved (const std::shared_ptr &event, bool isFullState) = 0; }; LINPHONE_END_NAMESPACE diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index aa79c5fcb..7578c9b82 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -89,13 +89,15 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) { confInfo->getConferenceDescription().present() && confInfo->getConferenceDescription().get().getSubject().present() ) - d->listener->onSubjectChanged(make_shared( - tm, - isFullState, - d->confAddress, - d->lastNotify, - confInfo->getConferenceDescription().get().getSubject().get() - )); + d->listener->onSubjectChanged( + make_shared( + tm, + d->confAddress, + d->lastNotify, + confInfo->getConferenceDescription().get().getSubject().get() + ), + isFullState + ); if (confInfo->getVersion().present()) d->lastNotify = confInfo->getVersion().get(); @@ -108,14 +110,16 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) { Address addr(cAddrStr); bctbx_free(cAddrStr); if (user.getState() == StateType::deleted) { - d->listener->onParticipantRemoved(make_shared( - EventLog::Type::ConferenceParticipantRemoved, - tm, - isFullState, - d->confAddress, - d->lastNotify, - addr - )); + d->listener->onParticipantRemoved( + make_shared( + EventLog::Type::ConferenceParticipantRemoved, + tm, + d->confAddress, + d->lastNotify, + addr + ), + isFullState + ); } else { bool isAdmin = false; if (user.getRoles()) { @@ -126,49 +130,60 @@ void RemoteConferenceEventHandler::notifyReceived (const string &xmlBody) { } } } + if (user.getState() == StateType::full) { - d->listener->onParticipantAdded(make_shared( - EventLog::Type::ConferenceParticipantAdded, + d->listener->onParticipantAdded( + make_shared( + EventLog::Type::ConferenceParticipantAdded, + tm, + d->confAddress, + d->lastNotify, + addr + ), + isFullState + ); + } + + d->listener->onParticipantSetAdmin( + make_shared( + isAdmin ? EventLog::Type::ConferenceParticipantSetAdmin : EventLog::Type::ConferenceParticipantUnsetAdmin, tm, - isFullState, d->confAddress, d->lastNotify, addr - )); - } - d->listener->onParticipantSetAdmin(make_shared( - isAdmin ? EventLog::Type::ConferenceParticipantSetAdmin : EventLog::Type::ConferenceParticipantUnsetAdmin, - tm, - isFullState, - d->confAddress, - d->lastNotify, - addr - )); + ), + isFullState + ); + for (const auto &endpoint : user.getEndpoint()) { if (!endpoint.getEntity().present()) break; Address gruu(endpoint.getEntity().get()); if (endpoint.getState() == StateType::deleted) { - d->listener->onParticipantDeviceRemoved(make_shared( - EventLog::Type::ConferenceParticipantDeviceRemoved, - tm, - isFullState, - d->confAddress, - d->lastNotify, - addr, - gruu - )); + d->listener->onParticipantDeviceRemoved( + make_shared( + EventLog::Type::ConferenceParticipantDeviceRemoved, + tm, + d->confAddress, + d->lastNotify, + addr, + gruu + ), + isFullState + ); } else if (endpoint.getState() == StateType::full) { - d->listener->onParticipantDeviceAdded(make_shared( - EventLog::Type::ConferenceParticipantDeviceAdded, - tm, - isFullState, - d->confAddress, - d->lastNotify, - addr, - gruu - )); + d->listener->onParticipantDeviceAdded( + make_shared( + EventLog::Type::ConferenceParticipantDeviceAdded, + tm, + d->confAddress, + d->lastNotify, + addr, + gruu + ), + isFullState + ); } } } diff --git a/src/conference/remote-conference.cpp b/src/conference/remote-conference.cpp index 68b6b990f..4ace4ee14 100644 --- a/src/conference/remote-conference.cpp +++ b/src/conference/remote-conference.cpp @@ -89,16 +89,34 @@ void RemoteConference::onConferenceTerminated (const Address &addr) { d->eventHandler->unsubscribe(); } -void RemoteConference::onParticipantAdded (std::shared_ptr event) {} +void RemoteConference::onParticipantAdded (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} -void RemoteConference::onParticipantRemoved (std::shared_ptr event) {} +void RemoteConference::onParticipantRemoved (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} -void RemoteConference::onParticipantSetAdmin (std::shared_ptr event) {} +void RemoteConference::onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} -void RemoteConference::onSubjectChanged (std::shared_ptr event) {} +void RemoteConference::onSubjectChanged (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} -void RemoteConference::onParticipantDeviceAdded (std::shared_ptr event) {} +void RemoteConference::onParticipantDeviceAdded (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} -void RemoteConference::onParticipantDeviceRemoved (std::shared_ptr event) {} +void RemoteConference::onParticipantDeviceRemoved (const std::shared_ptr &event, bool isFullState) { + (void)event; // unused + (void)isFullState; // unused +} LINPHONE_END_NAMESPACE diff --git a/src/conference/remote-conference.h b/src/conference/remote-conference.h index 9b4e40c8d..0567160a2 100644 --- a/src/conference/remote-conference.h +++ b/src/conference/remote-conference.h @@ -46,12 +46,12 @@ protected: /* ConferenceListener */ void onConferenceCreated (const Address &addr) override; void onConferenceTerminated (const Address &addr) override; - void onParticipantAdded (std::shared_ptr event) override; - void onParticipantRemoved (std::shared_ptr event) override; - void onParticipantSetAdmin (std::shared_ptr event) override; - void onSubjectChanged (std::shared_ptr event) override; - void onParticipantDeviceAdded (std::shared_ptr event) override; - void onParticipantDeviceRemoved (std::shared_ptr event) override; + void onParticipantAdded (const std::shared_ptr &event, bool isFullState) override; + void onParticipantRemoved (const std::shared_ptr &event, bool isFullState) override; + void onParticipantSetAdmin (const std::shared_ptr &event, bool isFullState) override; + void onSubjectChanged (const std::shared_ptr &event, bool isFullState) override; + void onParticipantDeviceAdded (const std::shared_ptr &event, bool isFullState) override; + void onParticipantDeviceRemoved (const std::shared_ptr &event, bool isFullState) override; private: L_DECLARE_PRIVATE(RemoteConference); diff --git a/src/db/main-db.cpp b/src/db/main-db.cpp index 8b335d972..cc7c18b6e 100644 --- a/src/db/main-db.cpp +++ b/src/db/main-db.cpp @@ -355,7 +355,6 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), return make_shared( type, date, - false, Address(peerAddress), notifyId, Address(participantAddress) @@ -387,7 +386,6 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), return make_shared( type, date, - false, Address(peerAddress), notifyId, Address(participantAddress), @@ -414,7 +412,6 @@ MainDb::MainDb (const shared_ptr &core) : AbstractDb(*new MainDbPrivate), // TODO: Use cache. return make_shared( date, - false, Address(peerAddress), notifyId, subject diff --git a/src/event-log/conference/conference-notified-event-p.h b/src/event-log/conference/conference-notified-event-p.h index 20f55c352..af5855334 100644 --- a/src/event-log/conference/conference-notified-event-p.h +++ b/src/event-log/conference/conference-notified-event-p.h @@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE class ConferenceNotifiedEventPrivate : public ConferenceEventPrivate { private: unsigned int notifyId = 0; - bool isFullState = false; L_DECLARE_PUBLIC(ConferenceNotifiedEvent); }; diff --git a/src/event-log/conference/conference-notified-event.cpp b/src/event-log/conference/conference-notified-event.cpp index 3eba64c71..5a0e4f857 100644 --- a/src/event-log/conference/conference-notified-event.cpp +++ b/src/event-log/conference/conference-notified-event.cpp @@ -30,26 +30,22 @@ LINPHONE_BEGIN_NAMESPACE ConferenceNotifiedEvent::ConferenceNotifiedEvent ( Type type, time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId ) : ConferenceEvent(*new ConferenceNotifiedEventPrivate, type, time, conferenceAddress) { L_D(); d->notifyId = notifyId; - d->isFullState = isFullState; } ConferenceNotifiedEvent::ConferenceNotifiedEvent ( ConferenceNotifiedEventPrivate &p, Type type, time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId ) : ConferenceEvent(p, type, time, conferenceAddress) { L_D(); d->notifyId = notifyId; - d->isFullState = isFullState; } unsigned int ConferenceNotifiedEvent::getNotifyId () const { @@ -57,9 +53,4 @@ unsigned int ConferenceNotifiedEvent::getNotifyId () const { return d->notifyId; } -bool ConferenceNotifiedEvent::isFullState () const { - L_D(); - return d->isFullState; -} - LINPHONE_END_NAMESPACE diff --git a/src/event-log/conference/conference-notified-event.h b/src/event-log/conference/conference-notified-event.h index bbb765e1d..eca259f49 100644 --- a/src/event-log/conference/conference-notified-event.h +++ b/src/event-log/conference/conference-notified-event.h @@ -32,20 +32,17 @@ class LINPHONE_PUBLIC ConferenceNotifiedEvent : public ConferenceEvent { public: ConferenceNotifiedEvent ( Type type, std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifiyId ); unsigned int getNotifyId () const; - bool isFullState() const; protected: ConferenceNotifiedEvent ( ConferenceNotifiedEventPrivate &p, Type type, std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId ); diff --git a/src/event-log/conference/conference-participant-device-event.cpp b/src/event-log/conference/conference-participant-device-event.cpp index 30850259d..fbfbcceda 100644 --- a/src/event-log/conference/conference-participant-device-event.cpp +++ b/src/event-log/conference/conference-participant-device-event.cpp @@ -36,7 +36,6 @@ public: ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent ( Type type, time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress, @@ -45,7 +44,6 @@ ConferenceParticipantDeviceEvent::ConferenceParticipantDeviceEvent ( *new ConferenceParticipantDeviceEventPrivate, type, time, - isFullState, conferenceAddress, notifyId, participantAddress diff --git a/src/event-log/conference/conference-participant-device-event.h b/src/event-log/conference/conference-participant-device-event.h index 27b315121..d57834dd7 100644 --- a/src/event-log/conference/conference-participant-device-event.h +++ b/src/event-log/conference/conference-participant-device-event.h @@ -33,7 +33,6 @@ public: ConferenceParticipantDeviceEvent ( Type type, std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress, diff --git a/src/event-log/conference/conference-participant-event.cpp b/src/event-log/conference/conference-participant-event.cpp index c5ece237a..29cc92949 100644 --- a/src/event-log/conference/conference-participant-event.cpp +++ b/src/event-log/conference/conference-participant-event.cpp @@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE ConferenceParticipantEvent::ConferenceParticipantEvent ( Type type, time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress @@ -38,7 +37,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent ( *new ConferenceParticipantEventPrivate, type, time, - isFullState, conferenceAddress, notifyId ) { @@ -56,7 +54,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent ( ConferenceParticipantEventPrivate &p, Type type, time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress @@ -64,7 +61,6 @@ ConferenceParticipantEvent::ConferenceParticipantEvent ( p, type, time, - isFullState, conferenceAddress, notifyId ) { diff --git a/src/event-log/conference/conference-participant-event.h b/src/event-log/conference/conference-participant-event.h index ce96da04c..792583dcf 100644 --- a/src/event-log/conference/conference-participant-event.h +++ b/src/event-log/conference/conference-participant-event.h @@ -33,7 +33,6 @@ public: ConferenceParticipantEvent ( Type type, std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress @@ -46,7 +45,6 @@ protected: ConferenceParticipantEventPrivate &p, Type type, std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const Address &participantAddress diff --git a/src/event-log/conference/conference-subject-event.cpp b/src/event-log/conference/conference-subject-event.cpp index 817cb6157..e07061dc2 100644 --- a/src/event-log/conference/conference-subject-event.cpp +++ b/src/event-log/conference/conference-subject-event.cpp @@ -35,7 +35,6 @@ public: ConferenceSubjectEvent::ConferenceSubjectEvent ( time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const string &subject @@ -43,7 +42,6 @@ ConferenceSubjectEvent::ConferenceSubjectEvent ( *new ConferenceSubjectEventPrivate, Type::ConferenceSubjectChanged, time, - isFullState, conferenceAddress, notifyId ) { diff --git a/src/event-log/conference/conference-subject-event.h b/src/event-log/conference/conference-subject-event.h index aced99de5..8ea9a039f 100644 --- a/src/event-log/conference/conference-subject-event.h +++ b/src/event-log/conference/conference-subject-event.h @@ -34,7 +34,6 @@ class LINPHONE_PUBLIC ConferenceSubjectEvent : public ConferenceNotifiedEvent { public: ConferenceSubjectEvent ( std::time_t time, - bool isFullState, const Address &conferenceAddress, unsigned int notifyId, const std::string &subject diff --git a/tester/conference-event-tester.cpp b/tester/conference-event-tester.cpp index 82d797c3a..76fe22e6e 100644 --- a/tester/conference-event-tester.cpp +++ b/tester/conference-event-tester.cpp @@ -447,12 +447,12 @@ public: private: void onConferenceCreated (const Address &addr) override; void onConferenceTerminated (const Address &addr) override; - void onParticipantAdded (shared_ptr event) override; - void onParticipantRemoved (shared_ptr event) override; - void onParticipantSetAdmin (shared_ptr event) override; - void onSubjectChanged (shared_ptr event) override; - void onParticipantDeviceAdded (shared_ptr event) override; - void onParticipantDeviceRemoved (shared_ptr event) override; + void onParticipantAdded (const shared_ptr &event, bool isFullState) override; + void onParticipantRemoved (const shared_ptr &event, bool isFullState) override; + void onParticipantSetAdmin (const shared_ptr &event, bool isFullState) override; + void onSubjectChanged (const shared_ptr &event, bool isFullState) override; + void onParticipantDeviceAdded (const shared_ptr &event, bool isFullState) override; + void onParticipantDeviceRemoved (const shared_ptr &event, bool isFullState) override; public: RemoteConferenceEventHandler *handler; @@ -473,29 +473,34 @@ void ConferenceEventTester::onConferenceCreated (const Address &addr) {} void ConferenceEventTester::onConferenceTerminated (const Address &addr) {} -void ConferenceEventTester::onParticipantAdded (shared_ptr event) { +void ConferenceEventTester::onParticipantAdded (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused const Address addr = event->getParticipantAddress(); participants.insert(pair(addr.asString(), FALSE)); participantDevices.insert(pair(addr.asString(), 0)); } -void ConferenceEventTester::onParticipantRemoved (shared_ptr event) { +void ConferenceEventTester::onParticipantRemoved (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused const Address addr = event->getParticipantAddress(); participants.erase(addr.asString()); participantDevices.erase(addr.asString()); } -void ConferenceEventTester::onParticipantSetAdmin (shared_ptr event) { +void ConferenceEventTester::onParticipantSetAdmin (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused const Address addr = event->getParticipantAddress(); auto it = participants.find(addr.asString()); if (it != participants.end()) it->second = (event->getType() == EventLog::Type::ConferenceParticipantSetAdmin); } -void ConferenceEventTester::onSubjectChanged(shared_ptr event) { +void ConferenceEventTester::onSubjectChanged(const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused confSubject = event->getSubject(); } -void ConferenceEventTester::onParticipantDeviceAdded (shared_ptr event) { +void ConferenceEventTester::onParticipantDeviceAdded (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused const Address addr = event->getParticipantAddress(); auto it = participantDevices.find(addr.asString()); if (it != participantDevices.end()) @@ -503,7 +508,8 @@ void ConferenceEventTester::onParticipantDeviceAdded (shared_ptr event) { +void ConferenceEventTester::onParticipantDeviceRemoved (const shared_ptr &event, bool isFullState) { + (void)isFullState; // unused const Address addr = event->getParticipantAddress(); auto it = participantDevices.find(addr.asString()); if (it != participantDevices.end() && it->second > 0)