Commit 863381c3 authored by smorlat's avatar smorlat
Browse files

rename LinphoneUri into LinphoneAddress, because the term uri wasn't...

rename LinphoneUri into LinphoneAddress, because the term uri wasn't appropriate to refer a sip from header.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@771 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 9364a668
...@@ -1249,12 +1249,12 @@ linphonec_proxy_use(LinphoneCore *lc, int index) ...@@ -1249,12 +1249,12 @@ linphonec_proxy_use(LinphoneCore *lc, int index)
static void static void
linphonec_friend_display(LinphoneFriend *fr) linphonec_friend_display(LinphoneFriend *fr)
{ {
LinphoneUri *uri=linphone_uri_clone(linphone_friend_get_uri(fr)); LinphoneAddress *uri=linphone_address_clone(linphone_friend_get_uri(fr));
char *str; char *str;
linphonec_out("name: %s\n", linphone_uri_get_display_name(uri)); linphonec_out("name: %s\n", linphone_address_get_display_name(uri));
linphone_uri_set_display_name(uri,NULL); linphone_address_set_display_name(uri,NULL);
str=linphone_uri_as_string(uri); str=linphone_address_as_string(uri);
linphonec_out("address: %s\n", str); linphonec_out("address: %s\n", str);
} }
...@@ -1273,7 +1273,7 @@ linphonec_friend_list(LinphoneCore *lc, char *pat) ...@@ -1273,7 +1273,7 @@ linphonec_friend_list(LinphoneCore *lc, char *pat)
for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n ) for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
{ {
if ( pat ) { if ( pat ) {
const char *name = linphone_uri_get_display_name( const char *name = linphone_address_get_display_name(
linphone_friend_get_uri((LinphoneFriend*)friend->data)); linphone_friend_get_uri((LinphoneFriend*)friend->data));
if (name && ! strstr(name, pat) ) continue; if (name && ! strstr(name, pat) ) continue;
} }
...@@ -1296,7 +1296,7 @@ linphonec_friend_call(LinphoneCore *lc, unsigned int num) ...@@ -1296,7 +1296,7 @@ linphonec_friend_call(LinphoneCore *lc, unsigned int num)
if ( n == num ) if ( n == num )
{ {
int ret; int ret;
addr = linphone_uri_as_string(linphone_friend_get_uri((LinphoneFriend*)friend->data)); addr = linphone_address_as_string(linphone_friend_get_uri((LinphoneFriend*)friend->data));
ret=lpc_cmd_call(lc, addr); ret=lpc_cmd_call(lc, addr);
ms_free(addr); ms_free(addr);
return ret; return ret;
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
#include <eXosip2/eXosip.h> #include <eXosip2/eXosip.h>
LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to){ LinphoneChatRoom * linphone_core_create_chat_room(LinphoneCore *lc, const char *to){
LinphoneUri *parsed_url=NULL; LinphoneAddress *parsed_url=NULL;
char *route; char *route;
if (linphone_core_interpret_url(lc,to,&parsed_url,&route)){ if (linphone_core_interpret_url(lc,to,&parsed_url,&route)){
LinphoneChatRoom *cr=ms_new0(LinphoneChatRoom,1); LinphoneChatRoom *cr=ms_new0(LinphoneChatRoom,1);
cr->lc=lc; cr->lc=lc;
cr->peer=linphone_uri_as_string(parsed_url); cr->peer=linphone_address_as_string(parsed_url);
cr->peer_url=parsed_url; cr->peer_url=parsed_url;
cr->route=route; cr->route=route;
lc->chatrooms=ms_list_append(lc->chatrooms,(void *)cr); lc->chatrooms=ms_list_append(lc->chatrooms,(void *)cr);
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
void linphone_chat_room_destroy(LinphoneChatRoom *cr){ void linphone_chat_room_destroy(LinphoneChatRoom *cr){
LinphoneCore *lc=cr->lc; LinphoneCore *lc=cr->lc;
lc->chatrooms=ms_list_remove(lc->chatrooms,(void *) cr); lc->chatrooms=ms_list_remove(lc->chatrooms,(void *) cr);
linphone_uri_destroy(cr->peer_url); linphone_address_destroy(cr->peer_url);
ms_free(cr->peer); ms_free(cr->peer);
ms_free(cr->route); ms_free(cr->route);
} }
...@@ -59,9 +59,9 @@ void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg){ ...@@ -59,9 +59,9 @@ void linphone_chat_room_send_message(LinphoneChatRoom *cr, const char *msg){
eXosip_message_send_request(sip); eXosip_message_send_request(sip);
} }
bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneUri *from){ bool_t linphone_chat_room_matches(LinphoneChatRoom *cr, const LinphoneAddress *from){
if (linphone_uri_get_username(cr->peer_url) && linphone_uri_get_username(from) && if (linphone_address_get_username(cr->peer_url) && linphone_address_get_username(from) &&
strcmp(linphone_uri_get_username(cr->peer_url),linphone_uri_get_username(from))==0) return TRUE; strcmp(linphone_address_get_username(cr->peer_url),linphone_address_get_username(from))==0) return TRUE;
return FALSE; return FALSE;
} }
...@@ -76,7 +76,7 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){ ...@@ -76,7 +76,7 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){
char *from; char *from;
osip_from_t *from_url=ev->request->from; osip_from_t *from_url=ev->request->from;
osip_body_t *body=NULL; osip_body_t *body=NULL;
LinphoneUri *uri; LinphoneAddress *uri;
osip_message_get_body(ev->request,0,&body); osip_message_get_body(ev->request,0,&body);
if (body==NULL){ if (body==NULL){
...@@ -85,9 +85,9 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){ ...@@ -85,9 +85,9 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){
} }
msg=body->body; msg=body->body;
osip_from_to_str(from_url,&from); osip_from_to_str(from_url,&from);
uri=linphone_uri_new(from); uri=linphone_address_new(from);
osip_free(from); osip_free(from);
linphone_uri_clean(uri); linphone_address_clean(uri);
for(elem=lc->chatrooms;elem!=NULL;elem=ms_list_next(elem)){ for(elem=lc->chatrooms;elem!=NULL;elem=ms_list_next(elem)){
cr=(LinphoneChatRoom*)elem->data; cr=(LinphoneChatRoom*)elem->data;
if (linphone_chat_room_matches(cr,uri)){ if (linphone_chat_room_matches(cr,uri)){
...@@ -95,12 +95,12 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){ ...@@ -95,12 +95,12 @@ void linphone_core_text_received(LinphoneCore *lc, eXosip_event_t *ev){
} }
cr=NULL; cr=NULL;
} }
from=linphone_uri_as_string(uri); from=linphone_address_as_string(uri);
if (cr==NULL){ if (cr==NULL){
/* create a new chat room */ /* create a new chat room */
cr=linphone_core_create_chat_room(lc,from); cr=linphone_core_create_chat_room(lc,from);
} }
linphone_uri_destroy(uri); linphone_address_destroy(uri);
linphone_chat_room_text_received(cr,lc,from,msg); linphone_chat_room_text_received(cr,lc,from,msg);
ms_free(from); ms_free(from);
} }
......
...@@ -321,7 +321,7 @@ int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev) ...@@ -321,7 +321,7 @@ int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev)
eXosip_unlock(); eXosip_unlock();
goto end; goto end;
} }
lc->call=linphone_call_new_incoming(lc,linphone_uri_new(from),linphone_uri_new(to),ev); lc->call=linphone_call_new_incoming(lc,linphone_address_new(from),linphone_address_new(to),ev);
sdp=eXosip_get_sdp_info(ev->request); sdp=eXosip_get_sdp_info(ev->request);
if (sdp==NULL){ if (sdp==NULL){
......
...@@ -77,19 +77,19 @@ const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){ ...@@ -77,19 +77,19 @@ const char *linphone_online_status_to_string(LinphoneOnlineStatus ss){
} }
static int friend_data_compare(const void * a, const void * b, void * data){ static int friend_data_compare(const void * a, const void * b, void * data){
LinphoneUri *fa=((LinphoneFriend*)a)->uri; LinphoneAddress *fa=((LinphoneFriend*)a)->uri;
LinphoneUri *fb=((LinphoneFriend*)b)->uri; LinphoneAddress *fb=((LinphoneFriend*)b)->uri;
const char *ua,*ub; const char *ua,*ub;
ua=linphone_uri_get_username(fa); ua=linphone_address_get_username(fa);
ub=linphone_uri_get_username(fb); ub=linphone_address_get_username(fb);
if (ua!=NULL && ub!=NULL) { if (ua!=NULL && ub!=NULL) {
//printf("Comparing usernames %s,%s\n",ua,ub); //printf("Comparing usernames %s,%s\n",ua,ub);
return strcasecmp(ua,ub); return strcasecmp(ua,ub);
} }
else { else {
/* compare hosts*/ /* compare hosts*/
ua=linphone_uri_get_domain(fa); ua=linphone_address_get_domain(fa);
ub=linphone_uri_get_domain(fb); ub=linphone_address_get_domain(fb);
if (ua!=NULL && ub!=NULL){ if (ua!=NULL && ub!=NULL){
int ret=strcasecmp(ua,ub); int ret=strcasecmp(ua,ub);
//printf("Comparing hostnames %s,%s,res=%i\n",ua,ub,ret); //printf("Comparing hostnames %s,%s,res=%i\n",ua,ub,ret);
...@@ -104,11 +104,11 @@ static int friend_compare(const void * a, const void * b){ ...@@ -104,11 +104,11 @@ static int friend_compare(const void * a, const void * b){
} }
MSList *linphone_find_friend(MSList *fl, const LinphoneUri *friend, LinphoneFriend **lf){ MSList *linphone_find_friend(MSList *fl, const LinphoneAddress *friend, LinphoneFriend **lf){
MSList *res=NULL; MSList *res=NULL;
LinphoneFriend dummy; LinphoneFriend dummy;
if (lf!=NULL) *lf=NULL; if (lf!=NULL) *lf=NULL;
dummy.uri=(LinphoneUri*)friend; dummy.uri=(LinphoneAddress*)friend;
res=ms_list_find_custom(fl,friend_compare,&dummy); res=ms_list_find_custom(fl,friend_compare,&dummy);
if (lf!=NULL && res!=NULL) *lf=(LinphoneFriend*)res->data; if (lf!=NULL && res!=NULL) *lf=(LinphoneFriend*)res->data;
return res; return res;
...@@ -137,7 +137,7 @@ void __linphone_friend_do_subscribe(LinphoneFriend *fr){ ...@@ -137,7 +137,7 @@ void __linphone_friend_do_subscribe(LinphoneFriend *fr){
const char *route=NULL; const char *route=NULL;
const char *from=NULL; const char *from=NULL;
osip_message_t *msg=NULL; osip_message_t *msg=NULL;
friend=linphone_uri_as_string(fr->uri); friend=linphone_address_as_string(fr->uri);
if (fr->proxy!=NULL){ if (fr->proxy!=NULL){
route=fr->proxy->reg_route; route=fr->proxy->reg_route;
from=fr->proxy->reg_identity; from=fr->proxy->reg_identity;
...@@ -176,26 +176,26 @@ LinphoneFriend *linphone_friend_new_with_addr(const char *addr){ ...@@ -176,26 +176,26 @@ LinphoneFriend *linphone_friend_new_with_addr(const char *addr){
} }
void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){
LinphoneUri *fr=NULL; LinphoneAddress *fr=NULL;
*result=NULL; *result=NULL;
fr=linphone_uri_new(uri); fr=linphone_address_new(uri);
if (fr==NULL){ if (fr==NULL){
char *tmp=NULL; char *tmp=NULL;
if (strchr(uri,'@')!=NULL){ if (strchr(uri,'@')!=NULL){
LinphoneUri *u; LinphoneAddress *u;
/*try adding sip:*/ /*try adding sip:*/
tmp=ms_strdup_printf("sip:%s",uri); tmp=ms_strdup_printf("sip:%s",uri);
u=linphone_uri_new(tmp); u=linphone_address_new(tmp);
if (u!=NULL){ if (u!=NULL){
*result=tmp; *result=tmp;
} }
}else if (lc->default_proxy!=NULL){ }else if (lc->default_proxy!=NULL){
/*try adding domain part from default current proxy*/ /*try adding domain part from default current proxy*/
LinphoneUri * id=linphone_uri_new(linphone_core_get_identity(lc)); LinphoneAddress * id=linphone_address_new(linphone_core_get_identity(lc));
if (id!=NULL){ if (id!=NULL){
linphone_uri_set_username(id,uri); linphone_address_set_username(id,uri);
*result=linphone_uri_as_string(id); *result=linphone_address_as_string(id);
linphone_uri_destroy(id); linphone_address_destroy(id);
} }
} }
if (*result){ if (*result){
...@@ -204,28 +204,28 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char ...@@ -204,28 +204,28 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char
}else{ }else{
ms_warning("Fail to interpret friend uri %s",uri); ms_warning("Fail to interpret friend uri %s",uri);
} }
}else *result=linphone_uri_as_string(fr); }else *result=linphone_address_as_string(fr);
linphone_uri_destroy(fr); linphone_address_destroy(fr);
} }
int linphone_friend_set_sip_addr(LinphoneFriend *lf, const char *addr){ int linphone_friend_set_sip_addr(LinphoneFriend *lf, const char *addr){
LinphoneUri *fr=linphone_uri_new(addr); LinphoneAddress *fr=linphone_address_new(addr);
if (fr==NULL) { if (fr==NULL) {
ms_warning("Invalid friend sip uri: %s",addr); ms_warning("Invalid friend sip uri: %s",addr);
return -1; return -1;
} }
if (lf->uri!=NULL) linphone_uri_destroy(lf->uri); if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
lf->uri=fr; lf->uri=fr;
return 0; return 0;
} }
int linphone_friend_set_name(LinphoneFriend *lf, const char *name){ int linphone_friend_set_name(LinphoneFriend *lf, const char *name){
LinphoneUri *fr=lf->uri; LinphoneAddress *fr=lf->uri;
if (fr==NULL){ if (fr==NULL){
ms_error("linphone_friend_set_sip_addr() must be called before linphone_friend_set_name()."); ms_error("linphone_friend_set_sip_addr() must be called before linphone_friend_set_name().");
return -1; return -1;
} }
linphone_uri_set_display_name(fr,name); linphone_address_set_display_name(fr,name);
return 0; return 0;
} }
...@@ -553,7 +553,7 @@ static void linphone_friend_unsubscribe(LinphoneFriend *lf){ ...@@ -553,7 +553,7 @@ static void linphone_friend_unsubscribe(LinphoneFriend *lf){
void linphone_friend_destroy(LinphoneFriend *lf){ void linphone_friend_destroy(LinphoneFriend *lf){
linphone_friend_notify(lf,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED); linphone_friend_notify(lf,EXOSIP_SUBCRSTATE_TERMINATED,LINPHONE_STATUS_CLOSED);
linphone_friend_unsubscribe(lf); linphone_friend_unsubscribe(lf);
if (lf->uri!=NULL) linphone_uri_destroy(lf->uri); if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
if (lf->info!=NULL) buddy_info_free(lf->info); if (lf->info!=NULL) buddy_info_free(lf->info);
ms_free(lf); ms_free(lf);
} }
...@@ -564,7 +564,7 @@ void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyCo ...@@ -564,7 +564,7 @@ void linphone_friend_check_for_removed_proxy(LinphoneFriend *lf, LinphoneProxyCo
} }
} }
const LinphoneUri *linphone_friend_get_uri(const LinphoneFriend *lf){ const LinphoneAddress *linphone_friend_get_uri(const LinphoneFriend *lf){
return lf->uri; return lf->uri;
} }
...@@ -653,10 +653,10 @@ static bool_t username_match(const char *u1, const char *u2){ ...@@ -653,10 +653,10 @@ static bool_t username_match(const char *u1, const char *u2){
} }
LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri){ LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const char *uri){
LinphoneUri *puri=linphone_uri_new(uri); LinphoneAddress *puri=linphone_address_new(uri);
const MSList *elem; const MSList *elem;
const char *username=linphone_uri_get_username(puri); const char *username=linphone_address_get_username(puri);
const char *domain=linphone_uri_get_domain(puri); const char *domain=linphone_address_get_domain(puri);
LinphoneFriend *lf=NULL; LinphoneFriend *lf=NULL;
if (puri==NULL){ if (puri==NULL){
...@@ -664,14 +664,14 @@ LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const ch ...@@ -664,14 +664,14 @@ LinphoneFriend *linphone_core_get_friend_by_uri(const LinphoneCore *lc, const ch
} }
for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){ for(elem=lc->friends;elem!=NULL;elem=ms_list_next(elem)){
lf=(LinphoneFriend*)elem->data; lf=(LinphoneFriend*)elem->data;
const char *it_username=linphone_uri_get_username(lf->uri); const char *it_username=linphone_address_get_username(lf->uri);
const char *it_host=linphone_uri_get_domain(lf->uri);; const char *it_host=linphone_address_get_domain(lf->uri);;
if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){ if (strcasecmp(domain,it_host)==0 && username_match(username,it_username)){
break; break;
} }
lf=NULL; lf=NULL;
} }
linphone_uri_destroy(puri); linphone_address_destroy(puri);
return lf; return lf;
} }
...@@ -760,7 +760,7 @@ void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf, ...@@ -760,7 +760,7 @@ void linphone_friend_write_to_config_file(LpConfig *config, LinphoneFriend *lf,
return; return;
} }
if (lf->uri!=NULL){ if (lf->uri!=NULL){
tmp=linphone_uri_as_string(lf->uri); tmp=linphone_address_as_string(lf->uri);
if (tmp==NULL) { if (tmp==NULL) {
return; return;
} }
......
...@@ -73,7 +73,7 @@ int lc_callback_obj_invoke(LCCallbackObj *obj, LinphoneCore *lc){ ...@@ -73,7 +73,7 @@ int lc_callback_obj_invoke(LCCallbackObj *obj, LinphoneCore *lc){
return 0; return 0;
} }
static void linphone_call_init_common(LinphoneCall *call, LinphoneUri *from, LinphoneUri *to){ static void linphone_call_init_common(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
call->state=LCStateInit; call->state=LCStateInit;
call->start_time=time(NULL); call->start_time=time(NULL);
call->media_start_time=0; call->media_start_time=0;
...@@ -102,7 +102,7 @@ static void discover_mtu(LinphoneCore *lc, const char *remote){ ...@@ -102,7 +102,7 @@ static void discover_mtu(LinphoneCore *lc, const char *remote){
} }
} }
LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneUri *from, LinphoneUri *to) LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to)
{ {
LinphoneCall *call=ms_new0(LinphoneCall,1); LinphoneCall *call=ms_new0(LinphoneCall,1);
call->dir=LinphoneCallOutgoing; call->dir=LinphoneCallOutgoing;
...@@ -110,20 +110,20 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneUri ...@@ -110,20 +110,20 @@ LinphoneCall * linphone_call_new_outgoing(struct _LinphoneCore *lc, LinphoneUri
call->did=-1; call->did=-1;
call->tid=-1; call->tid=-1;
call->core=lc; call->core=lc;
linphone_core_get_local_ip(lc,linphone_uri_get_domain(to),call->localip); linphone_core_get_local_ip(lc,linphone_address_get_domain(to),call->localip);
linphone_call_init_common(call,from,to); linphone_call_init_common(call,from,to);
call->sdpctx=sdp_handler_create_context(&linphone_sdphandler, call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip, call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
linphone_uri_get_username (from),NULL); linphone_address_get_username (from),NULL);
sdp_context_set_user_pointer(call->sdpctx,(void*)call); sdp_context_set_user_pointer(call->sdpctx,(void*)call);
discover_mtu(lc,linphone_uri_get_domain (to)); discover_mtu(lc,linphone_address_get_domain (to));
return call; return call;
} }
LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneUri *from, LinphoneUri *to, eXosip_event_t *ev){ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *from, LinphoneAddress *to, eXosip_event_t *ev){
LinphoneCall *call=ms_new0(LinphoneCall,1); LinphoneCall *call=ms_new0(LinphoneCall,1);
LinphoneUri *me=linphone_core_get_primary_contact_parsed(lc); LinphoneAddress *me=linphone_core_get_primary_contact_parsed(lc);
osip_header_t *h=NULL; osip_header_t *h=NULL;
call->dir=LinphoneCallIncoming; call->dir=LinphoneCallIncoming;
...@@ -132,16 +132,16 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneUri *from, L ...@@ -132,16 +132,16 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneUri *from, L
call->tid=ev->tid; call->tid=ev->tid;
call->core=lc; call->core=lc;
linphone_uri_clean(from); linphone_address_clean(from);
linphone_core_get_local_ip(lc,linphone_uri_get_domain(from),call->localip); linphone_core_get_local_ip(lc,linphone_address_get_domain(from),call->localip);
linphone_call_init_common(call, from, to); linphone_call_init_common(call, from, to);
call->sdpctx=sdp_handler_create_context(&linphone_sdphandler, call->sdpctx=sdp_handler_create_context(&linphone_sdphandler,
call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip, call->audio_params.natd_port>0 ? call->audio_params.natd_addr : call->localip,
linphone_uri_get_username (me),NULL); linphone_address_get_username (me),NULL);
sdp_context_set_user_pointer(call->sdpctx,(void*)call); sdp_context_set_user_pointer(call->sdpctx,(void*)call);
discover_mtu(lc,linphone_uri_get_domain(from)); discover_mtu(lc,linphone_address_get_domain(from));
linphone_uri_destroy(me); linphone_address_destroy(me);
osip_message_header_get_byname(ev->request,"Session-expires",0,&h); osip_message_header_get_byname(ev->request,"Session-expires",0,&h);
if (h) call->supports_session_timers=TRUE; if (h) call->supports_session_timers=TRUE;
return call; return call;
...@@ -162,7 +162,7 @@ static size_t my_strftime(char *s, size_t max, const char *fmt, const struct t ...@@ -162,7 +162,7 @@ static size_t my_strftime(char *s, size_t max, const char *fmt, const struct t
return strftime(s, max, fmt, tm); return strftime(s, max, fmt, tm);
} }
LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneUri *from, LinphoneUri *to){ LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, LinphoneAddress *from, LinphoneAddress *to){
LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1); LinphoneCallLog *cl=ms_new0(LinphoneCallLog,1);
struct tm loctime; struct tm loctime;
cl->dir=call->dir; cl->dir=call->dir;
...@@ -215,8 +215,8 @@ void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call){ ...@@ -215,8 +215,8 @@ void linphone_call_log_completed(LinphoneCallLog *calllog, LinphoneCall *call){
char * linphone_call_log_to_str(LinphoneCallLog *cl){ char * linphone_call_log_to_str(LinphoneCallLog *cl){
char *status; char *status;
char *tmp; char *tmp;
char *from=linphone_uri_as_string (cl->from); char *from=linphone_address_as_string (cl->from);
char *to=linphone_uri_as_string (cl->to); char *to=linphone_address_as_string (cl->to);
switch(cl->status){ switch(cl->status){
case LinphoneCallAborted: case LinphoneCallAborted:
status=_("aborted"); status=_("aborted");
...@@ -256,7 +256,7 @@ int linphone_core_get_current_call_duration(const LinphoneCore *lc){ ...@@ -256,7 +256,7 @@ int linphone_core_get_current_call_duration(const LinphoneCore *lc){
return time(NULL)-call->media_start_time; return time(NULL)-call->media_start_time;
} }
const LinphoneUri *linphone_core_get_remote_uri(LinphoneCore *lc){ const LinphoneAddress *linphone_core_get_remote_uri(LinphoneCore *lc){
LinphoneCall *call=lc->call; LinphoneCall *call=lc->call;
if (call==NULL) return 0; if (call==NULL) return 0;
return call->dir==LinphoneCallIncoming ? call->log->from : call->log->to; return call->dir==LinphoneCallIncoming ? call->log->from : call->log->to;
...@@ -859,8 +859,8 @@ bool_t linphone_core_get_guess_hostname(LinphoneCore *lc){ ...@@ -859,8 +859,8 @@ bool_t linphone_core_get_guess_hostname(LinphoneCore *lc){
return lc->sip_conf.guess_hostname; return lc->sip_conf.guess_hostname;
} }
LinphoneUri *linphone_core_get_primary_contact_parsed(LinphoneCore *lc){ LinphoneAddress *linphone_core_get_primary_contact_parsed(LinphoneCore *lc){
return linphone_uri_new(linphone_core_get_primary_contact(lc)); return linphone_address_new(linphone_core_get_primary_contact(lc));
} }
int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs) int linphone_core_set_audio_codecs(LinphoneCore *lc, MSList *codecs)
...@@ -1086,9 +1086,9 @@ static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig ...@@ -1086,9 +1086,9 @@ static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig
LinphoneFriend *lf=(LinphoneFriend*)elem->data; LinphoneFriend *lf=(LinphoneFriend*)elem->data;
if (lf->info==NULL){ if (lf->info==NULL){
if (linphone_core_lookup_known_proxy(lc,lf->uri)==cfg){ if (linphone_core_lookup_known_proxy(lc,lf->uri)==cfg){
if (linphone_uri_get_username(lf->uri)!=NULL){ if (linphone_address_get_username(lf->uri)!=NULL){
BuddyLookupRequest *req; BuddyLookupRequest *req;
char *tmp=linphone_uri_as_string_without_display_name(lf->uri); char *tmp=linphone_address_as_string_uri_only(lf->uri);
req=sip_setup_context_create_buddy_lookup_request(ctx); req=sip_setup_context_create_buddy_lookup_request(ctx);
buddy_lookup_request_set_key(req,tmp); buddy_lookup_request_set_key(req,tmp);
buddy_lookup_request_set_max_results(req,1); buddy_lookup_request_set_max_results(req,1);
...@@ -1229,7 +1229,7 @@ static char *guess_route_if_any(LinphoneCore *lc, osip_to_t *parsed_url){ ...@@ -1229,7 +1229,7 @@ static char *guess_route_if_any(LinphoneCore *lc, osip_to_t *parsed_url){
return NULL; return NULL;
} }