allow abstract participant arch to localConference

This commit is contained in:
Benjamin Reis 2017-08-07 11:56:54 +02:00
parent 23f4d851f1
commit 8272134d35
2 changed files with 16 additions and 12 deletions

View file

@ -67,12 +67,12 @@ namespace LinphonePrivate {
const LinphoneAddress *getAddress() const;
std::list<Participant> getParticipants() const;
const std::shared_ptr<LocalConferenceEventHandler> getHandler() const;
std::list<Participant> mParticipants;
void addParticipant(Participant p);
private:
LinphoneAddress *mConfAddr;
std::shared_ptr<LocalConferenceEventHandler> mHandler;
std::list<Participant> mParticipants;
};
}
}
@ -101,6 +101,10 @@ std::list<LinphonePrivate::Conference::Participant> 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;

View file

@ -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());