From 8272134d35371acb3d22c7736b5e5d191877e547 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 7 Aug 2017 11:56:54 +0200 Subject: [PATCH] allow abstract participant arch to localConference --- .../local-conference-event-handler.h | 8 ++++++-- tester/confeventpackage_tester.cpp | 20 +++++++++---------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/conference/local-conference-event-handler.h b/src/conference/local-conference-event-handler.h index 0b2768685..4dd08d1e5 100644 --- a/src/conference/local-conference-event-handler.h +++ b/src/conference/local-conference-event-handler.h @@ -67,12 +67,12 @@ namespace LinphonePrivate { const LinphoneAddress *getAddress() const; std::list getParticipants() const; const std::shared_ptr getHandler() const; - - std::list mParticipants; + void addParticipant(Participant p); private: LinphoneAddress *mConfAddr; std::shared_ptr mHandler; + std::list mParticipants; }; } } @@ -101,6 +101,10 @@ std::list LinphonePrivate::Conference: return mParticipants; } +void LinphonePrivate::Conference::LocalConference::addParticipant(LinphonePrivate::Conference::Participant p) { + mParticipants.push_back(p); +} + LinphonePrivate::Conference::Participant::Participant(LinphoneAddress *addr, bool admin) { mAddr = addr; mAdmin = admin; diff --git a/tester/confeventpackage_tester.cpp b/tester/confeventpackage_tester.cpp index 64d43468e..a0753694d 100644 --- a/tester/confeventpackage_tester.cpp +++ b/tester/confeventpackage_tester.cpp @@ -663,8 +663,8 @@ void send_first_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -695,8 +695,8 @@ void send_added_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -737,8 +737,8 @@ void send_removed_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -776,8 +776,8 @@ void send_admined_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str()); @@ -816,8 +816,8 @@ void send_unadmined_notify(void) { LinphoneEvent *lev = linphone_core_create_notify(pauline->lc, marie->identity, "Conference"); string notify; - localConf.mParticipants.push_back(p1); - localConf.mParticipants.push_back(p2); + localConf.addParticipant(p1); + localConf.addParticipant(p2); notify = localConf.getHandler()->subscribeReceived(lev); tester.mHandler->notifyReceived(notify.c_str());