mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
fetch and display of buddy icons works.
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@728 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
c58e884ef7
commit
19bd9a2bac
5 changed files with 16 additions and 6 deletions
|
|
@ -1040,7 +1040,9 @@ static void assign_buddy_info(LinphoneCore *lc, BuddyInfo *info){
|
|||
LinphoneFriend *lf=linphone_core_get_friend_by_uri(lc,info->sip_uri);
|
||||
if (lf!=NULL){
|
||||
lf->info=info;
|
||||
ms_message("%s has a BuddyInfo assigned.",info->sip_uri);
|
||||
ms_message("%s has a BuddyInfo assigned with image %p",info->sip_uri, info->image_data);
|
||||
if (lc->vtable.buddy_info_updated)
|
||||
lc->vtable.buddy_info_updated(lc,lf);
|
||||
}else{
|
||||
ms_warning("Could not any friend with uri %s",info->sip_uri);
|
||||
}
|
||||
|
|
@ -1076,16 +1078,14 @@ static void linphone_core_grab_buddy_infos(LinphoneCore *lc, LinphoneProxyConfig
|
|||
if (lf->info==NULL){
|
||||
char *url=linphone_friend_get_url(lf);
|
||||
if (linphone_core_lookup_known_proxy(lc,url)==cfg){
|
||||
char *name=linphone_friend_get_name(lf);
|
||||
if (name!=NULL && strlen(name)>0){
|
||||
if (lf->url->url->username!=NULL && lf->url->url->username[0]!='0'){
|
||||
BuddyLookupRequest *req;
|
||||
req=sip_setup_context_create_buddy_lookup_request(ctx);
|
||||
buddy_lookup_request_set_key(req,name);
|
||||
buddy_lookup_request_set_key(req,lf->url->url->username);
|
||||
buddy_lookup_request_set_max_results(req,1);
|
||||
sip_setup_context_buddy_lookup_submit(ctx,req);
|
||||
lc->bl_reqs=ms_list_append(lc->bl_reqs,req);
|
||||
}
|
||||
ms_free(name);
|
||||
}
|
||||
ms_free(url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ typedef void (*TextMessageReceived)(struct _LinphoneCore *lc, LinphoneChatRoom *
|
|||
typedef void (*GeneralStateChange)(struct _LinphoneCore *lc, LinphoneGeneralState *gstate);
|
||||
typedef void (*DtmfReceived)(struct _LinphoneCore* lc, int dtmf);
|
||||
typedef void (*ReferReceived)(struct _LinphoneCore *lc, const char *refer_to);
|
||||
typedef void (*BuddyInfoUpdated)(struct _LinphoneCore *lc, LinphoneFriend *lf);
|
||||
|
||||
typedef struct _LinphoneVTable
|
||||
{
|
||||
|
|
@ -426,6 +427,7 @@ typedef struct _LinphoneVTable
|
|||
GeneralStateChange general_state;
|
||||
DtmfReceived dtmf_received;
|
||||
ReferReceived refer_received;
|
||||
BuddyInfoUpdated buddy_info_updated;
|
||||
} LinphoneCoreVTable;
|
||||
|
||||
typedef struct _LCCallbackObj
|
||||
|
|
|
|||
|
|
@ -571,3 +571,9 @@ gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventBut
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
|
||||
/*refresh the entire list*/
|
||||
linphone_gtk_show_friends();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ void linphone_gtk_log_show(void);
|
|||
void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
|
||||
void linphone_gtk_destroy_log_window(void);
|
||||
gboolean linphone_gtk_check_logs();
|
||||
void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
|
||||
const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
|
||||
int linphone_gtk_get_ui_config_int(const char *key, int def);
|
||||
void linphone_gtk_set_ui_config_int(const char *key , int val);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,8 @@ static LinphoneCoreVTable vtable={
|
|||
.call_log_updated=linphone_gtk_call_log_updated,
|
||||
.text_received=linphone_gtk_text_received,
|
||||
.general_state=linphone_gtk_general_state,
|
||||
.refer_received=linphone_gtk_refer_received
|
||||
.refer_received=linphone_gtk_refer_received,
|
||||
.buddy_info_updated=linphone_gtk_buddy_info_updated
|
||||
};
|
||||
|
||||
static gboolean verbose=0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue