Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
da23396b
Commit
da23396b
authored
Oct 03, 2017
by
Benjamin REIS
Browse files
add subject handling to xml conference description
parent
fc7a8e0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
src/conference/local-conference-event-handler.cpp
src/conference/local-conference-event-handler.cpp
+16
-0
src/conference/remote-conference-event-handler.cpp
src/conference/remote-conference-event-handler.cpp
+3
-0
No files found.
src/conference/local-conference-event-handler.cpp
View file @
da23396b
...
...
@@ -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
;
...
...
src/conference/remote-conference-event-handler.cpp
View file @
da23396b
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment