libosip 3.6.0
Classes | Defines | Typedefs | Functions

oSIP content-type header definition.

oSIP headers definitions

Classes

struct  osip_content_type

Defines

#define osip_content_type_param_add(header, name, value)   osip_generic_param_add((&(header)->gen_params),name,value)
#define osip_content_type_param_get_byname(header, name, dest)   osip_generic_param_get_byname((&(header)->gen_params),name,dest)

Typedefs

typedef struct osip_content_type osip_content_type_t

Functions

int osip_content_type_init (osip_content_type_t **header)
void osip_content_type_free (osip_content_type_t *header)
int osip_content_type_parse (osip_content_type_t *header, const char *hvalue)
int osip_content_type_to_str (const osip_content_type_t *header, char **dest)
int osip_content_type_clone (const osip_content_type_t *header, osip_content_type_t **dest)

Define Documentation

#define osip_content_type_param_add (   header,
  name,
  value 
)    osip_generic_param_add((&(header)->gen_params),name,value)

Allocate and add a generic parameter element in a list.

Parameters:
headerThe element to work on.
nameThe token name.
valueThe token value.
#define osip_content_type_param_get_byname (   header,
  name,
  dest 
)    osip_generic_param_get_byname((&(header)->gen_params),name,dest)

Find a header parameter in a Content-Type element.

Parameters:
headerThe element to work on.
nameThe token name to search.
destA pointer on the element found.

Typedef Documentation

Structure for Content-Type headers.


Function Documentation

int osip_content_type_clone ( const osip_content_type_t header,
osip_content_type_t **  dest 
)

Clone a Content-Type element.

Parameters:
headerThe element to work on.
destA pointer on the copy of the element.

References osip_content_type::gen_params, osip_content_type_free(), osip_content_type_init(), osip_generic_param_clone, osip_list_add(), osip_list_eol(), osip_list_get(), osip_content_type::subtype, and osip_content_type::type.

Referenced by osip_body_clone(), and osip_message_clone().

void osip_content_type_free ( osip_content_type_t header)
int osip_content_type_init ( osip_content_type_t **  header)

Allocate a Content-Type element.

Parameters:
headerThe element to work on.

References osip_list_init().

Referenced by osip_body_set_contenttype(), osip_content_type_clone(), and osip_message_set_content_type().

int osip_content_type_parse ( osip_content_type_t header,
const char *  hvalue 
)

Parse a Content-Type element.

Parameters:
headerThe element to work on.
hvalueThe string to parse.

References osip_content_type::gen_params, osip_content_type::subtype, and osip_content_type::type.

Referenced by osip_body_set_contenttype(), and osip_message_set_content_type().

int osip_content_type_to_str ( const osip_content_type_t header,
char **  dest 
)

Get a string representation of a Content-Type element.

Parameters:
headerThe element to work on.
destA pointer on the new allocated string.

References osip_content_type::gen_params, osip_uri_param::gname, osip_uri_param::gvalue, osip_list_eol(), osip_list_get(), osip_list_size(), osip_content_type::subtype, and osip_content_type::type.

Referenced by osip_body_to_str().