libosip  5.3.0
Macros | Typedefs | Functions
oSIP contact header definition.

Macros

#define osip_contact_get_displayname(header)   osip_from_get_displayname((osip_from_t *) header)
 
#define osip_contact_set_displayname(header, value)   osip_from_set_displayname((osip_from_t *) header, value)
 
#define osip_contact_get_url(header)   osip_from_get_url((osip_from_t *) header)
 
#define osip_contact_set_url(header, url)   osip_from_set_url((osip_from_t *) header, url)
 
#define osip_contact_param_get(header, pos, dest)   osip_from_param_get((osip_from_t *) header, pos, dest)
 
#define osip_contact_param_add(header, name, value)   osip_generic_param_add((&(header)->gen_params), name, value)
 
#define osip_contact_param_get_byname(header, name, dest)   osip_generic_param_get_byname((&(header)->gen_params), name, dest)
 

Typedefs

typedef osip_from_t osip_contact_t
 

Functions

int osip_contact_init (osip_contact_t **header)
 
void osip_contact_free (osip_contact_t *header)
 
int osip_contact_parse (osip_contact_t *header, const char *hvalue)
 
int osip_contact_to_str (const osip_contact_t *header, char **dest)
 
int osip_contact_clone (const osip_contact_t *header, osip_contact_t **dest)
 

Detailed Description

Macro Definition Documentation

◆ osip_contact_get_displayname

#define osip_contact_get_displayname (   header)    osip_from_get_displayname((osip_from_t *) header)

Get the displayname from a Contact header.

Parameters
headerThe element to work on.

◆ osip_contact_get_url

#define osip_contact_get_url (   header)    osip_from_get_url((osip_from_t *) header)

Get the url from a Contact header.

Parameters
headerThe element to work on.

◆ osip_contact_param_add

#define osip_contact_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.

◆ osip_contact_param_get

#define osip_contact_param_get (   header,
  pos,
  dest 
)    osip_from_param_get((osip_from_t *) header, pos, dest)

Get a header parameter from a Contact element.

Parameters
headerThe element to work on.
posThe index of the element to get.
destA pointer on the element found.

◆ osip_contact_param_get_byname

#define osip_contact_param_get_byname (   header,
  name,
  dest 
)    osip_generic_param_get_byname((&(header)->gen_params), name, dest)

Find a header parameter in a Contact element.

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

◆ osip_contact_set_displayname

#define osip_contact_set_displayname (   header,
  value 
)    osip_from_set_displayname((osip_from_t *) header, value)

Set the displayname in the Contact element.

Parameters
headerThe element to work on.
valueThe value of the element.

◆ osip_contact_set_url

#define osip_contact_set_url (   header,
  url 
)    osip_from_set_url((osip_from_t *) header, url)

Set the url in the Contact element.

Parameters
headerThe element to work on.
urlThe value of the element.

Typedef Documentation

◆ osip_contact_t

Structure for Contact headers.

Function Documentation

◆ osip_contact_clone()

int osip_contact_clone ( const osip_contact_t header,
osip_contact_t **  dest 
)

Clone a Contact element.

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

References osip_from_clone().

Referenced by osip_dialog_update_route_set_as_uac(), osip_dialog_update_route_set_as_uas(), and osip_message_clone().

◆ osip_contact_free()

void osip_contact_free ( osip_contact_t header)

Free a Contact element.

Parameters
headerThe element to work on.

References osip_from_free().

Referenced by osip_dialog_free(), osip_dialog_update_route_set_as_uac(), osip_dialog_update_route_set_as_uas(), osip_message_free(), and osip_message_set_contact().

◆ osip_contact_init()

int osip_contact_init ( osip_contact_t **  header)

Allocate a Contact element.

Parameters
headerThe element to work on.

References osip_from_init().

Referenced by osip_message_set_contact().

◆ osip_contact_parse()

int osip_contact_parse ( osip_contact_t header,
const char *  hvalue 
)

Parse a Contact element.

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

References osip_from::displayname, and osip_from_parse().

Referenced by osip_message_set_contact().

◆ osip_contact_to_str()

int osip_contact_to_str ( const osip_contact_t header,
char **  dest 
)

Get a string representation of a Contact element.

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

References osip_from::displayname, and osip_from_to_str().