libosip  4.0.0
Classes | Typedefs | Functions
oSIP header definition.
oSIP headers definitions

Classes

struct  osip_header

Typedefs

typedef struct osip_header osip_header_t
typedef osip_uri_param_t osip_generic_param_t

Functions

int osip_header_init (osip_header_t **header)
void osip_header_free (osip_header_t *header)
int osip_header_to_str (const osip_header_t *header, char **dest)
char * osip_header_get_name (const osip_header_t *header)
void osip_header_set_name (osip_header_t *header, char *pname)
char * osip_header_get_value (const osip_header_t *header)
void osip_header_set_value (osip_header_t *header, char *pvalue)
int osip_header_clone (const osip_header_t *header, osip_header_t **dest)

Detailed Description

Typedef Documentation

Structure for generic parameter headers. Generic parameter are used in a lot of headers. (To, From, Route, Record-Route...) All those headers use a common API but this is hidden by MACROs that you can be found in smsg.h.

Structure for 'unknown' headers. NOTE: 'unknown' header' are used in oSIP for all header that are not defined by oSIP in the osip_message_t structure. This means that all 'unknown' header has to be handled with the API related to this structure.

Function Documentation

int osip_header_clone ( const osip_header_t header,
osip_header_t **  dest 
)

Clone a header element.

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

References osip_header::hname, osip_header::hvalue, osip_header_free(), and osip_header_init().

Referenced by osip_body_clone(), and osip_message_clone().

void osip_header_free ( osip_header_t header)
char* osip_header_get_name ( const osip_header_t header)

Get the token name a header element.

Parameters
headerThe element to work on.

References osip_header::hname.

char* osip_header_get_value ( const osip_header_t header)

Get the token value a header element.

Parameters
headerThe element to work on.

References osip_header::hvalue.

int osip_header_init ( osip_header_t **  header)

Allocate a header element.

Parameters
headerThe element to work on.

Referenced by osip_body_set_header(), osip_header_clone(), osip_message_replace_header(), osip_message_set_header(), and osip_message_set_topheader().

void osip_header_set_name ( osip_header_t header,
char *  pname 
)

Set the token name a header element.

Parameters
headerThe element to work on.
pnameThe token name to set.

References osip_header::hname.

void osip_header_set_value ( osip_header_t header,
char *  pvalue 
)

Set the token value a header element.

Parameters
headerThe element to work on.
pvalueThe token value to set.

References osip_header::hvalue.

int osip_header_to_str ( const osip_header_t header,
char **  dest 
)

Get a string representation of a header element.

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

References osip_header::hname, and osip_header::hvalue.

Referenced by osip_body_to_str().