mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
fix testers
This commit is contained in:
parent
e4422ca7e6
commit
c268421765
6 changed files with 11 additions and 14 deletions
|
|
@ -403,7 +403,7 @@ void linphone_event_set_state(LinphoneEvent *lev, LinphoneSubscriptionState stat
|
|||
void linphone_event_set_publish_state(LinphoneEvent *lev, LinphonePublishState state);
|
||||
void _linphone_event_notify_notify_response(const LinphoneEvent *lev);
|
||||
LinphoneSubscriptionState linphone_subscription_state_from_sal(SalSubscribeStatus ss);
|
||||
LinphoneContent *linphone_content_from_sal_body_handler(const SalBodyHandler *ref);
|
||||
LinphoneContent *linphone_content_from_sal_body_handler(const SalBodyHandler *ref, bool parseMultipart = true);
|
||||
void linphone_core_invalidate_friend_subscriptions(LinphoneCore *lc);
|
||||
void linphone_core_register_offer_answer_providers(LinphoneCore *lc);
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ void linphone_content_set_key (LinphoneContent *content, const char *key, const
|
|||
// Private functions.
|
||||
// =============================================================================
|
||||
|
||||
static LinphoneContent *linphone_content_new_with_body_handler (const SalBodyHandler *body_handler) {
|
||||
static LinphoneContent *linphone_content_new_with_body_handler (const SalBodyHandler *body_handler, bool parseMultipart) {
|
||||
LinphoneContent *content = L_INIT(Content);
|
||||
content->cryptoContext = NULL;
|
||||
LinphonePrivate::Content *c = new LinphonePrivate::Content();
|
||||
|
|
@ -256,13 +256,13 @@ static LinphoneContent *linphone_content_new_with_body_handler (const SalBodyHan
|
|||
linphone_content_add_content_type_parameter(content, paramName, paramValue);
|
||||
}
|
||||
|
||||
if (!linphone_content_is_multipart(content)) {
|
||||
linphone_content_set_string_buffer(content, (char *)sal_body_handler_get_data(body_handler));
|
||||
} else {
|
||||
if (linphone_content_is_multipart(content) && parseMultipart) {
|
||||
belle_sip_multipart_body_handler_t *mpbh = BELLE_SIP_MULTIPART_BODY_HANDLER(body_handler);
|
||||
char *body = belle_sip_object_to_string(mpbh);
|
||||
linphone_content_set_string_buffer(content, body);
|
||||
belle_sip_free(body);
|
||||
} else {
|
||||
linphone_content_set_string_buffer(content, (char *)sal_body_handler_get_data(body_handler));
|
||||
}
|
||||
|
||||
belle_sip_list_t *headers = (belle_sip_list_t *)sal_body_handler_get_headers(body_handler);
|
||||
|
|
@ -279,7 +279,7 @@ static LinphoneContent *linphone_content_new_with_body_handler (const SalBodyHan
|
|||
}
|
||||
|
||||
LinphoneContent *linphone_content_new (void) {
|
||||
return linphone_content_new_with_body_handler(NULL);
|
||||
return linphone_content_new_with_body_handler(NULL, true);
|
||||
}
|
||||
|
||||
LinphoneContent *linphone_content_copy (const LinphoneContent *ref) {
|
||||
|
|
@ -296,9 +296,9 @@ void **linphone_content_get_cryptoContext_address (LinphoneContent *content) {
|
|||
return &content->cryptoContext;
|
||||
}
|
||||
|
||||
LinphoneContent *linphone_content_from_sal_body_handler (const SalBodyHandler *body_handler) {
|
||||
LinphoneContent *linphone_content_from_sal_body_handler (const SalBodyHandler *body_handler, bool parseMultipart) {
|
||||
if (body_handler) {
|
||||
return linphone_content_new_with_body_handler(body_handler);
|
||||
return linphone_content_new_with_body_handler(body_handler, parseMultipart);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ void LocalConferenceEventHandlerPrivate::notifyParticipantDevice (const string &
|
|||
// TODO: Activate compression
|
||||
LinphoneContent *cContent = L_GET_C_BACK_PTR(&content);
|
||||
linphone_event_notify(ev, cContent);
|
||||
linphone_content_unref(cContent);
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -164,7 +164,6 @@ void LocalConferenceListEventHandler::subscribeReceived (LinphoneEvent *lev, con
|
|||
Content multipart = ContentManager::contentListToMultipart(contents, MultipartBoundaryListEventHandler);
|
||||
LinphoneContent *cContent = L_GET_C_BACK_PTR(&multipart);
|
||||
linphone_event_notify(lev, cContent);
|
||||
linphone_content_unref(cContent);
|
||||
contents.clear();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ void RemoteConferenceListEventHandler::subscribe () {
|
|||
linphone_event_set_user_data(lev, this);
|
||||
LinphoneContent *cContent = L_GET_C_BACK_PTR(&content);
|
||||
linphone_event_send_subscribe(lev, cContent);
|
||||
linphone_content_unref(cContent);
|
||||
}
|
||||
|
||||
void RemoteConferenceListEventHandler::unsubscribe () {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ list<Content> ContentManager::multipartToContentList (const Content &content) {
|
|||
list<Content> contents;
|
||||
for (const belle_sip_list_t *parts = sal_body_handler_get_parts(sbh); parts; parts = parts->next) {
|
||||
SalBodyHandler *part = (SalBodyHandler *)parts->data;
|
||||
LinphoneContent *cContent = linphone_content_from_sal_body_handler(part);
|
||||
LinphoneContent *cContent = linphone_content_from_sal_body_handler(part, false);
|
||||
Content *cppContent = L_GET_CPP_PTR_FROM_C_OBJECT(cContent);
|
||||
if (content.getContentDisposition().isValid())
|
||||
cppContent->setContentDisposition(content.getContentDisposition());
|
||||
|
|
@ -69,7 +69,7 @@ Content ContentManager::contentListToMultipart (const list<Content *> &contents,
|
|||
disposition = content->getContentDisposition();
|
||||
|
||||
LinphoneContent *cContent = L_GET_C_BACK_PTR(content);
|
||||
SalBodyHandler *sbh = sal_body_handler_ref(sal_body_handler_from_content(cContent, false));
|
||||
SalBodyHandler *sbh = sal_body_handler_from_content(cContent);
|
||||
belle_sip_multipart_body_handler_add_part(mpbh, BELLE_SIP_BODY_HANDLER(sbh));
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ Content ContentManager::contentListToMultipart (const list<Content *> &contents,
|
|||
sal_body_handler_set_subtype(sbh, ContentType::Multipart.getSubType().c_str());
|
||||
sal_body_handler_set_content_type_parameter(sbh, "boundary", boundary.c_str());
|
||||
|
||||
LinphoneContent *cContent = linphone_content_from_sal_body_handler(sbh);
|
||||
LinphoneContent *cContent = linphone_content_from_sal_body_handler(sbh, false);
|
||||
belle_sip_object_unref(mpbh);
|
||||
|
||||
Content content = *L_GET_CPP_PTR_FROM_C_OBJECT(cContent);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue