libosip
5.3.0
|
Classes | |
struct | osip_body |
Typedefs | |
typedef struct osip_body | osip_body_t |
Functions | |
int | osip_body_init (osip_body_t **body) |
void | osip_body_free (osip_body_t *body) |
int | osip_body_parse (osip_body_t *body, const char *buf, size_t length) |
int | osip_body_clone (const osip_body_t *body, osip_body_t **dest) |
int | osip_body_parse_mime (osip_body_t *body, const char *buf, size_t length) |
int | osip_body_to_str (const osip_body_t *body, char **dest, size_t *length) |
int | osip_body_set_contenttype (osip_body_t *body, const char *hvalue) |
int | osip_body_set_header (osip_body_t *body, const char *hname, const char *hvalue) |
Structure for holding Body
int osip_body_clone | ( | const osip_body_t * | body, |
osip_body_t ** | dest | ||
) |
Clone a osip_body_t element.
body | The element to clone. |
dest | The cloned element. |
References osip_body::body, osip_body::content_type, osip_body::headers, osip_body::length, osip_body_free(), osip_body_init(), osip_content_type_clone(), osip_header_clone(), and osip_list_clone().
Referenced by osip_message_clone().
void osip_body_free | ( | osip_body_t * | body | ) |
Free a osip_body_t element.
body | The element to work on. |
References osip_body::body, osip_body::content_type, osip_body::headers, osip_content_type_free(), osip_header_free(), and osip_list_special_free().
Referenced by osip_body_clone(), osip_message_free(), osip_message_set_body(), and osip_message_set_body_mime().
int osip_body_init | ( | osip_body_t ** | body | ) |
Allocate a osip_body_t element.
body | The element to work on. |
References osip_list_init().
Referenced by osip_body_clone(), osip_message_set_body(), and osip_message_set_body_mime().
int osip_body_parse | ( | osip_body_t * | body, |
const char * | buf, | ||
size_t | length | ||
) |
Parse a osip_body_t element.
body | The element to work on. |
buf | The buffer to parse. |
length | The length of the buffer to parse. |
References osip_body::body, osip_body::headers, and osip_body::length.
Referenced by osip_message_set_body().
int osip_body_parse_mime | ( | osip_body_t * | body, |
const char * | buf, | ||
size_t | length | ||
) |
Parse a osip_body_t element. (for mime message format) (NOT TESTED, use with care)
body | The element to work on. |
buf | The buffer to parse. |
length | The length of the buffer to parse. |
References osip_body::body, osip_body::headers, and osip_body::length.
Referenced by osip_message_set_body_mime().
int osip_body_set_contenttype | ( | osip_body_t * | body, |
const char * | hvalue | ||
) |
Set the Content-Type header in the osip_body_t element.
body | The element to work on. |
hvalue | The content type string value. |
References osip_body::content_type, osip_content_type_free(), osip_content_type_init(), and osip_content_type_parse().
int osip_body_set_header | ( | osip_body_t * | body, |
const char * | hname, | ||
const char * | hvalue | ||
) |
Add a header in the osip_body_t element.
body | The element to work on. |
hname | The header string name. |
hvalue | The header string value. |
References osip_body::headers, osip_header::hname, osip_header::hvalue, osip_header_free(), osip_header_init(), and osip_list_add().
int osip_body_to_str | ( | const osip_body_t * | body, |
char ** | dest, | ||
size_t * | length | ||
) |
Get a string representation of a osip_body_t element.
body | The element to work on. |
dest | The resulting buffer. |
length | The length of the returned buffer. |
References osip_body::body, osip_body::content_type, osip_body::headers, osip_body::length, osip_content_type_to_str(), osip_header_to_str(), osip_list_get_first(), osip_list_get_next(), and osip_list_size().