libosip
5.3.0
|
Classes | |
struct | osip_via |
Macros | |
#define | via_set_version osip_via_set_version |
#define | via_get_version osip_via_get_version |
#define | via_set_protocol osip_via_set_protocol |
#define | via_get_protocol osip_via_get_protocol |
#define | via_set_host osip_via_set_host |
#define | via_get_host osip_via_get_host |
#define | via_set_port osip_via_set_port |
#define | via_get_port osip_via_get_port |
#define | via_set_comment osip_via_set_comment |
#define | via_get_comment osip_via_get_comment |
#define | osip_via_set_hidden(header) osip_generic_param_add((&(header)->via_params), osip_strdup("hidden"), NULL) |
#define | osip_via_set_ttl(header, value) osip_generic_param_add((&(header)->via_params), osip_strdup("ttl"), value) |
#define | osip_via_set_maddr(header, value) osip_generic_param_add((&(header)->via_params), osip_strdup("maddr"), value) |
#define | osip_via_set_received(header, value) osip_generic_param_add((&(header)->via_params), osip_strdup("received"), value) |
#define | osip_via_set_branch(header, value) osip_generic_param_add((&(header)->via_params), osip_strdup("branch"), value) |
#define | osip_via_param_add(header, name, value) osip_generic_param_add((&(header)->via_params), name, value) |
#define | osip_via_param_get_byname(header, name, dest) osip_generic_param_get_byname((&(header)->via_params), name, dest) |
Typedefs | |
typedef struct osip_via | osip_via_t |
Functions | |
int | osip_via_init (osip_via_t **header) |
void | osip_via_free (osip_via_t *header) |
int | osip_via_parse (osip_via_t *header, const char *hvalue) |
int | osip_via_to_str (const osip_via_t *header, char **dest) |
int | osip_via_clone (const osip_via_t *header, osip_via_t **dest) |
void | osip_via_set_version (osip_via_t *header, char *value) |
char * | osip_via_get_version (osip_via_t *header) |
void | osip_via_set_protocol (osip_via_t *header, char *value) |
char * | osip_via_get_protocol (osip_via_t *header) |
void | osip_via_set_host (osip_via_t *header, char *value) |
char * | osip_via_get_host (osip_via_t *header) |
void | osip_via_set_port (osip_via_t *header, char *value) |
char * | osip_via_get_port (osip_via_t *header) |
void | osip_via_set_comment (osip_via_t *header, char *value) |
char * | osip_via_get_comment (osip_via_t *header) |
int | osip_via_match (osip_via_t *via1, osip_via_t *via2) |
#define osip_via_param_add | ( | header, | |
name, | |||
value | |||
) | osip_generic_param_add((&(header)->via_params), name, value) |
Allocate and add a generic parameter element in a list.
header | The element to work on. |
name | The token name. |
value | The token value. |
#define osip_via_param_get_byname | ( | header, | |
name, | |||
dest | |||
) | osip_generic_param_get_byname((&(header)->via_params), name, dest) |
Find a header parameter in a Via element.
header | The element to work on. |
name | The token name to search. |
dest | A pointer on the element found. |
#define osip_via_set_branch | ( | header, | |
value | |||
) | osip_generic_param_add((&(header)->via_params), osip_strdup("branch"), value) |
Allocate and add a branch parameter element in a list.
header | The element to work on. |
value | The token value. |
#define osip_via_set_hidden | ( | header | ) | osip_generic_param_add((&(header)->via_params), osip_strdup("hidden"), NULL) |
Allocate and add a hidden parameter element in a list.
header | The element to work on. |
#define osip_via_set_maddr | ( | header, | |
value | |||
) | osip_generic_param_add((&(header)->via_params), osip_strdup("maddr"), value) |
Allocate and add a maddr parameter element in a list.
header | The element to work on. |
value | The token value. |
#define osip_via_set_received | ( | header, | |
value | |||
) | osip_generic_param_add((&(header)->via_params), osip_strdup("received"), value) |
Allocate and add a received parameter element in a list.
header | The element to work on. |
value | The token value. |
#define osip_via_set_ttl | ( | header, | |
value | |||
) | osip_generic_param_add((&(header)->via_params), osip_strdup("ttl"), value) |
Allocate and add a ttl parameter element in a list.
header | The element to work on. |
value | The token value. |
Structure for Via headers.
int osip_via_clone | ( | const osip_via_t * | header, |
osip_via_t ** | dest | ||
) |
Clone a Via element.
header | The element to work on. |
dest | A pointer on the copy of the element. |
References osip_via::comment, osip_via::host, osip_generic_param_clone, osip_list_clone(), osip_via_free(), osip_via_init(), osip_via::port, osip_via::protocol, osip_via::version, and osip_via::via_params.
Referenced by osip_message_clone().
void osip_via_free | ( | osip_via_t * | header | ) |
Free a Via element.
header | The element to work on. |
References osip_via::comment, osip_via::host, osip_via::port, osip_via::protocol, osip_via::version, and osip_via::via_params.
Referenced by osip_message_append_via(), osip_message_free(), osip_message_set_via(), osip_transaction_free2(), and osip_via_clone().
char* osip_via_get_comment | ( | osip_via_t * | header | ) |
Get the comment from a Via header.
header | The element to work on. |
References osip_via::comment.
char* osip_via_get_host | ( | osip_via_t * | header | ) |
char* osip_via_get_port | ( | osip_via_t * | header | ) |
char* osip_via_get_protocol | ( | osip_via_t * | header | ) |
Get the protocol from a Via header.
header | The element to work on. |
References osip_via::protocol.
char* osip_via_get_version | ( | osip_via_t * | header | ) |
Get the SIP version from a Via header.
header | The element to work on. |
References osip_via::version.
int osip_via_init | ( | osip_via_t ** | header | ) |
Allocate a Via element.
header | The element to work on. |
References osip_list_init().
Referenced by osip_message_append_via(), osip_message_set_via(), and osip_via_clone().
int osip_via_match | ( | osip_via_t * | via1, |
osip_via_t * | via2 | ||
) |
Check if the Via headers match. NOTE: THIS IS AN INTERNAL METHOD ONLY
via1 | The first Via header. |
via2 | The second Via header. |
References osip_via_to_str().
int osip_via_parse | ( | osip_via_t * | header, |
const char * | hvalue | ||
) |
Parse a Via element.
header | The element to work on. |
hvalue | The string to parse. |
References osip_via::comment, osip_via::host, osip_via::port, osip_via::protocol, osip_via::version, and osip_via::via_params.
Referenced by osip_message_append_via(), and osip_message_set_via().
void osip_via_set_comment | ( | osip_via_t * | header, |
char * | value | ||
) |
Set the comment in the Via element.
header | The element to work on. |
value | The value of the element. |
References osip_via::comment.
void osip_via_set_host | ( | osip_via_t * | header, |
char * | value | ||
) |
Set the host in the Via element.
header | The element to work on. |
value | The value of the element. |
References osip_via::host.
void osip_via_set_port | ( | osip_via_t * | header, |
char * | value | ||
) |
Set the port in the Via element.
header | The element to work on. |
value | The value of the element. |
References osip_via::port.
void osip_via_set_protocol | ( | osip_via_t * | header, |
char * | value | ||
) |
Set the protocol in the Via element.
header | The element to work on. |
value | The value of the element. |
References osip_via::protocol.
void osip_via_set_version | ( | osip_via_t * | header, |
char * | value | ||
) |
Set the SIP version in the Via element.
header | The element to work on. |
value | The value of the element. |
References osip_via::version.
int osip_via_to_str | ( | const osip_via_t * | header, |
char ** | dest | ||
) |
Get a string representation of a Via element.
header | The element to work on. |
dest | A pointer on the new allocated string. |
References osip_via::comment, osip_uri_param::gname, osip_uri_param::gvalue, osip_via::host, osip_list_get_first(), osip_list_get_next(), osip_via::port, osip_via::protocol, osip_via::version, and osip_via::via_params.
Referenced by osip_via_match().