mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
sarting to generate notify body
This commit is contained in:
parent
ca7dd265fc
commit
cb720429fa
1 changed files with 29 additions and 0 deletions
|
|
@ -20,9 +20,13 @@
|
|||
#include "linphone/utils/utils.h"
|
||||
|
||||
#include "address/address.h"
|
||||
#include "content/content.h"
|
||||
#include "content/content-manager.h"
|
||||
#include "content/content-type.h"
|
||||
#include "local-conference-event-handler.h"
|
||||
#include "local-conference-list-event-handler.h"
|
||||
#include "xml/resource-lists.h"
|
||||
#include "xml/rlmi.h"
|
||||
|
||||
// =============================================================================
|
||||
|
||||
|
|
@ -30,9 +34,17 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
namespace {
|
||||
constexpr const char MultipartBoundary[] = "---------------------------14737809831412343453453";
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void LocalConferenceListEventHandler::subscribeReceived (const string &xmlBody) {
|
||||
list<Content> contents;
|
||||
Content rlmiContent;
|
||||
rlmiContent.setContentType(ContentType::Rlmi);
|
||||
|
||||
istringstream data(xmlBody);
|
||||
unique_ptr<Xsd::ResourceLists::ResourceLists> rl(Xsd::ResourceLists::parseResourceLists(
|
||||
data,
|
||||
|
|
@ -53,8 +65,25 @@ void LocalConferenceListEventHandler::subscribeReceived (const string &xmlBody)
|
|||
if (notifyBody.empty())
|
||||
continue;
|
||||
|
||||
Content content;
|
||||
if (notifyId > 0) {
|
||||
ContentType contentType(ContentType::Multipart);
|
||||
contentType.setParameter("boundary=" + string(MultipartBoundary));
|
||||
content.setContentType(contentType);
|
||||
} else
|
||||
content.setContentType(ContentType::ConferenceInfo);
|
||||
|
||||
content.setBody(notifyBody);
|
||||
content.addHeader("Content-Id", addr.asStringUriOnly());
|
||||
contents.push_back(content);
|
||||
|
||||
// Add entry into the rlmi content of the notify body
|
||||
}
|
||||
}
|
||||
|
||||
contents.push_front(rlmiContent);
|
||||
Content multipart = ContentManager::contentListToMultipart(contents);
|
||||
(void) multipart;
|
||||
}
|
||||
|
||||
void LocalConferenceListEventHandler::notify () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue