Commit 1e8abd20 authored by Nicolas Follet's avatar Nicolas Follet

add uri header getter in LinphoneAddress

parent a9b93af1
......@@ -178,6 +178,10 @@ void linphone_address_set_header(LinphoneAddress *addr, const char *header_name,
sal_address_set_header(addr,header_name,header_value);
}
const char *linphone_address_get_header(const LinphoneAddress *addr, const char *name){
return sal_address_get_header(addr,name);
}
bool_t linphone_address_has_param(const LinphoneAddress *addr, const char *name) {
return sal_address_has_param(addr, name);
}
......
......@@ -236,6 +236,11 @@ void sal_address_set_header(SalAddress *addr, const char *header_name, const cha
belle_sip_uri_set_header(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)),header_name, header_value);
}
const char* sal_address_get_header(const SalAddress *addr, const char *name){
return belle_sip_uri_get_header(belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(addr)),name);
}
void sal_address_set_transport(SalAddress* addr,SalTransport transport){
if (!sal_address_is_secure(addr)){
SAL_ADDRESS_SET(addr,transport_param,sal_transport_to_string(transport));
......
......@@ -201,6 +201,12 @@ LINPHONE_PUBLIC const char *linphone_address_get_password(const LinphoneAddress
**/
LINPHONE_PUBLIC void linphone_address_set_header(LinphoneAddress *addr, const char *header_name, const char *header_value);
/**
* Get the header encoded in the address.
* @param addr the address
**/
LINPHONE_PUBLIC const char * linphone_address_get_header(const LinphoneAddress *addr, const char *name);
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);
......
......@@ -145,6 +145,7 @@ bool_t sal_address_is_sip(const SalAddress *addr);
void sal_address_set_password(SalAddress *addr, const char *passwd);
const char *sal_address_get_password(const SalAddress *addr);
void sal_address_set_header(SalAddress *addr, const char *header_name, const char *header_value);
const char *sal_address_get_header(const SalAddress *addr, const char *name);
LINPHONE_PUBLIC Sal * sal_init(MSFactory *factory);
LINPHONE_PUBLIC void sal_uninit(Sal* sal);
......
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