Commit da23396b authored by Benjamin REIS's avatar Benjamin REIS

add subject handling to xml conference description

parent fc7a8e0e
......@@ -90,9 +90,13 @@ void LocalConferenceEventHandlerPrivate::notifyAll(string notify) {
string LocalConferenceEventHandlerPrivate::createNotifyFullState() {
string entity = this->conf->getConferenceAddress()->asStringUriOnly();
string subject = this->conf->getSubject();
ConferenceType confInfo = ConferenceType(entity);
UsersType users;
ConferenceDescriptionType confDescr = ConferenceDescriptionType();
confDescr.setSubject(subject);
confInfo.setUsers(users);
confInfo.setConferenceDescription((const ConferenceDescriptionType) confDescr);
for (const auto &participant : this->conf->getParticipants()) {
UserType user = UserType();
......@@ -109,9 +113,13 @@ string LocalConferenceEventHandlerPrivate::createNotifyFullState() {
string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded(const Address &addr) {
string entity = this->conf->getConferenceAddress()->asStringUriOnly();
string subject = this->conf->getSubject();
ConferenceType confInfo = ConferenceType(entity);
UsersType users;
ConferenceDescriptionType confDescr = ConferenceDescriptionType();
confDescr.setSubject(subject);
confInfo.setUsers(users);
confInfo.setConferenceDescription((const ConferenceDescriptionType)confDescr);
UserType user = UserType();
UserRolesType roles;
......@@ -126,9 +134,13 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdded(const Ad
string LocalConferenceEventHandlerPrivate::createNotifyParticipantRemoved(const Address &addr) {
string entity = this->conf->getConferenceAddress()->asStringUriOnly();
string subject = this->conf->getSubject();
ConferenceType confInfo = ConferenceType(entity);
UsersType users;
ConferenceDescriptionType confDescr = ConferenceDescriptionType();
confDescr.setSubject(subject);
confInfo.setUsers(users);
confInfo.setConferenceDescription((const ConferenceDescriptionType)confDescr);
UserType user = UserType();
user.setEntity(addr.asStringUriOnly());
......@@ -140,9 +152,13 @@ string LocalConferenceEventHandlerPrivate::createNotifyParticipantRemoved(const
string LocalConferenceEventHandlerPrivate::createNotifyParticipantAdmined(const Address &addr, bool isAdmin) {
string entity = this->conf->getConferenceAddress()->asStringUriOnly();
string subject = this->conf->getSubject();
ConferenceType confInfo = ConferenceType(entity);
UsersType users;
ConferenceDescriptionType confDescr = ConferenceDescriptionType();
confDescr.setSubject(subject);
confInfo.setUsers(users);
confInfo.setConferenceDescription((const ConferenceDescriptionType)confDescr);
UserType user = UserType();
UserRolesType roles;
......
......@@ -83,6 +83,9 @@ void RemoteConferenceEventHandler::notifyReceived(string xmlBody) {
Address cleanedConfAddress = d->confAddress;
cleanedConfAddress.setPort(0);
if (confInfo->getEntity() == cleanedConfAddress.asString()) {
if(confInfo->getConferenceDescription().present() && confInfo->getConferenceDescription().get().getSubject().present())
d->listener->onSubjectChanged(confInfo->getConferenceDescription().get().getSubject().get());
for (const auto &user : confInfo->getUsers()->getUser()) {
LinphoneAddress *cAddr = linphone_core_interpret_url(d->core, user.getEntity()->c_str());
char *cAddrStr = linphone_address_as_string(cAddr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment