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

Add linphone_friend_get_name().

parent 2cf1ff7e
......@@ -207,7 +207,7 @@ void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char
}
}
int linphone_friend_set_addr(LinphoneFriend *lf, const LinphoneAddress *addr){
int linphone_friend_set_address(LinphoneFriend *lf, const LinphoneAddress *addr){
LinphoneAddress *fr=linphone_address_clone(addr);
linphone_address_clean(fr);
if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
......@@ -288,6 +288,12 @@ const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf){
return lf->uri;
}
const char * linphone_friend_get_name(const LinphoneFriend *lf) {
LinphoneAddress *fr = lf->uri;
if (fr == NULL) return NULL;
return linphone_address_get_display_name(fr);
}
bool_t linphone_friend_get_send_subscribe(const LinphoneFriend *lf){
return lf->subscribe;
}
......
......@@ -101,11 +101,10 @@ typedef enum _LinphoneOnlineStatus{
* Pending
*/
LinphoneStatusPending,
/**
* Vacation
*/
LinphoneStatusVacation,
/**
* Vacation
*/
LinphoneStatusVacation,
LinphoneStatusEnd
}LinphoneOnlineStatus;
......@@ -136,25 +135,39 @@ LINPHONE_PUBLIC LinphoneFriend *linphone_friend_new_with_addr(const char *addr);
LINPHONE_PUBLIC void linphone_friend_destroy(LinphoneFriend *lf);
/**
* set #LinphoneAddress for this friend
* Set #LinphoneAddress for this friend
* @param fr #LinphoneFriend object
* @param address #LinphoneAddress
*/
LINPHONE_PUBLIC int linphone_friend_set_addr(LinphoneFriend *fr, const LinphoneAddress* address);
LINPHONE_PUBLIC int linphone_friend_set_address(LinphoneFriend *fr, const LinphoneAddress* address);
/**
* Set #LinphoneAddress for this friend
* @deprecated Use #linphone_friend_set_address instead
*/
#define linphone_friend_set_addr linphone_friend_set_address
/**
* set the display name for this friend
* Get address of this friend
* @param lf #LinphoneFriend object
* @return #LinphoneAddress
*/
LINPHONE_PUBLIC const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf);
/**
* Set the display name for this friend
* @param lf #LinphoneFriend object
* @param name
*/
LINPHONE_PUBLIC int linphone_friend_set_name(LinphoneFriend *lf, const char *name);
/**
* get address of this friend
* Get the display name for this friend
* @param lf #LinphoneFriend object
* @return #LinphoneAddress
* @return The display name of this friend
*/
LINPHONE_PUBLIC const LinphoneAddress *linphone_friend_get_address(const LinphoneFriend *lf);
LINPHONE_PUBLIC const char * linphone_friend_get_name(const LinphoneFriend *lf);
/**
* get subscription flag value
* @param lf #LinphoneFriend object
......
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