diff --git a/include/linphone/api/c-callbacks.h b/include/linphone/api/c-callbacks.h index a1edf51ee..e1d9fd7c9 100644 --- a/include/linphone/api/c-callbacks.h +++ b/include/linphone/api/c-callbacks.h @@ -48,6 +48,28 @@ typedef void (*LinphoneChatRoomCbsIsComposingReceivedCb) (LinphoneChatRoom *cr, */ typedef void (*LinphoneChatRoomCbsMessageReceivedCb) (LinphoneChatRoom *cr, LinphoneChatMessage *msg); +/** + * Callback used to notify a chat room that a participant has been added. + * @param[in] cr #LinphoneChatRoom object + * @param[in] participant The #LinphoneParticipant that has been added to the chat room + */ +typedef void (*LinphoneChatRoomCbsParticipantAddedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant); + +/** + * Callback used to notify a chat room that a participant has been removed. + * @param[in] cr #LinphoneChatRoom object + * @param[in] participant The #LinphoneParticipant that has been removed from the chat room + */ +typedef void (*LinphoneChatRoomCbsParticipantRemovedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant); + +/** + * Callback used to notify a chat room that the admin status of a participant has been changed. + * @param[in] cr #LinphoneChatRoom object + * @param[in] participant The #LinphoneParticipant for which the admin status has been changed + * @param[in] isAdmin The new admin status of the participant + */ +typedef void (*LinphoneChatRoomCbsParticipantAdminStatusChangedCb) (LinphoneChatRoom *cr, LinphoneParticipant *participant, bool_t isAdmin); + /** * Callback used to notify a chat room state has changed. * @param[in] cr #LinphoneChatRoom object diff --git a/include/linphone/api/c-chat-room-cbs.h b/include/linphone/api/c-chat-room-cbs.h index 0c895cecc..aca42d1b2 100644 --- a/include/linphone/api/c-chat-room-cbs.h +++ b/include/linphone/api/c-chat-room-cbs.h @@ -88,6 +88,48 @@ LINPHONE_PUBLIC LinphoneChatRoomCbsMessageReceivedCb linphone_chat_room_cbs_get_ */ LINPHONE_PUBLIC void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsMessageReceivedCb cb); +/** + * Get the participant added callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @return The current participant added callback. + */ +LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAddedCb linphone_chat_room_cbs_get_participant_added (const LinphoneChatRoomCbs *cbs); + +/** + * Set the participant added callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @param[in] cb The participant added callback to be used. + */ +LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAddedCb cb); + +/** + * Get the participant removed callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @return The current participant removed callback. + */ +LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantRemovedCb linphone_chat_room_cbs_get_participant_removed (const LinphoneChatRoomCbs *cbs); + +/** + * Set the participant removed callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @param[in] cb The participant removed callback to be used. + */ +LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRemovedCb cb); + +/** + * Get the participant admin status changed callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @return The current participant admin status changed callback. + */ +LINPHONE_PUBLIC LinphoneChatRoomCbsParticipantAdminStatusChangedCb linphone_chat_room_cbs_get_participant_admin_status_changed (const LinphoneChatRoomCbs *cbs); + +/** + * Set the participant admin status changed callback. + * @param[in] cbs LinphoneChatRoomCbs object. + * @param[in] cb The participant admin status changed callback to be used. + */ +LINPHONE_PUBLIC void linphone_chat_room_cbs_set_participant_admin_status_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb); + /** * Get the state changed callback. * @param[in] cbs LinphoneChatRoomCbs object. diff --git a/src/c-wrapper/api/c-chat-room-cbs.cpp b/src/c-wrapper/api/c-chat-room-cbs.cpp index 04adfabee..f83f5c5ea 100644 --- a/src/c-wrapper/api/c-chat-room-cbs.cpp +++ b/src/c-wrapper/api/c-chat-room-cbs.cpp @@ -28,6 +28,9 @@ struct _LinphoneChatRoomCbs { void *userData; LinphoneChatRoomCbsIsComposingReceivedCb isComposingReceivedCb; LinphoneChatRoomCbsMessageReceivedCb messageReceivedCb; + LinphoneChatRoomCbsParticipantAddedCb participantAddedCb; + LinphoneChatRoomCbsParticipantRemovedCb participantRemovedCb; + LinphoneChatRoomCbsParticipantAdminStatusChangedCb participantAdminStatusChangedCb; LinphoneChatRoomCbsStateChangedCb stateChangedCb; LinphoneChatRoomCbsUndecryptableMessageReceivedCb undecryptableMessageReceivedCb; }; @@ -82,6 +85,30 @@ void linphone_chat_room_cbs_set_message_received (LinphoneChatRoomCbs *cbs, Linp cbs->messageReceivedCb = cb; } +LinphoneChatRoomCbsParticipantAddedCb linphone_chat_room_cbs_get_participant_added (const LinphoneChatRoomCbs *cbs) { + return cbs->participantAddedCb; +} + +void linphone_chat_room_cbs_set_participant_added (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAddedCb cb) { + cbs->participantAddedCb = cb; +} + +LinphoneChatRoomCbsParticipantRemovedCb linphone_chat_room_cbs_get_participant_removed (const LinphoneChatRoomCbs *cbs) { + return cbs->participantRemovedCb; +} + +void linphone_chat_room_cbs_set_participant_removed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantRemovedCb cb) { + cbs->participantRemovedCb = cb; +} + +LinphoneChatRoomCbsParticipantAdminStatusChangedCb linphone_chat_room_cbs_get_participant_admin_status_changed (const LinphoneChatRoomCbs *cbs) { + return cbs->participantAdminStatusChangedCb; +} + +void linphone_chat_room_cbs_set_participant_admin_status_changed (LinphoneChatRoomCbs *cbs, LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb) { + cbs->participantAdminStatusChangedCb = cb; +} + LinphoneChatRoomCbsStateChangedCb linphone_chat_room_cbs_get_state_changed (const LinphoneChatRoomCbs *cbs) { return cbs->stateChangedCb; } diff --git a/src/c-wrapper/api/c-chat-room.cpp b/src/c-wrapper/api/c-chat-room.cpp index 41822299f..f7798f167 100644 --- a/src/c-wrapper/api/c-chat-room.cpp +++ b/src/c-wrapper/api/c-chat-room.cpp @@ -44,7 +44,7 @@ static void _linphone_chat_room_destructor (LinphoneChatRoom *cr); L_DECLARE_C_STRUCT_IMPL_WITH_XTORS(ChatRoom, ChatRoom, chat_room, _linphone_chat_room_constructor, _linphone_chat_room_destructor, - LinphoneChatRoomCbs * cbs; + LinphoneChatRoomCbs *cbs; LinphoneAddress *peerAddressCache; ) diff --git a/src/chat/client-group-chat-room.cpp b/src/chat/client-group-chat-room.cpp index 8878bc7f2..a267eaa57 100644 --- a/src/chat/client-group-chat-room.cpp +++ b/src/chat/client-group-chat-room.cpp @@ -17,11 +17,15 @@ */ #include "client-group-chat-room-p.h" +#include "c-wrapper/c-tools.h" #include "conference/participant-p.h" #include "logger/logger.h" // ============================================================================= +extern LinphoneChatRoom * _linphone_chat_room_init(); +extern LinphoneParticipant * _linphone_participant_init(); + using namespace std; LINPHONE_BEGIN_NAMESPACE @@ -79,4 +83,57 @@ void ClientGroupChatRoom::removeParticipants (const list // TODO } +// ----------------------------------------------------------------------------- + +void ClientGroupChatRoom::onConferenceCreated (const Address &addr) { + // TODO +} + +void ClientGroupChatRoom::onConferenceTerminated (const Address &addr) { + // TODO +} + +void ClientGroupChatRoom::onParticipantAdded (const Address &addr) { + shared_ptr participant = findParticipant(addr); + if (participant) { + lWarning() << "Participant " << participant << " added but already in the list of participants!"; + return; + } + participant = make_shared(addr); + participants.push_back(participant); + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room); + LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); + LinphoneChatRoomCbsParticipantAddedCb cb = linphone_chat_room_cbs_get_participant_added(cbs); + if (cb) + cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant)); +} + +void ClientGroupChatRoom::onParticipantRemoved (const Address &addr) { + shared_ptr participant = findParticipant(addr); + if (!participant) { + lWarning() << "Participant " << participant << " removed but not in the list of participants!"; + return; + } + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room); + LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); + LinphoneChatRoomCbsParticipantRemovedCb cb = linphone_chat_room_cbs_get_participant_removed(cbs); + if (cb) + cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant)); + participants.remove(participant); +} + +void ClientGroupChatRoom::onParticipantSetAdmin (const Address &addr, bool isAdmin) { + shared_ptr participant = findParticipant(addr); + if (!participant) { + lWarning() << "Participant " << participant << " admin status has been changed but is not in the list of participants!"; + return; + } + participant->setAdmin(isAdmin); + LinphoneChatRoom *cr = L_GET_C_BACK_PTR(this->shared_from_this(), ChatRoom, chat_room); + LinphoneChatRoomCbs *cbs = linphone_chat_room_get_callbacks(cr); + LinphoneChatRoomCbsParticipantAdminStatusChangedCb cb = linphone_chat_room_cbs_get_participant_admin_status_changed(cbs); + if (cb) + cb(cr, L_GET_C_BACK_PTR(participant, Participant, participant), isAdmin); +} + LINPHONE_END_NAMESPACE diff --git a/src/chat/client-group-chat-room.h b/src/chat/client-group-chat-room.h index 04c4181e0..0101437cf 100644 --- a/src/chat/client-group-chat-room.h +++ b/src/chat/client-group-chat-room.h @@ -49,6 +49,14 @@ public: void removeParticipant (const std::shared_ptr &participant); void removeParticipants (const std::list> &participants); +private: + /* ConferenceListener */ + void onConferenceCreated (const Address &addr); + void onConferenceTerminated (const Address &addr); + void onParticipantAdded (const Address &addr); + void onParticipantRemoved (const Address &addr); + void onParticipantSetAdmin (const Address &addr, bool isAdmin); + private: L_DECLARE_PRIVATE(ClientGroupChatRoom); L_DISABLE_COPY(ClientGroupChatRoom); diff --git a/src/conference/conference.cpp b/src/conference/conference.cpp index a6d679421..ba165dbbc 100644 --- a/src/conference/conference.cpp +++ b/src/conference/conference.cpp @@ -19,6 +19,7 @@ #include "participant-p.h" #include "conference.h" +#include "logger/logger.h" using namespace std; @@ -40,13 +41,13 @@ shared_ptr Conference::getActiveParticipant () const { // ----------------------------------------------------------------------------- shared_ptr Conference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { - activeParticipant = make_shared(addr); - activeParticipant->getPrivate()->createSession(*this, params, hasMedia, this); - return activeParticipant; + lError() << "Conference class does not handle addParticipant() generically"; + return nullptr; } void Conference::addParticipants (const list
&addresses, const CallSessionParams *params, bool hasMedia) { - // TODO + for (const auto &addr : addresses) + addParticipant(addr, params, hasMedia); } bool Conference::canHandleParticipants () const { @@ -58,8 +59,7 @@ const string& Conference::getId () const { } int Conference::getNbParticipants () const { - // TODO - return 1; + return participants.size(); } list> Conference::getParticipants () const { @@ -67,11 +67,12 @@ list> Conference::getParticipants () const { } void Conference::removeParticipant (const shared_ptr &participant) { - // TODO + lError() << "Conference class does not handle removeParticipant() generically"; } void Conference::removeParticipants (const list> &participants) { - // TODO + for (const auto &p : participants) + removeParticipant(p); } // ----------------------------------------------------------------------------- diff --git a/src/conference/local-conference-event-handler.cpp b/src/conference/local-conference-event-handler.cpp index 73e579740..e5cae32ee 100644 --- a/src/conference/local-conference-event-handler.cpp +++ b/src/conference/local-conference-event-handler.cpp @@ -24,9 +24,10 @@ #include "private.h" +// ============================================================================= + using namespace std; using namespace conference_info; -using namespace LinphonePrivate; LINPHONE_BEGIN_NAMESPACE @@ -39,7 +40,7 @@ public: LocalConference *conf = nullptr; }; -LINPHONE_END_NAMESPACE +// ----------------------------------------------------------------------------- void LocalConferenceEventHandlerPrivate::notifyFullState(string notify, LinphoneEvent *lev) { LinphoneContent *content = linphone_core_create_content(lev->lc); @@ -64,7 +65,8 @@ void LocalConferenceEventHandlerPrivate::notifyAllExcept(string notify, const Ad } } -// -------- Conference::LocalConferenceEventHandler public methods --------- +// ============================================================================= + LocalConferenceEventHandler::LocalConferenceEventHandler(LinphoneCore *core, LocalConference *localConf) : Object(*new LocalConferenceEventHandlerPrivate) { L_D(LocalConferenceEventHandler); xercesc::XMLPlatformUtils::Initialize(); @@ -76,6 +78,8 @@ LocalConferenceEventHandler::~LocalConferenceEventHandler() { xercesc::XMLPlatformUtils::Terminate(); } +// ----------------------------------------------------------------------------- + string LocalConferenceEventHandler::subscribeReceived(LinphoneEvent *lev) { L_D(LocalConferenceEventHandler); string entity = d->conf->getMe()->getAddress().asStringUriOnly(); @@ -163,3 +167,5 @@ string LocalConferenceEventHandler::notifyParticipantSetAdmin(const Address &add //d->notifyAllExcept(notify.str(), addr); return notify.str(); } + +LINPHONE_END_NAMESPACE diff --git a/src/conference/local-conference.cpp b/src/conference/local-conference.cpp index 96ab857f6..401022812 100644 --- a/src/conference/local-conference.cpp +++ b/src/conference/local-conference.cpp @@ -20,7 +20,8 @@ #include "participant-p.h" using namespace std; -using namespace LinphonePrivate; + +LINPHONE_BEGIN_NAMESPACE // ============================================================================= @@ -42,32 +43,11 @@ shared_ptr LocalConference::addParticipant (const Address &addr, co participant = make_shared(addr); participant->getPrivate()->createSession(*this, params, hasMedia, this); participants.push_back(participant); - activeParticipant = participant; + if (!activeParticipant) + activeParticipant = participant; return participant; } -void LocalConference::addParticipants (const list
&addresses, const CallSessionParams *params, bool hasMedia) { - for (const auto &addr : addresses) - addParticipant(addr, params, hasMedia); -} - -bool LocalConference::canHandleParticipants () const { - return true; -} - -const string& LocalConference::getId () const { - return id; -} - -int LocalConference::getNbParticipants () const { - participants.size(); - return 1; -} - -list> LocalConference::getParticipants () const { - return participants; -} - void LocalConference::removeParticipant (const shared_ptr &participant) { for (const auto &p : participants) { if (participant->getAddress().equal(p->getAddress())) { @@ -77,7 +57,4 @@ void LocalConference::removeParticipant (const shared_ptr &pa } } -void LocalConference::removeParticipants (const list> &participants) { - for (const auto &p : participants) - removeParticipant(p); -} +LINPHONE_END_NAMESPACE diff --git a/src/conference/local-conference.h b/src/conference/local-conference.h index 18394c5b8..55e3f761c 100644 --- a/src/conference/local-conference.h +++ b/src/conference/local-conference.h @@ -36,13 +36,7 @@ public: public: /* ConferenceInterface */ virtual std::shared_ptr addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia); - virtual void addParticipants (const std::list
&addresses, const CallSessionParams *params, bool hasMedia); - virtual bool canHandleParticipants () const; - virtual const std::string& getId () const; - virtual int getNbParticipants () const; - virtual std::list> getParticipants () const; virtual void removeParticipant (const std::shared_ptr &participant); - virtual void removeParticipants (const std::list> &participants); private: L_DISABLE_COPY(LocalConference); diff --git a/src/conference/participant.cpp b/src/conference/participant.cpp index 6bbfd4790..a7642b855 100644 --- a/src/conference/participant.cpp +++ b/src/conference/participant.cpp @@ -68,4 +68,10 @@ void Participant::setAdmin (bool isAdmin) { d->isAdmin = isAdmin; } +// ============================================================================= + +ostream & operator<< (ostream &strm, const shared_ptr &participant) { + return strm << "'" << participant->getAddress().asString() << "'"; +} + LINPHONE_END_NAMESPACE diff --git a/src/conference/participant.h b/src/conference/participant.h index 43891267d..0fbef9f00 100644 --- a/src/conference/participant.h +++ b/src/conference/participant.h @@ -35,9 +35,9 @@ class Participant : public Object { friend class Call; friend class CallPrivate; friend class ClientGroupChatRoom; - friend class Conference; friend class LocalConference; friend class MediaSessionPrivate; + friend class RemoteConference; public: Participant (const Address &addr); @@ -52,6 +52,8 @@ private: L_DISABLE_COPY(Participant); }; +std::ostream & operator<< (std::ostream &strm, const std::shared_ptr &participant); + LINPHONE_END_NAMESPACE #endif // ifndef _PARTICIPANT_H_ diff --git a/src/conference/remote-conference-event-handler.cpp b/src/conference/remote-conference-event-handler.cpp index 23873ea9a..388a43a55 100644 --- a/src/conference/remote-conference-event-handler.cpp +++ b/src/conference/remote-conference-event-handler.cpp @@ -21,9 +21,10 @@ #include "private.h" #include "object/object-p.h" +// ============================================================================= + using namespace std; using namespace conference_info; -using namespace LinphonePrivate; LINPHONE_BEGIN_NAMESPACE @@ -36,15 +37,14 @@ public: LinphoneEvent *lev = nullptr; }; -LINPHONE_END_NAMESPACE +// ============================================================================= -// -------- RemoteConferenceEventHandler public methods --------- -RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener, const Address &confAddr) : Object(*new RemoteConferenceEventHandlerPrivate) { +RemoteConferenceEventHandler::RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener) + : Object(*new RemoteConferenceEventHandlerPrivate) { L_D(RemoteConferenceEventHandler); xercesc::XMLPlatformUtils::Initialize(); d->core = core; d->listener = listener; - d->confAddr = confAddr; } RemoteConferenceEventHandler::~RemoteConferenceEventHandler() { @@ -54,6 +54,8 @@ RemoteConferenceEventHandler::~RemoteConferenceEventHandler() { linphone_event_unref(d->lev); } +// ----------------------------------------------------------------------------- + void RemoteConferenceEventHandler::subscribe(string confId) { L_D(RemoteConferenceEventHandler); d->confId = confId; @@ -101,7 +103,16 @@ void RemoteConferenceEventHandler::notifyReceived(string xmlBody) { } } +// ----------------------------------------------------------------------------- + string RemoteConferenceEventHandler::getConfId() { L_D(RemoteConferenceEventHandler); return d->confId; } + +void RemoteConferenceEventHandler::setConferenceAddress (const Address &addr) { + L_D(RemoteConferenceEventHandler); + d->confAddr = addr; +} + +LINPHONE_END_NAMESPACE diff --git a/src/conference/remote-conference-event-handler.h b/src/conference/remote-conference-event-handler.h index ea6bf862a..6ea95adfd 100644 --- a/src/conference/remote-conference-event-handler.h +++ b/src/conference/remote-conference-event-handler.h @@ -32,7 +32,7 @@ class RemoteConferenceEventHandlerPrivate; class RemoteConferenceEventHandler : public Object { public: - RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener, const Address &confAddr); + RemoteConferenceEventHandler(LinphoneCore *core, ConferenceListener *listener); ~RemoteConferenceEventHandler(); void subscribe(std::string confId); @@ -40,6 +40,7 @@ class RemoteConferenceEventHandler : public Object { void unsubscribe(); std::string getConfId(); + void setConferenceAddress (const Address &addr); private: L_DECLARE_PRIVATE(RemoteConferenceEventHandler); diff --git a/src/conference/remote-conference.cpp b/src/conference/remote-conference.cpp index 537b79acc..0136a29cd 100644 --- a/src/conference/remote-conference.cpp +++ b/src/conference/remote-conference.cpp @@ -17,12 +17,52 @@ */ #include "remote-conference.h" +#include "participant-p.h" + +using namespace std; LINPHONE_BEGIN_NAMESPACE // ============================================================================= RemoteConference::RemoteConference (LinphoneCore *core, const Address &myAddress, CallListener *listener) - : Conference(core, myAddress, listener) {} + : Conference(core, myAddress, listener) { + eventHandler = new RemoteConferenceEventHandler(core, this); +} + +// ----------------------------------------------------------------------------- + +shared_ptr RemoteConference::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { + shared_ptr participant = findParticipant(addr); + if (participant) + return participant; + participant = make_shared(addr); + participant->getPrivate()->createSession(*this, params, hasMedia, this); + participants.push_back(participant); + if (!activeParticipant) + activeParticipant = participant; + return participant; +} + +void RemoteConference::removeParticipant (const shared_ptr &participant) { + for (const auto &p : participants) { + if (participant->getAddress().equal(p->getAddress())) { + participants.remove(p); + return; + } + } +} + +// ----------------------------------------------------------------------------- + +void RemoteConference::onConferenceCreated (const Address &addr) {} + +void RemoteConference::onConferenceTerminated (const Address &addr) {} + +void RemoteConference::onParticipantAdded (const Address &addr) {} + +void RemoteConference::onParticipantRemoved (const Address &addr) {} + +void RemoteConference::onParticipantSetAdmin (const Address &addr, bool isAdmin) {} LINPHONE_END_NAMESPACE diff --git a/src/conference/remote-conference.h b/src/conference/remote-conference.h index be1aa8c51..c8cb28d6c 100644 --- a/src/conference/remote-conference.h +++ b/src/conference/remote-conference.h @@ -20,12 +20,13 @@ #define _REMOTE_CONFERENCE_H_ #include "conference.h" +#include "remote-conference-event-handler.h" // ============================================================================= LINPHONE_BEGIN_NAMESPACE -class RemoteConference : public Conference { +class RemoteConference : public Conference, public ConferenceListener { public: RemoteConference (LinphoneCore *core, const Address &myAddress, CallListener *listener = nullptr); virtual ~RemoteConference() = default; @@ -33,8 +34,23 @@ public: protected: std::shared_ptr focus = nullptr; +public: + /* ConferenceInterface */ + virtual std::shared_ptr addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia); + virtual void removeParticipant (const std::shared_ptr &participant); + +protected: + /* ConferenceListener */ + virtual void onConferenceCreated (const Address &addr); + virtual void onConferenceTerminated (const Address &addr); + virtual void onParticipantAdded (const Address &addr); + virtual void onParticipantRemoved (const Address &addr); + virtual void onParticipantSetAdmin (const Address &addr, bool isAdmin); + private: L_DISABLE_COPY(RemoteConference); + + RemoteConferenceEventHandler *eventHandler = nullptr; }; LINPHONE_END_NAMESPACE diff --git a/tester/conference-event-tester.cpp b/tester/conference-event-tester.cpp index 0deb97164..9de93e4bb 100644 --- a/tester/conference-event-tester.cpp +++ b/tester/conference-event-tester.cpp @@ -437,7 +437,8 @@ public: }; ConferenceEventTester::ConferenceEventTester (LinphoneCore *core, const Address &confAddr) { - handler = new RemoteConferenceEventHandler(core, this, confAddr); + handler = new RemoteConferenceEventHandler(core, this); + handler->setConferenceAddress(confAddr); } ConferenceEventTester::~ConferenceEventTester () {