mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 12:38:09 +00:00
add subject handling to xml conference description
This commit is contained in:
parent
fc7a8e0eec
commit
da23396b6e
2 changed files with 19 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue