Commit 0af98652 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add more address API.

parent 80bdec52
......@@ -299,6 +299,14 @@ void linphone_address_set_header(LinphoneAddress *addr, const char *header_name,
sal_address_set_header(addr,header_name,header_value);
}
bool_t linphone_address_has_param(const LinphoneAddress *addr, const char *name) {
return sal_address_has_param(addr, name);
}
const char * linphone_address_get_param(const LinphoneAddress *addr, const char *name) {
return sal_address_get_param(addr, name);
}
void linphone_address_set_param(LinphoneAddress *addr, const char *name, const char *value) {
sal_address_set_param(addr, name, value);
}
......@@ -315,10 +323,14 @@ 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) {
bool_t linphone_address_has_uri_param(const LinphoneAddress *addr, const char *name) {
return sal_address_has_uri_param(addr, name);
}
const char * linphone_address_get_uri_param(const LinphoneAddress *addr, const char *name) {
return sal_address_get_uri_param(addr, name);
}
LinphoneAddress * linphone_core_create_address(LinphoneCore *lc, const char *address) {
return linphone_address_new(address);
}
......
......@@ -197,6 +197,15 @@ void sal_address_set_param(SalAddress *addr,const char* name,const char* value){
return ;
}
bool_t sal_address_has_param(const SalAddress *addr, const char *name){
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(addr);
return belle_sip_parameters_has_parameter(parameters, name);
}
const char * sal_address_get_param(const SalAddress *addr, const char *name) {
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(addr);
return belle_sip_parameters_get_parameter(parameters, name);
}
void sal_address_set_params(SalAddress *addr, const char *params){
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(addr);
......@@ -213,11 +222,16 @@ void sal_address_set_uri_params(SalAddress *addr, const char *params){
belle_sip_parameters_set(parameters,params);
}
bool_t sal_address_has_uri_param(SalAddress *addr, const char *name){
bool_t sal_address_has_uri_param(const SalAddress *addr, const char *name){
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)));
return belle_sip_parameters_has_parameter(parameters, name);
}
const char * sal_address_get_uri_param(const SalAddress *addr, const char *name) {
belle_sip_parameters_t* parameters = BELLE_SIP_PARAMETERS(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)));
return belle_sip_parameters_get_parameter(parameters, name);
}
void sal_address_set_header(SalAddress *addr, const char *header_name, const char *header_value){
belle_sip_uri_set_header(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)),header_name, header_value);
}
......
......@@ -451,11 +451,14 @@ 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 bool_t linphone_address_has_param(const LinphoneAddress *addr, const char *name);
LINPHONE_PUBLIC const char * linphone_address_get_param(const LinphoneAddress *addr, const char *name);
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 bool_t linphone_address_has_uri_param(const LinphoneAddress *addr, const char *name);
LINPHONE_PUBLIC const char * linphone_address_get_uri_param(const LinphoneAddress *addr, const char *name);
LINPHONE_PUBLIC void linphone_address_destroy(LinphoneAddress *u);
/**
......
......@@ -125,9 +125,12 @@ 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);
bool_t sal_address_has_param(const SalAddress *addr, const char *name);
const char * sal_address_get_param(const SalAddress *addr, const char *name);
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_has_uri_param(const SalAddress *addr, const char *name);
const char * sal_address_get_uri_param(const SalAddress *addr, const char *name);
bool_t sal_address_is_ipv6(const SalAddress *addr);
bool_t sal_address_is_sip(const SalAddress *addr);
void sal_address_set_password(SalAddress *addr, const char *passwd);
......
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