mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(content-manager): set correctly multi part content
This commit is contained in:
parent
9d5d9ffc28
commit
7148e56f7c
3 changed files with 6 additions and 7 deletions
|
|
@ -68,8 +68,6 @@ list<Content> ContentManager::multipartToContentList (const Content &content) {
|
|||
}
|
||||
|
||||
Content ContentManager::contentListToMultipart (const list<Content> &contents) {
|
||||
string sub;
|
||||
|
||||
belle_sip_memory_body_handler_t *mbh = nullptr;
|
||||
belle_sip_multipart_body_handler_t *mpbh = belle_sip_multipart_body_handler_new(
|
||||
nullptr, nullptr, nullptr, MULTIPART_BOUNDARY
|
||||
|
|
@ -79,8 +77,7 @@ Content ContentManager::contentListToMultipart (const list<Content> &contents) {
|
|||
for (const auto &content : contents) {
|
||||
const ContentType &contentType = content.getContentType();
|
||||
stringstream subtype;
|
||||
sub = contentType.getSubType();
|
||||
subtype << sub << "; charset=\"UTF-8\"";
|
||||
subtype << contentType.getSubType() << "; charset=\"UTF-8\"";
|
||||
belle_sip_header_t *cContentType = BELLE_SIP_HEADER(
|
||||
belle_sip_header_content_type_create(
|
||||
contentType.getType().c_str(),
|
||||
|
|
@ -99,7 +96,7 @@ Content ContentManager::contentListToMultipart (const list<Content> &contents) {
|
|||
|
||||
Content content;
|
||||
content.setBody(desc);
|
||||
content.setContentType(ContentType("application", sub));
|
||||
content.setContentType(ContentType::Multipart);
|
||||
|
||||
belle_sip_free(desc);
|
||||
belle_sip_object_unref(mpbh);
|
||||
|
|
|
|||
|
|
@ -39,15 +39,16 @@ public:
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const ContentType ContentType::ConferenceInfo("application/conference-info+xml");
|
||||
const ContentType ContentType::Cpim("message/cpim");
|
||||
const ContentType ContentType::ExternalBody("message/external-body");
|
||||
const ContentType ContentType::FileTransfer("application/vnd.gsma.rcs-ft-http+xml");
|
||||
const ContentType ContentType::Imdn("message/imdn+xml");
|
||||
const ContentType ContentType::ImIsComposing("application/im-iscomposing+xml");
|
||||
const ContentType ContentType::Multipart("multipart/mixed");
|
||||
const ContentType ContentType::PlainText("text/plain");
|
||||
const ContentType ContentType::ResourceLists("application/resource-lists+xml");
|
||||
const ContentType ContentType::Sdp("application/sdp");
|
||||
const ContentType ContentType::ConferenceInfo("application/conference-info+xml");
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -61,15 +61,16 @@ public:
|
|||
|
||||
static bool isFile (const ContentType &contentType);
|
||||
|
||||
static const ContentType ConferenceInfo;
|
||||
static const ContentType Cpim;
|
||||
static const ContentType ExternalBody;
|
||||
static const ContentType FileTransfer;
|
||||
static const ContentType Imdn;
|
||||
static const ContentType ImIsComposing;
|
||||
static const ContentType Multipart;
|
||||
static const ContentType PlainText;
|
||||
static const ContentType ResourceLists;
|
||||
static const ContentType Sdp;
|
||||
static const ContentType ConferenceInfo;
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(ContentType);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue