Commit dd6f8869 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Extend address API to handle parameters.

parent 8a0823f5
......@@ -299,6 +299,26 @@ void linphone_address_set_header(LinphoneAddress *addr, const char *header_name,
sal_address_set_header(addr,header_name,header_value);
}
void linphone_address_set_param(LinphoneAddress *addr, const char *name, const char *value) {
sal_address_set_param(addr, name, value);
}
void linphone_address_set_params(LinphoneAddress *addr, const char *params) {
sal_address_set_params(addr, params);
}
void linphone_address_set_uri_param(LinphoneAddress *addr, const char *name, const char *value) {
sal_address_set_uri_param(addr, name, value);
}
void linphone_address_set_uri_params(LinphoneAddress *addr, const char *params) {
sal_address_set_uri_params(addr, params);
}
bool_t linphone_address_has_uri_param(LinphoneAddress *addr, const char *name) {
return sal_address_has_uri_param(addr, name);
}
LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address) {
return linphone_address_new(address);
}
......
......@@ -203,6 +203,11 @@ void sal_address_set_params(SalAddress *addr, const char *params){
belle_sip_parameters_set(parameters,params);
}
void sal_address_set_uri_param(SalAddress *addr, const char *name, const char *value) {
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)));
belle_sip_parameters_set_parameter(parameters, name, value);
}
void sal_address_set_uri_params(SalAddress *addr, const char *params){
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)));
belle_sip_parameters_set(parameters,params);
......
......@@ -451,6 +451,11 @@ LINPHONE_PUBLIC bool_t linphone_address_equal(const LinphoneAddress *a1, const L
LINPHONE_PUBLIC void linphone_address_set_password(LinphoneAddress *addr, const char *passwd);
LINPHONE_PUBLIC const char *linphone_address_get_password(const LinphoneAddress *addr);
LINPHONE_PUBLIC void linphone_address_set_header(LinphoneAddress *addr, const char *header_name, const char *header_value);
LINPHONE_PUBLIC void linphone_address_set_param(LinphoneAddress *addr, const char *name, const char *value);
LINPHONE_PUBLIC void linphone_address_set_params(LinphoneAddress *addr, const char *params);
LINPHONE_PUBLIC void linphone_address_set_uri_param(LinphoneAddress *addr, const char *name, const char *value);
LINPHONE_PUBLIC void linphone_address_set_uri_params(LinphoneAddress *addr, const char *params);
LINPHONE_PUBLIC bool_t linphone_address_has_uri_param(LinphoneAddress *addr, const char *name);
LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u);
/**
......
......@@ -125,6 +125,7 @@ void sal_address_set_transport(SalAddress* addr,SalTransport transport);
void sal_address_set_transport_name(SalAddress* addr,const char* transport);
void sal_address_set_method_param(SalAddress *addr, const char *method);
void sal_address_set_params(SalAddress *addr, const char *params);
void sal_address_set_uri_param(SalAddress *addr, const char *name, const char *value);
void sal_address_set_uri_params(SalAddress *addr, const char *params);
bool_t sal_address_has_uri_param(SalAddress *addr, const char *name);
bool_t sal_address_is_ipv6(const SalAddress *addr);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment