SIP Witch 1.9.15
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Data Structures | Typedefs | Functions
oSIP body API

Data Structures

struct  osip_body
 Structure for holding Body. More...
 

Typedefs

typedef struct osip_body osip_body_t
 Structure for holding Body. More...
 

Functions

int osip_body_init (osip_body_t **body)
 Allocate a osip_body_t element. More...
 
void osip_body_free (osip_body_t *body)
 Free a osip_body_t element. More...
 
int osip_body_parse (osip_body_t *body, const char *buf, size_t length)
 Parse a osip_body_t element. More...
 
int osip_body_clone (const osip_body_t *body, osip_body_t **dest)
 Clone a osip_body_t element. More...
 
int osip_body_parse_mime (osip_body_t *body, const char *buf, size_t length)
 Parse a osip_body_t element. More...
 
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. More...
 
int osip_body_set_contenttype (osip_body_t *body, const char *hvalue)
 Set the Content-Type header in the osip_body_t element. More...
 
int osip_body_set_header (osip_body_t *body, const char *hname, const char *hvalue)
 Add a header in the osip_body_t element. More...
 

Detailed Description

Typedef Documentation

#include <osip_body.h>

Structure for holding Body.

Definition at line 42 of file osip_body.h.

Function Documentation

int osip_body_clone ( const osip_body_t body,
osip_body_t **  dest 
)

#include <osip_body.h>

Clone a osip_body_t element.

Parameters
bodyThe element to clone.
destThe cloned element.
void osip_body_free ( osip_body_t body)

#include <osip_body.h>

Free a osip_body_t element.

Parameters
bodyThe element to work on.
int osip_body_init ( osip_body_t **  body)

#include <osip_body.h>

Allocate a osip_body_t element.

Parameters
bodyThe element to work on.
int osip_body_parse ( osip_body_t body,
const char *  buf,
size_t  length 
)

#include <osip_body.h>

Parse a osip_body_t element.

Parameters
bodyThe element to work on.
bufThe buffer to parse.
lengthThe length of the buffer to parse.
int osip_body_parse_mime ( osip_body_t body,
const char *  buf,
size_t  length 
)

#include <osip_body.h>

Parse a osip_body_t element.

(for mime message format) (NOT TESTED, use with care)

Parameters
bodyThe element to work on.
bufThe buffer to parse.
lengthThe length of the buffer to parse.
int osip_body_set_contenttype ( osip_body_t body,
const char *  hvalue 
)

#include <osip_body.h>

Set the Content-Type header in the osip_body_t element.

Parameters
bodyThe element to work on.
hvalueThe content type string value.
int osip_body_set_header ( osip_body_t body,
const char *  hname,
const char *  hvalue 
)

#include <osip_body.h>

Add a header in the osip_body_t element.

Parameters
bodyThe element to work on.
hnameThe header string name.
hvalueThe header string value.
int osip_body_to_str ( const osip_body_t body,
char **  dest,
size_t *  length 
)

#include <osip_body.h>

Get a string representation of a osip_body_t element.

Parameters
bodyThe element to work on.
destThe resulting buffer.
lengthThe length of the returned buffer.