Commit 0aa7fdf8 authored by Simon Morlat's avatar Simon Morlat

remove not so useful method, because it doesn't check any error and makes too many assumption.

parent e6b7360a
......@@ -295,13 +295,7 @@ BELLESIP_EXPORT void belle_sdp_version_set_version(belle_sdp_version_t* version,
typedef struct _belle_sdp_session_description belle_sdp_session_description_t;
BELLESIP_EXPORT belle_sdp_session_description_t* belle_sdp_session_description_new();
BELLESIP_EXPORT belle_sdp_session_description_t* belle_sdp_session_description_parse (const char* session_description);
/*sdp managementy helper method*/
/*
* create a session description object from a message
* @param message to get sdp from
* @returns belle_sdp_session_description_t or NULL if no sdp present
* */
BELLESIP_EXPORT belle_sdp_session_description_t* belle_sdp_session_description_create(belle_sip_message_t* message);
BELLESIP_EXPORT const char* belle_sdp_session_description_get_attribute_value(const belle_sdp_session_description_t* session_description, const char* name);
BELLESIP_EXPORT const belle_sdp_attribute_t* belle_sdp_session_description_get_attribute(const belle_sdp_session_description_t* session_description, const char* name);
BELLESIP_EXPORT int belle_sdp_session_description_get_bandwidth(const belle_sdp_session_description_t* session_description, const char* name);
......
......@@ -991,16 +991,7 @@ belle_sip_error_code belle_sdp_session_description_marshal(belle_sdp_session_des
BELLE_SDP_NEW(session_description,belle_sdp_base_description)
BELLE_SDP_PARSE(session_description)
belle_sdp_session_description_t* belle_sdp_session_description_create(belle_sip_message_t* message) {
belle_sdp_session_description_t* session_desc=NULL;
belle_sip_header_content_type_t* content_type=belle_sip_message_get_header_by_type(message,belle_sip_header_content_type_t);
if (content_type
&& strcmp("application",belle_sip_header_content_type_get_type(content_type))==0
&& strcmp("sdp",belle_sip_header_content_type_get_subtype(content_type))==0) {
session_desc=belle_sdp_session_description_parse(belle_sip_message_get_body(message));
}
return session_desc;
}
const char* belle_sdp_session_description_get_attribute_value(const belle_sdp_session_description_t* session_description, const char* name) {
return belle_sdp_base_description_get_attribute_value(BELLE_SIP_CAST(session_description,belle_sdp_base_description_t),name);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment