libosip
5.3.0
|
Classes | |
struct | osip_uri_param |
struct | osip_uri |
Macros | |
#define | osip_uri_header_init(url_header) osip_uri_param_init(url_header) |
#define | osip_uri_header_free(url_header) osip_uri_param_free(url_header) |
#define | osip_uri_header_set(url_header, name, value) osip_uri_param_set(url_header, name, value) |
#define | osip_uri_header_clone(url_header, dest) osip_uri_param_clone(url_header, dest) |
#define | osip_uri_header_add(url_headers, name, value) osip_uri_param_add(url_headers, name, value) |
#define | osip_uri_header_get_byname(url_headers, name, dest) osip_uri_param_get_byname(url_headers, name, dest) |
#define | osip_uri_set_transport_udp(url) osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("udp")) |
#define | osip_uri_set_transport_tcp(url) osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("tcp")) |
#define | osip_uri_set_transport_sctp(url) osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("sctp")) |
#define | osip_uri_set_transport_tls(url) osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("tls")) |
#define | osip_uri_set_transport(url, value) osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), value) |
#define | osip_uri_set_user_phone(url) osip_uri_param_add((&(url)->url_params), osip_strdup("user"), osip_strdup("phone")) |
#define | osip_uri_set_user_ip(url) osip_uri_param_add((&(url)->url_params), osip_strdup("user"), osip_strdup("ip")) |
#define | osip_uri_set_method_invite(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("INVITE")) |
#define | osip_uri_set_method_ack(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("ACK")) |
#define | osip_uri_set_method_options(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("OPTIONS")) |
#define | osip_uri_set_method_bye(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("BYE")) |
#define | osip_uri_set_method_cancel(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("CANCEL")) |
#define | osip_uri_set_method_register(url) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("REGISTER")) |
#define | osip_uri_set_method(url, value) osip_uri_param_add((&(url)->url_params), osip_strdup("method"), value) |
#define | osip_uri_set_ttl(url, value) osip_uri_param_add((&(url)->url_params), osip_strdup("ttl"), value) |
#define | osip_uri_set_maddr(url, value) osip_uri_param_add((&(url)->url_params), osip_strdup("maddr"), value) |
#define | osip_uri_uparam_add(url, name, value) osip_uri_param_add((&(url)->url_params), name, value) |
#define | osip_uri_uparam_get_byname(url, name, dest) osip_uri_param_get_byname((&(url)->url_params), name, dest) |
#define | osip_uri_uheader_add(url, name, value) osip_uri_header_add((&(url)->url_headers), name, value) |
#define | osip_uri_uheader_get_byname(url, name, dest) osip_uri_header_get_byname((&(url)->url_headers), name, dest) |
Typedefs | |
typedef struct osip_uri_param | osip_uri_param_t |
typedef osip_uri_param_t | osip_uri_header_t |
typedef struct osip_uri | osip_uri_t |
#define osip_uri_header_add | ( | url_headers, | |
name, | |||
value | |||
) | osip_uri_param_add(url_headers, name, value) |
Allocate and add a generic parameter element in a list.
url_headers | The list of generic parameter element to work on. |
name | The token name. |
value | The token value. |
#define osip_uri_header_clone | ( | url_header, | |
dest | |||
) | osip_uri_param_clone(url_header, dest) |
Clone a generic parameter element.
url_header | The element to work on. |
dest | The resulting new allocated element. |
#define osip_uri_header_free | ( | url_header | ) | osip_uri_param_free(url_header) |
Free a generic parameter element.
url_header | The element to work on. |
#define osip_uri_header_get_byname | ( | url_headers, | |
name, | |||
dest | |||
) | osip_uri_param_get_byname(url_headers, name, dest) |
Find in a generic parameter element in a list.
url_headers | The list of generic parameter element to work on. |
name | The name of the parameter element to find. |
dest | A pointer on the element found. |
#define osip_uri_header_init | ( | url_header | ) | osip_uri_param_init(url_header) |
Allocate a generic parameter element.
url_header | The element to work on. |
#define osip_uri_header_set | ( | url_header, | |
name, | |||
value | |||
) | osip_uri_param_set(url_header, name, value) |
Set values of a generic parameter element.
url_header | The element to work on. |
name | The token name. |
value | The token value. |
#define osip_uri_set_maddr | ( | url, | |
value | |||
) | osip_uri_param_add((&(url)->url_params), osip_strdup("maddr"), value) |
Set a maddr parameter in a url element.
url | The element to work on. |
value | The value for the maddr parameter. |
#define osip_uri_set_method | ( | url, | |
value | |||
) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), value) |
Set a method parameter in a url element.
url | The element to work on. |
value | The value for the method parameter. |
#define osip_uri_set_method_ack | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("ACK")) |
Set a method parameter to ACK in a url element.
url | The element to work on. |
#define osip_uri_set_method_bye | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("BYE")) |
Set a method parameter to BYE in a url element.
url | The element to work on. |
#define osip_uri_set_method_cancel | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("CANCEL")) |
Set a method parameter to CANCEL in a url element.
url | The element to work on. |
#define osip_uri_set_method_invite | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("INVITE")) |
Set a method parameter to INVITE in a url element.
url | The element to work on. |
#define osip_uri_set_method_options | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("OPTIONS")) |
Set a method parameter to OPTIONS in a url element.
url | The element to work on. |
#define osip_uri_set_method_register | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("method"), osip_strdup("REGISTER")) |
Set a method parameter to REGISTER in a url element.
url | The element to work on. |
#define osip_uri_set_transport | ( | url, | |
value | |||
) | osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), value) |
Set the transport parameter to TLS in a url element.
url | The element to work on. |
value | The value describing the transport protocol. |
#define osip_uri_set_transport_sctp | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("sctp")) |
Set the transport parameter to SCTP in a url element.
url | The element to work on. |
#define osip_uri_set_transport_tcp | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("tcp")) |
Set the transport parameter to TCP in a url element.
url | The element to work on. |
#define osip_uri_set_transport_tls | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("tls")) |
Set the transport parameter to TLS in a url element.
url | The element to work on. |
#define osip_uri_set_transport_udp | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("transport"), osip_strdup("udp")) |
Set the transport parameter to UDP in a url element.
url | The element to work on. |
#define osip_uri_set_ttl | ( | url, | |
value | |||
) | osip_uri_param_add((&(url)->url_params), osip_strdup("ttl"), value) |
Set a ttl parameter in a url element.
url | The element to work on. |
value | The value for the ttl parameter. |
#define osip_uri_set_user_ip | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("user"), osip_strdup("ip")) |
Set the user parameter to IP in a url element.
url | The element to work on. |
#define osip_uri_set_user_phone | ( | url | ) | osip_uri_param_add((&(url)->url_params), osip_strdup("user"), osip_strdup("phone")) |
Set the user parameter to PHONE in a url element.
url | The element to work on. |
#define osip_uri_uheader_add | ( | url, | |
name, | |||
value | |||
) | osip_uri_header_add((&(url)->url_headers), name, value) |
Allocate and add a url header element in a url element.
url | The element to work on. |
name | The token name. |
value | The token value. |
#define osip_uri_uheader_get_byname | ( | url, | |
name, | |||
dest | |||
) | osip_uri_header_get_byname((&(url)->url_headers), name, dest) |
Find in a url header element in a url element.
url | The element to work on. |
name | The name of the url header element to find. |
dest | A pointer on the element found. |
#define osip_uri_uparam_add | ( | url, | |
name, | |||
value | |||
) | osip_uri_param_add((&(url)->url_params), name, value) |
Allocate and add a url parameter element in a url element.
url | The element to work on. |
name | The token name. |
value | The token value. |
#define osip_uri_uparam_get_byname | ( | url, | |
name, | |||
dest | |||
) | osip_uri_param_get_byname((&(url)->url_params), name, dest) |
Find in a url parameter element in a url element.
url | The element to work on. |
name | The name of the url parameter element to find. |
dest | A pointer on the element found. |
Structure for referencing url headers.
Structure for referencing url parameters.
Structure for referencing SIP urls.
int osip_uri_clone | ( | const osip_uri_t * | url, |
osip_uri_t ** | dest | ||
) |
Clone a url element.
url | The element to work on. |
dest | The resulting new allocated element. |
References osip_uri::host, osip_list_clone(), osip_uri_free(), osip_uri_init(), osip_uri_param_clone(), osip_uri::password, osip_uri::port, osip_uri::scheme, osip_uri::string, osip_uri::url_headers, osip_uri::url_params, and osip_uri::username.
Referenced by osip_from_clone(), and osip_message_clone().
void osip_uri_free | ( | osip_uri_t * | url | ) |
Free a url element.
url | The element to work on. |
References osip_uri::host, osip_list_eol(), osip_list_get(), osip_list_remove(), osip_uri_header_free, osip_uri::password, osip_uri::port, osip_uri::scheme, osip_uri::string, osip_uri::url_headers, osip_uri::url_params, and osip_uri::username.
Referenced by osip_from_free(), osip_message_free(), and osip_uri_clone().
char* osip_uri_get_host | ( | osip_uri_t * | url | ) |
char* osip_uri_get_password | ( | osip_uri_t * | url | ) |
Get the password of a url element.
url | The element to work on. |
References osip_uri::password.
char* osip_uri_get_port | ( | osip_uri_t * | url | ) |
char* osip_uri_get_scheme | ( | osip_uri_t * | url | ) |
char* osip_uri_get_username | ( | osip_uri_t * | url | ) |
Get the username of a url element.
url | The element to work on. |
References osip_uri::username.
int osip_uri_init | ( | osip_uri_t ** | url | ) |
Allocate a url element.
url | The element to work on. |
References osip_list_init().
Referenced by osip_from_parse(), and osip_uri_clone().
int osip_uri_param_add | ( | osip_list_t * | url_params, |
char * | name, | ||
char * | value | ||
) |
Allocate and add a url parameter element in a list.
url_params | The list of url parameter element to work on. |
name | The token name. |
value | The token value. |
References osip_list_add(), osip_uri_param_free(), osip_uri_param_init(), and osip_uri_param_set().
int osip_uri_param_clone | ( | const osip_uri_param_t * | url_param, |
osip_uri_param_t ** | dest | ||
) |
Clone a url parameter element.
url_param | The element to work on. |
dest | The resulting new allocated element. |
References osip_uri_param::gname, osip_uri_param::gvalue, and osip_uri_param_init().
Referenced by osip_uri_clone().
void osip_uri_param_free | ( | osip_uri_param_t * | url_param | ) |
Free a url parameter element.
url_param | The element to work on. |
References osip_uri_param::gname, and osip_uri_param::gvalue.
Referenced by osip_uri_param_add().
int osip_uri_param_get_byname | ( | osip_list_t * | url_params, |
char * | name, | ||
osip_uri_param_t ** | dest | ||
) |
Find in a url parameter element in a list.
url_params | The list of url parameter element to work on. |
name | The name of the parameter element to find. |
dest | A pointer on the element found. |
References osip_uri_param::gname, osip_list_get_first(), and osip_list_get_next().
Referenced by osip_dialog_match_as_uas().
int osip_uri_param_init | ( | osip_uri_param_t ** | url_param | ) |
Allocate a url parameter element.
url_param | The element to work on. |
Referenced by osip_uri_param_add(), and osip_uri_param_clone().
int osip_uri_param_set | ( | osip_uri_param_t * | url_param, |
char * | name, | ||
char * | value | ||
) |
Set values of a url parameter element.
url_param | The element to work on. |
name | The token name. |
value | The token value. |
References osip_uri_param::gname, and osip_uri_param::gvalue.
Referenced by osip_uri_param_add().
int osip_uri_parse | ( | osip_uri_t * | url, |
const char * | buf | ||
) |
Parse a url.
url | The element to work on. |
buf | The buffer to parse. |
References osip_uri::host, osip_uri::password, osip_uri::port, osip_uri::scheme, osip_uri::string, and osip_uri::username.
Referenced by osip_from_parse().
void osip_uri_set_host | ( | osip_uri_t * | url, |
char * | value | ||
) |
Set the host of a url element.
url | The element to work on. |
value | The token value. |
References osip_uri::host.
void osip_uri_set_password | ( | osip_uri_t * | url, |
char * | value | ||
) |
Set the password of a url element.
url | The element to work on. |
value | The token value. |
References osip_uri::password.
void osip_uri_set_port | ( | osip_uri_t * | url, |
char * | value | ||
) |
Set the port of a url element.
url | The element to work on. |
value | The token value. |
References osip_uri::port.
void osip_uri_set_scheme | ( | osip_uri_t * | url, |
char * | value | ||
) |
Set the scheme of a url element.
url | The element to work on. |
value | The token value. |
References osip_uri::scheme.
void osip_uri_set_username | ( | osip_uri_t * | url, |
char * | value | ||
) |
Set the username of a url element.
url | The element to work on. |
value | The token value. |
References osip_uri::username.
int osip_uri_to_str | ( | const osip_uri_t * | url, |
char ** | dest | ||
) |
Get a string representation of a url element.
url | The element to work on. |
dest | The resulting new allocated buffer. |
References osip_uri_param::gname, osip_uri_param::gvalue, osip_uri::host, osip_list_get_first(), osip_list_get_next(), osip_uri::password, osip_uri::port, osip_list_iterator::pos, osip_uri::scheme, osip_uri::string, osip_uri::url_headers, osip_uri::url_params, and osip_uri::username.
Referenced by osip_from_to_str(), osip_record_route_to_str(), and osip_uri_to_str_canonical().
int osip_uri_to_str_canonical | ( | const osip_uri_t * | url, |
char ** | dest | ||
) |
Get a canonical string representation of a url element. as defined in 10.3-5
url | The element to work on. |
dest | The resulting new allocated buffer. |
References osip_uri_to_str().