mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-28 00:29:21 +00:00
add method to create the resource-lists xml body for conference creation
This commit is contained in:
parent
4bc82605b5
commit
dbb214f988
3 changed files with 25 additions and 0 deletions
|
|
@ -97,6 +97,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
|
|||
utils/payload-type-handler.h
|
||||
variant/variant.h
|
||||
xml/conference-info.h
|
||||
xml/resource-lists.h
|
||||
xml/xml.h
|
||||
)
|
||||
|
||||
|
|
@ -162,6 +163,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
|
|||
utils/utils.cpp
|
||||
variant/variant.cpp
|
||||
xml/conference-info.cpp
|
||||
xml/resource-lists.cpp
|
||||
xml/xml.cpp
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,10 @@
|
|||
|
||||
#include "remote-conference.h"
|
||||
#include "participant-p.h"
|
||||
#include "xml/resource-lists.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace LinphonePrivate::Xsd::ResourceLists;
|
||||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -57,6 +59,25 @@ void RemoteConference::removeParticipant (const shared_ptr<const Participant> &p
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
string RemoteConference::getResourceLists(const list<shared_ptr<const Participant>> &participants) {
|
||||
ResourceLists rl = ResourceLists();
|
||||
ListType l = ListType();
|
||||
for(const auto &p : participants) {
|
||||
EntryType entry = EntryType(p->getAddress().asStringUriOnly());
|
||||
if(p->getAddress().getDisplayName() != "") {
|
||||
entry.setDisplayName(DisplayName(p->getAddress().getDisplayName()));
|
||||
}
|
||||
l.getEntry().push_back(entry);
|
||||
}
|
||||
rl.getList().push_back(l);
|
||||
|
||||
Xsd::XmlSchema::NamespaceInfomap map;
|
||||
stringstream xmlBody;
|
||||
serializeResourceLists(xmlBody, rl, map);
|
||||
return xmlBody.str();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void RemoteConference::onConferenceCreated (const Address &addr) {}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ public:
|
|||
std::shared_ptr<Participant> addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) override;
|
||||
void removeParticipant (const std::shared_ptr<const Participant> &participant) override;
|
||||
|
||||
std::string getResourceLists(const std::list<std::shared_ptr<const Participant>> &participants);
|
||||
|
||||
protected:
|
||||
/* ConferenceListener */
|
||||
void onConferenceCreated (const Address &addr) override;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue