Liblinphone 5.0.0

Macros | Typedefs | Enumerations | Functions
Buddy list

Managing Buddies and buddy list and presence. More...

## Macros
#define | linphone_friend_get_send_subscribe linphone_friend_subscribes_enabled
#define | linphone_friend_send_subscribe linphone_friend_enable_subscribes

## Typedefs
typedef void(* | LinphoneFriendListCbsContactCreatedCb) (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)
| Callback used to notify a new contact has been created on the CardDAV server and downloaded locally. More...
typedef void(* | LinphoneFriendListCbsContactDeletedCb) (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)
| Callback used to notify a contact has been deleted on the CardDAV server. More...
typedef void(* | LinphoneFriendListCbsContactUpdatedCb) (LinphoneFriendList *friend_list, LinphoneFriend *new_friend, LinphoneFriend *old_friend)
| Callback used to notify a contact has been updated on the CardDAV server. More...
typedef void(* | LinphoneFriendListCbsSyncStateChangedCb) (LinphoneFriendList *friend_list, LinphoneFriendListSyncStatus status, const char *message)
| Callback used to notify the status of the synchronization has changed. More...
typedef void(* | LinphoneFriendListCbsPresenceReceivedCb) (LinphoneFriendList *friend_list, const bctbx_list_t *friends)
| Callback used to notify a list with all friends that have received presence information. More...
typedef struct _LinphoneFriend | LinphoneFriend
| This object is used to store a SIP address. More...
typedef enum _LinphoneFriendCapability | LinphoneFriendCapability
| Enum describing the capabilities of a LinphoneFriend, populated through presence subscribe/notify process.
typedef struct _LinphoneFriendList | LinphoneFriendList
| This object representing a list of LinphoneFriend. More...
typedef struct _LinphoneFriendListCbs | LinphoneFriendListCbs
| An object to handle the callbacks for LinphoneFriend synchronization.
typedef enum _LinphoneFriendListStatus | LinphoneFriendListStatus
| Enum describing the status of a LinphoneFriendList operation.
typedef enum _LinphoneFriendListSyncStatus | LinphoneFriendListSyncStatus
| Enum describing the status of a CardDAV synchronization.
typedef enum _LinphoneConsolidatedPresence | LinphoneConsolidatedPresence
| Consolidated presence information: 'online' means the user is open for communication, 'busy' means the user is open for communication but involved in an other activity, 'do not disturb' means the user is not open for communication, and 'offline' means that no presence information is available.
typedef struct _LinphonePresenceActivity | LinphonePresenceActivity
| Presence activity type holding information about a presence activity.
typedef enum LinphonePresenceActivityType | LinphonePresenceActivityType
| Activities as defined in section 3.2 of RFC 4480.
typedef enum LinphonePresenceBasicStatus | LinphonePresenceBasicStatus
| Basic status as defined in section 4.1.4 of RFC 3863.
typedef struct _LinphonePresenceModel | LinphonePresenceModel
| Presence model type holding information about the presence of a person.
typedef struct _LinphonePresenceNote | LinphonePresenceNote
| Presence note type holding information about a presence note.
typedef struct _LinphonePresencePerson | LinphonePresencePerson
| Presence person holding information about a presence person.
typedef struct _LinphonePresenceService | LinphonePresenceService
| Presence service type holding information about a presence service.
typedef enum _LinphoneSubscribePolicy | LinphoneSubscribePolicy
| Enum controlling behavior for incoming subscription request. More...

## Enumerations
enum | _LinphoneFriendCapability { LinphoneFriendCapabilityNone = 0 , LinphoneFriendCapabilityGroupChat = 1 << 0 , LinphoneFriendCapabilityLimeX3dh = 1 << 1 , LinphoneFriendCapabilityEphemeralMessages = 1 << 2 }
| Enum describing the capabilities of a LinphoneFriend, populated through presence subscribe/notify process. More...
enum | _LinphoneFriendListStatus { LinphoneFriendListOK = 0 , LinphoneFriendListNonExistentFriend = 1 , LinphoneFriendListInvalidFriend = 2 }
| Enum describing the status of a LinphoneFriendList operation. More...
enum | _LinphoneFriendListSyncStatus { LinphoneFriendListSyncStarted = 0 , LinphoneFriendListSyncSuccessful = 1 , LinphoneFriendListSyncFailure = 2 }
| Enum describing the status of a CardDAV synchronization. More...
enum | _LinphoneConsolidatedPresence { LinphoneConsolidatedPresenceOnline = 0 , LinphoneConsolidatedPresenceBusy = 1 , LinphoneConsolidatedPresenceDoNotDisturb = 2 , LinphoneConsolidatedPresenceOffline = 3 }
| Consolidated presence information: 'online' means the user is open for communication, 'busy' means the user is open for communication but involved in an other activity, 'do not disturb' means the user is not open for communication, and 'offline' means that no presence information is available.
enum | LinphonePresenceActivityType { LinphonePresenceActivityAppointment = 0 , LinphonePresenceActivityAway = 1 , LinphonePresenceActivityBreakfast = 2 , LinphonePresenceActivityBusy = 3 , LinphonePresenceActivityDinner = 4 , LinphonePresenceActivityHoliday = 5 , LinphonePresenceActivityInTransit = 6 , LinphonePresenceActivityLookingForWork = 7 , LinphonePresenceActivityLunch = 8 , LinphonePresenceActivityMeal = 9 , LinphonePresenceActivityMeeting = 10 , LinphonePresenceActivityOnThePhone = 11 , LinphonePresenceActivityOther = 12 , LinphonePresenceActivityPerformance = 13 , LinphonePresenceActivityPermanentAbsence = 14 , LinphonePresenceActivityPlaying = 15 , LinphonePresenceActivityPresentation = 16 , LinphonePresenceActivityShopping = 17 , LinphonePresenceActivitySleeping = 18 , LinphonePresenceActivitySpectator = 19 , LinphonePresenceActivitySteering = 20 , LinphonePresenceActivityTravel = 21 , LinphonePresenceActivityTV = 22 , LinphonePresenceActivityUnknown = 23 , LinphonePresenceActivityVacation = 24 , LinphonePresenceActivityWorking = 25 , LinphonePresenceActivityWorship = 26 }
| Activities as defined in section 3.2 of RFC 4480. More...
enum | LinphonePresenceBasicStatus { LinphonePresenceBasicStatusOpen = 0 , LinphonePresenceBasicStatusClosed = 1 }
| Basic status as defined in section 4.1.4 of RFC 3863. More...
enum | _LinphoneSubscribePolicy { LinphoneSPWait = 0 , LinphoneSPDeny = 1 , LinphoneSPAccept = 2 }
| Enum controlling behavior for incoming subscription request. More...

## Functions
LinphoneFriend * | linphone_core_create_friend (LinphoneCore *core)
| Create a default LinphoneFriend. More...
LinphoneFriend * | linphone_core_create_friend_with_address (LinphoneCore *core, const char *address)
| Create a LinphoneFriend from the given address. More...
void | linphone_core_set_presence_model (LinphoneCore *core, LinphonePresenceModel *presence)
| Set my presence model. More...
LinphonePresenceModel * | linphone_core_get_presence_model (const LinphoneCore *core)
| Get my presence model. More...
LinphoneConsolidatedPresence | linphone_core_get_consolidated_presence (const LinphoneCore *core)
| Get my consolidated presence. More...
void | linphone_core_set_consolidated_presence (LinphoneCore *core, LinphoneConsolidatedPresence presence)
| Set my consolidated presence. More...
void | linphone_core_reject_subscriber (LinphoneCore *core, LinphoneFriend *linphone_friend)
| Black list a friend. More...
void | linphone_core_notify_all_friends (LinphoneCore *core, LinphonePresenceModel *presence)
| Notify all friends that have subscribed. More...
LinphoneFriend * | linphone_core_find_friend (const LinphoneCore *core, const LinphoneAddress *address)
| Search a LinphoneFriend by its address. More...
LinphoneFriend * | linphone_core_find_friend_by_phone_number (const LinphoneCore *core, const char *phone_number)
| Search a LinphoneFriend by its phone number. More...
bctbx_list_t * | linphone_core_find_friends (const LinphoneCore *core, const LinphoneAddress *address)
| Search all LinphoneFriend matching an address. More...
LinphoneFriend * | linphone_core_get_friend_by_ref_key (const LinphoneCore *core, const char *key)
| Search a LinphoneFriend by its reference key. More...
LinphoneFriendList * | linphone_core_create_friend_list (LinphoneCore *core)
| Create a new empty LinphoneFriendList object. More...
void | linphone_core_add_friend_list (LinphoneCore *core, LinphoneFriendList *list)
| Add a friend list. More...
void | linphone_core_remove_friend_list (LinphoneCore *core, LinphoneFriendList *list)
| Removes a friend list. More...
const bctbx_list_t * | linphone_core_get_friends_lists (const LinphoneCore *core)
| Retrieves the list of LinphoneFriendList from the core. More...
LinphoneFriendList * | linphone_core_get_default_friend_list (const LinphoneCore *core)
| Retrieves the first list of LinphoneFriend from the core. More...
LinphoneFriendList * | linphone_core_get_friend_list_by_name (const LinphoneCore *core, const char *name)
| Retrieves the list of LinphoneFriend from the core that has the given display name. More...
void | linphone_core_enable_friend_list_subscription (LinphoneCore *core, bool_t enable)
| Sets whether or not to start friend lists subscription when in foreground. More...
bool_t | linphone_core_is_friend_list_subscription_enabled (LinphoneCore *core)
| Returns whether or not friend lists subscription are enabled. More...
const bctbx_list_t * | linphone_core_find_contacts_by_char (LinphoneCore *core, const char *filter, bool_t sip_only)
| Retrieves a list of LinphoneAddress sort and filter. More...
LinphonePresenceActivity * | linphone_core_create_presence_activity (LinphoneCore *core, LinphonePresenceActivityType acttype, const char *description)
| Create a LinphonePresenceActivity with the given type and description. More...
LinphonePresenceModel * | linphone_core_create_presence_model (LinphoneCore *core)
| Create a default LinphonePresenceModel. More...
LinphonePresenceModel * | linphone_core_create_presence_model_with_activity (LinphoneCore *core, LinphonePresenceActivityType acttype, const char *description)
| Create a LinphonePresenceModel with the given activity type and activity description. More...
LinphonePresenceModel * | linphone_core_create_presence_model_with_activity_and_note (LinphoneCore *core, LinphonePresenceActivityType acttype, const char *description, const char *note, const char *lang)
| Create a LinphonePresenceModel with the given activity type, activity description, note content and note language. More...
LinphonePresenceNote * | linphone_core_create_presence_note (LinphoneCore *core, const char *content, const char *lang)
| Create a LinphonePresenceNote with the given content and language. More...
LinphonePresencePerson * | linphone_core_create_presence_person (LinphoneCore *core, const char *id)
| Create a LinphonePresencePerson with the given id. More...
LinphonePresenceService * | linphone_core_create_presence_service (LinphoneCore *core, const char *id, LinphonePresenceBasicStatus basic_status, const char *contact)
| Create a LinphonePresenceService with the given id, basic status and contact. More...
void | linphone_core_notify_notify_presence_received (LinphoneCore *core, LinphoneFriend *linphone_friend)
| Notifies the upper layer that a presence status has been received by calling the appropriate callback if one has been set. More...
void | linphone_core_notify_notify_presence_received_for_uri_or_tel (LinphoneCore *core, LinphoneFriend *linphone_friend, const char *uri_or_tel, const LinphonePresenceModel *presence_model)
| Notifies the upper layer that a presence model change has been received for the uri or telephone number given as a parameter, by calling the appropriate callback if one has been set. More...
void | linphone_core_set_max_size_for_auto_download_incoming_files (LinphoneCore *core, int size)
| Sets the size under which incoming files in chat messages will be downloaded automatically. More...
int | linphone_core_get_max_size_for_auto_download_incoming_files (LinphoneCore *core)
| Gets the size under which incoming files in chat messages will be downloaded automatically. More...
bool_t | linphone_core_is_sender_name_hidden_in_forward_message (LinphoneCore *core)
| Returns whether or not sender name is hidden in forward message. More...
void | linphone_core_enable_sender_name_hidden_in_forward_message (LinphoneCore *core, bool_t enable)
| Enable whether or not to hide sender name in forward message. More...
LinphoneStatus | linphone_friend_set_address (LinphoneFriend *fr, const LinphoneAddress *address)
| Set LinphoneAddress for this friend. More...
const LinphoneAddress * | linphone_friend_get_address (const LinphoneFriend *linphone_friend)
| Get address of this friend. More...
void | linphone_friend_add_address (LinphoneFriend *linphone_friend, const LinphoneAddress *address)
| Adds an address in this friend. More...
const bctbx_list_t * | linphone_friend_get_addresses (const LinphoneFriend *linphone_friend)
| Returns a list of LinphoneAddress for this friend. More...
void | linphone_friend_remove_address (LinphoneFriend *linphone_friend, const LinphoneAddress *address)
| Removes an address in this friend. More...
void | linphone_friend_add_phone_number (LinphoneFriend *linphone_friend, const char *phone_number)
| Adds a phone number in this friend. More...
bctbx_list_t * | linphone_friend_get_phone_numbers (const LinphoneFriend *linphone_friend)
| Returns a list of phone numbers for this friend. More...
bool_t | linphone_friend_has_phone_number (const LinphoneFriend *linphone_friend, const char *phone_number)
| Returns whether a friend contains the given phone number. More...
void | linphone_friend_remove_phone_number (LinphoneFriend *linphone_friend, const char *phone_number)
| Removes a phone number in this friend. More...
LinphoneStatus | linphone_friend_set_name (LinphoneFriend *linphone_friend, const char *name)
| Set the display name for this friend. More...
const char * | linphone_friend_get_name (const LinphoneFriend *linphone_friend)
| Get the display name for this friend. More...
bool_t | linphone_friend_subscribes_enabled (const LinphoneFriend *linphone_friend)
| get subscription flag value More...
LinphoneStatus | linphone_friend_enable_subscribes (LinphoneFriend *fr, bool_t enable)
| Configure LinphoneFriend to subscribe to presence information. More...
LinphoneStatus | linphone_friend_set_inc_subscribe_policy (LinphoneFriend *fr, LinphoneSubscribePolicy policy)
| Configure incoming subscription policy for this friend. More...
LinphoneSubscribePolicy | linphone_friend_get_inc_subscribe_policy (const LinphoneFriend *linphone_friend)
| get current subscription policy for this LinphoneFriend More...
void | linphone_friend_edit (LinphoneFriend *linphone_friend)
| Starts editing a friend configuration. More...
void | linphone_friend_done (LinphoneFriend *linphone_friend)
| Commits modification made to the friend configuration. More...
LinphoneSubscriptionState | linphone_friend_get_subscription_state (const LinphoneFriend *linphone_friend)
| Get subscription state of a friend. More...
const LinphonePresenceModel * | linphone_friend_get_presence_model (const LinphoneFriend *linphone_friend)
| Get the presence model of a friend. More...
LinphoneConsolidatedPresence | linphone_friend_get_consolidated_presence (const LinphoneFriend *linphone_friend)
| Get the consolidated presence of a friend. More...
const LinphonePresenceModel * | linphone_friend_get_presence_model_for_uri_or_tel (const LinphoneFriend *linphone_friend, const char *uri_or_tel)
| Get the presence model for a specific SIP URI or phone number of a friend. More...
void | linphone_friend_set_presence_model (LinphoneFriend *linphone_friend, LinphonePresenceModel *presence)
| Set the presence model of a friend. More...
void | linphone_friend_set_presence_model_for_uri_or_tel (LinphoneFriend *linphone_friend, const char *uri_or_tel, LinphonePresenceModel *presence)
| Set the presence model for a specific SIP URI or phone number of a friend. More...
bool_t | linphone_friend_is_presence_received (const LinphoneFriend *linphone_friend)
| Tells whether we already received presence information for a friend. More...
void | linphone_friend_set_user_data (LinphoneFriend *linphone_friend, void *user_data)
| Store user pointer to friend object. More...
void * | linphone_friend_get_user_data (const LinphoneFriend *linphone_friend)
| Retrieve user data associated with friend. More...
BuddyInfo * | linphone_friend_get_info (const LinphoneFriend *linphone_friend)
void | linphone_friend_set_ref_key (LinphoneFriend *linphone_friend, const char *key)
| Set the reference key of a friend. More...
const char * | linphone_friend_get_ref_key (const LinphoneFriend *linphone_friend)
| Get the reference key of a friend. More...
bool_t | linphone_friend_in_list (const LinphoneFriend *linphone_friend)
| Check that the given friend is in a friend list. More...
LinphoneFriend * | linphone_friend_ref (LinphoneFriend *linphone_friend)
| Acquire a reference to the linphone friend. More...
void | linphone_friend_unref (LinphoneFriend *linphone_friend)
| Release a reference to the linphone friend. More...
LinphoneCore * | linphone_friend_get_core (const LinphoneFriend *linphone_friend)
| Returns the LinphoneCore object managing this friend, if any. More...
LinphoneVcard * | linphone_friend_get_vcard (const LinphoneFriend *linphone_friend)
| Returns the vCard object associated to this friend, if any. More...
void | linphone_friend_set_vcard (LinphoneFriend *linphone_friend, LinphoneVcard *vcard)
| Binds a vCard object to a friend. More...
bool_t | linphone_friend_create_vcard (LinphoneFriend *linphone_friend, const char *name)
| Creates a vCard object associated to this friend if there isn't one yet and if the full name is available, either by the parameter or the one in the friend's SIP URI. More...
LinphoneFriend * | linphone_friend_new_from_vcard (LinphoneVcard *vcard)
| Contructor same as linphone_friend_new() + linphone_friend_set_address() More...
void | linphone_friend_save (LinphoneFriend *linphone_friend, LinphoneCore *core)
| Saves a friend either in database if configured, otherwise in linphonerc. More...
int | linphone_friend_get_capabilities (const LinphoneFriend *linphone_friend)
| Returns the capabilities associated to this friend. More...
bool_t | linphone_friend_has_capability (const LinphoneFriend *linphone_friend, const LinphoneFriendCapability capability)
| Returns whether or not a friend has a capbility. More...
bool_t | linphone_friend_has_capability_with_version (const LinphoneFriend *linphone_friend, const LinphoneFriendCapability capability, float version)
| Returns whether or not a friend has a capbility with a given version. More...
bool_t | linphone_friend_has_capability_with_version_or_more (const LinphoneFriend *linphone_friend, const LinphoneFriendCapability capability, float version)
| Returns whether or not a friend has a capbility with a given version or more. More...
float | linphone_friend_get_capability_version (const LinphoneFriend *linphone_friend, const LinphoneFriendCapability capability)
| Returns the version of a friend's capbility. More...
void | linphone_friend_remove (LinphoneFriend *linphone_friend)
| Removes a friend from it's friend list and from the rc if exists. More...
MS2_DEPRECATED LinphoneFriend * | linphone_friend_new (void)
| Contructor. More...
MS2_DEPRECATED LinphoneFriend * | linphone_friend_new_with_address (const char *addr)
| Contructor same as linphone_friend_new() + linphone_friend_set_address() More...
MS2_DEPRECATED void | linphone_friend_destroy (LinphoneFriend *linphone_friend)
| Destroy a LinphoneFriend. More...
MS2_DEPRECATED LinphoneOnlineStatus | linphone_friend_get_status (const LinphoneFriend *linphone_friend)
| Get the status of a friend. More...
LinphoneFriendList * | linphone_friend_list_ref (LinphoneFriendList *friend_list)
| Acquire a reference to the friend list. More...
void | linphone_friend_list_unref (LinphoneFriendList *friend_list)
| Release reference to the friend list. More...
void * | linphone_friend_list_get_user_data (const LinphoneFriendList *friend_list)
| Retrieve the user pointer associated with the friend list. More...
void | linphone_friend_list_set_user_data (LinphoneFriendList *friend_list, void *user_data)
| Assign a user pointer to the friend list. More...
const char * | linphone_friend_list_get_display_name (const LinphoneFriendList *friend_list)
| Get the display name of the friend list. More...
void | linphone_friend_list_set_display_name (LinphoneFriendList *friend_list, const char *display_name)
| Set the display name of the friend list. More...
const char * | linphone_friend_list_get_rls_uri (const LinphoneFriendList *friend_list)
| Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence. More...
void | linphone_friend_list_set_rls_uri (LinphoneFriendList *friend_list, const char *rls_uri)
| Set the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence. More...
const LinphoneAddress * | linphone_friend_list_get_rls_address (const LinphoneFriendList *friend_list)
| Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence. More...
void | linphone_friend_list_set_rls_address (LinphoneFriendList *friend_list, const LinphoneAddress *rls_addr)
| Set the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence. More...
LinphoneFriendListStatus | linphone_friend_list_add_friend (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)
| Add a friend to a friend list. More...
LinphoneFriendListStatus | linphone_friend_list_add_local_friend (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)
| Add a friend to a friend list. More...
LinphoneFriendListStatus | linphone_friend_list_remove_friend (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)
| Remove a friend from a friend list. More...
const bctbx_list_t * | linphone_friend_list_get_friends (const LinphoneFriendList *friend_list)
| Retrieves the list of LinphoneFriend from this LinphoneFriendList. More...
LinphoneFriend * | linphone_friend_list_find_friend_by_address (const LinphoneFriendList *friend_list, const LinphoneAddress *address)
| Find a friend in the friend list using a LinphoneAddress. More...
LinphoneFriend * | linphone_friend_list_find_friend_by_phone_number (const LinphoneFriendList *friend_list, const char *phone_number)
| Find a friend in the friend list using a phone number. More...
bctbx_list_t * | linphone_friend_list_find_friends_by_address (const LinphoneFriendList *friend_list, const LinphoneAddress *address)
| Find all friends in the friend list using a LinphoneAddress. More...
LinphoneFriend * | linphone_friend_list_find_friend_by_uri (const LinphoneFriendList *friend_list, const char *uri)
| Find a friend in the friend list using an URI string. More...
bctbx_list_t * | linphone_friend_list_find_friends_by_uri (const LinphoneFriendList *friend_list, const char *uri)
| Find all friends in the friend list using an URI string. More...
LinphoneFriend * | linphone_friend_list_find_friend_by_ref_key (const LinphoneFriendList *friend_list, const char *ref_key)
| Find a friend in the friend list using a ref key. More...
void | linphone_friend_list_update_subscriptions (LinphoneFriendList *friend_list)
| Update presence subscriptions for the entire list. More...
void | linphone_friend_list_notify_presence (LinphoneFriendList *friend_list, LinphonePresenceModel *presence)
| Notify our presence to all the friends in the friend list that have subscribed to our presence directly (not using a RLS). More...
const char * | linphone_friend_list_get_uri (const LinphoneFriendList *friend_list)
| Get the URI associated with the friend list. More...
void | linphone_friend_list_set_uri (LinphoneFriendList *friend_list, const char *uri)
| Set the URI associated with the friend list. More...
bool_t | linphone_friend_list_is_subscription_bodyless (LinphoneFriendList *friend_list)
| Get wheter the subscription of the friend list is bodyless or not. More...
void | linphone_friend_list_set_subscription_bodyless (LinphoneFriendList *friend_list, bool_t bodyless)
| Set wheter the subscription of the friend list is bodyless or not. More...
void | linphone_friend_list_update_revision (LinphoneFriendList *friend_list, int revision)
| Sets the revision from the last synchronization. More...
void | linphone_friend_list_add_callbacks (LinphoneFriendList *friend_list, LinphoneFriendListCbs *cbs)
| Adds the LinphoneFriendListCbs object associated with a LinphoneFriendList. More...
void | linphone_friend_list_remove_callbacks (LinphoneFriendList *friend_list, LinphoneFriendListCbs *cbs)
| Removes the LinphoneFriendListCbs object associated with a LinphoneFriendList. More...
LinphoneFriendListCbs * | linphone_friend_list_get_current_callbacks (const LinphoneFriendList *friend_list)
| Get the current LinphoneFriendListCbs object associated with a LinphoneFriendList. More...
LinphoneFriendListCbs * | linphone_friend_list_cbs_ref (LinphoneFriendListCbs *cbs)
| Acquire a reference to a LinphoneFriendListCbs object. More...
void | linphone_friend_list_cbs_unref (LinphoneFriendListCbs *cbs)
| Release a reference to a LinphoneFriendListCbs object. More...
void * | linphone_friend_list_cbs_get_user_data (const LinphoneFriendListCbs *cbs)
| Retrieve the user pointer associated with a LinphoneFriendListCbs object. More...
void | linphone_friend_list_cbs_set_user_data (LinphoneFriendListCbs *cbs, void *user_data)
| Assign a user pointer to a LinphoneFriendListCbs object. More...
LinphoneFriendListCbsContactCreatedCb | linphone_friend_list_cbs_get_contact_created (const LinphoneFriendListCbs *cbs)
| Get the contact created callback. More...
void | linphone_friend_list_cbs_set_contact_created (LinphoneFriendListCbs *cbs, LinphoneFriendListCbsContactCreatedCb cb)
| Set the contact created callback. More...
LinphoneFriendListCbsContactDeletedCb | linphone_friend_list_cbs_get_contact_deleted (const LinphoneFriendListCbs *cbs)
| Get the contact deleted callback. More...
void | linphone_friend_list_cbs_set_contact_deleted (LinphoneFriendListCbs *cbs, LinphoneFriendListCbsContactDeletedCb cb)
| Set the contact deleted callback. More...
LinphoneFriendListCbsContactUpdatedCb | linphone_friend_list_cbs_get_contact_updated (const LinphoneFriendListCbs *cbs)
| Get the contact updated callback. More...
void | linphone_friend_list_cbs_set_contact_updated (LinphoneFriendListCbs *cbs, LinphoneFriendListCbsContactUpdatedCb cb)
| Set the contact updated callback. More...
LinphoneFriendListCbsSyncStateChangedCb | linphone_friend_list_cbs_get_sync_status_changed (const LinphoneFriendListCbs *cbs)
| Get the sync status changed callback. More...
void | linphone_friend_list_cbs_set_sync_status_changed (LinphoneFriendListCbs *cbs, LinphoneFriendListCbsSyncStateChangedCb cb)
| Set the contact updated callback. More...
LinphoneFriendListCbsPresenceReceivedCb | linphone_friend_list_cbs_get_presence_received (const LinphoneFriendListCbs *cbs)
| Get the presence received callback. More...
void | linphone_friend_list_cbs_set_presence_received (LinphoneFriendListCbs *cbs, LinphoneFriendListCbsPresenceReceivedCb cb)
| Set the presence received callback. More...
void | linphone_friend_list_synchronize_friends_from_server (LinphoneFriendList *friend_list)
| Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri. More...
void | linphone_friend_list_update_dirty_friends (LinphoneFriendList *friend_list)
| Goes through all the LinphoneFriend that are dirty and does a CardDAV PUT to update the server. More...
LinphoneCore * | linphone_friend_list_get_core (const LinphoneFriendList *friend_list)
| Returns the LinphoneCore object attached to this LinphoneFriendList. More...
int | linphone_friend_list_import_friends_from_vcard4_file (LinphoneFriendList *friend_list, const char *vcard_file)
| Creates and adds LinphoneFriend objects to LinphoneFriendList from a file that contains the vCard(s) to parse. More...
int | linphone_friend_list_import_friends_from_vcard4_buffer (LinphoneFriendList *friend_list, const char *vcard_buffer)
| Creates and adds LinphoneFriend objects to LinphoneFriendList from a buffer that contains the vCard(s) to parse. More...
void | linphone_friend_list_export_friends_as_vcard4_file (LinphoneFriendList *friend_list, const char *vcard_file)
| Creates and export LinphoneFriend objects from LinphoneFriendList to a file using vCard 4 format. More...
void | linphone_friend_list_enable_subscriptions (LinphoneFriendList *friend_list, bool_t enabled)
| Enable subscription to NOTIFYes of all friends list. More...
bool_t | linphone_friend_list_subscriptions_enabled (LinphoneFriendList *friend_list)
| Gets whether subscription to NOTIFYes of all friends list are enabled or not. More...
MS2_DEPRECATED LinphoneFriendListCbs * | linphone_friend_list_get_callbacks (const LinphoneFriendList *friend_list)
| Get the LinphoneFriendListCbs object associated with a LinphoneFriendList. More...
LinphonePresenceModel * | linphone_presence_model_new_with_activity (LinphonePresenceActivityType activity, const char *description)
| Creates a presence model specifying an activity. More...
LinphonePresenceModel * | linphone_presence_model_new_with_activity_and_note (LinphonePresenceActivityType activity, const char *description, const char *note, const char *lang)
| Creates a presence model specifying an activity and adding a note. More...
LinphonePresenceBasicStatus | linphone_presence_model_get_basic_status (const LinphonePresenceModel *model)
| Gets the basic status of a presence model. More...
LinphoneStatus | linphone_presence_model_set_basic_status (LinphonePresenceModel *model, LinphonePresenceBasicStatus basic_status)
| Sets the basic status of a presence model. More...
time_t | linphone_presence_model_get_timestamp (const LinphonePresenceModel *model)
| Gets the timestamp of a presence model. More...
char * | linphone_presence_model_get_contact (const LinphonePresenceModel *model)
| Gets the contact of a presence model. More...
LinphoneStatus | linphone_presence_model_set_contact (LinphonePresenceModel *model, const char *contact)
| Sets the contact of a presence model. More...
LinphoneStatus | linphone_presence_model_set_presentity (LinphonePresenceModel *model, const LinphoneAddress *presentity)
| Sets the presentity of a presence model. More...
const LinphoneAddress * | linphone_presence_model_get_presentity (const LinphonePresenceModel *model)
| Gets the presentity of a presence model. More...
LinphonePresenceActivity * | linphone_presence_model_get_activity (const LinphonePresenceModel *model)
| Gets the first activity of a presence model (there is usually only one). More...
LinphoneStatus | linphone_presence_model_set_activity (LinphonePresenceModel *model, LinphonePresenceActivityType activity, const char *description)
| Sets the activity of a presence model (limits to only one activity). More...
unsigned int | linphone_presence_model_get_nb_activities (const LinphonePresenceModel *model)
| Gets the number of activities included in the presence model. More...
LinphonePresenceActivity * | linphone_presence_model_get_nth_activity (const LinphonePresenceModel *model, unsigned int index)
| Gets the nth activity of a presence model. More...
LinphoneStatus | linphone_presence_model_add_activity (LinphonePresenceModel *model, LinphonePresenceActivity *activity)
| Adds an activity to a presence model. More...
LinphoneStatus | linphone_presence_model_clear_activities (LinphonePresenceModel *model)
| Clears the activities of a presence model. More...
LinphonePresenceNote * | linphone_presence_model_get_note (const LinphonePresenceModel *model, const char *lang)
| Gets the first note of a presence model (there is usually only one). More...
LinphoneStatus | linphone_presence_model_add_note (LinphonePresenceModel *model, const char *note_content, const char *lang)
| Adds a note to a presence model. More...
LinphoneStatus | linphone_presence_model_clear_notes (LinphonePresenceModel *model)
| Clears all the notes of a presence model. More...
LinphoneConsolidatedPresence | linphone_presence_model_get_consolidated_presence (const LinphonePresenceModel *model)
| Get the consolidated presence from a presence model. More...
LinphonePresenceModel * | linphone_presence_model_new (void)
| Creates a default presence model. More...
unsigned int | linphone_presence_model_get_nb_services (const LinphonePresenceModel *model)
| Gets the number of services included in the presence model. More...
LinphonePresenceService * | linphone_presence_model_get_nth_service (const LinphonePresenceModel *model, unsigned int index)
| Gets the nth service of a presence model. More...
LinphoneStatus | linphone_presence_model_add_service (LinphonePresenceModel *model, LinphonePresenceService *service)
| Adds a service to a presence model. More...
LinphoneStatus | linphone_presence_model_clear_services (LinphonePresenceModel *model)
| Clears the services of a presence model. More...
unsigned int | linphone_presence_model_get_nb_persons (const LinphonePresenceModel *model)
| Gets the number of persons included in the presence model. More...
LinphonePresencePerson * | linphone_presence_model_get_nth_person (const LinphonePresenceModel *model, unsigned int index)
| Gets the nth person of a presence model. More...
LinphoneStatus | linphone_presence_model_add_person (LinphonePresenceModel *model, LinphonePresencePerson *person)
| Adds a person to a presence model. More...
LinphoneStatus | linphone_presence_model_clear_persons (LinphonePresenceModel *model)
| Clears the persons of a presence model. More...
bool_t | linphone_presence_model_is_online (const LinphonePresenceModel *model)
| Tells whether a presence model is considered online. More...
char * | linphone_presence_basic_status_to_string (LinphonePresenceBasicStatus basic_status)
| Gets the string representation of a presence basic status. More...
LinphonePresenceService * | linphone_presence_service_new (const char *id, LinphonePresenceBasicStatus basic_status, const char *contact)
| Creates a presence service. More...
char * | linphone_presence_service_get_id (const LinphonePresenceService *service)
| Gets the id of a presence service. More...
LinphoneStatus | linphone_presence_service_set_id (LinphonePresenceService *service, const char *id)
| Sets the id of a presence service. More...
LinphonePresenceBasicStatus | linphone_presence_service_get_basic_status (const LinphonePresenceService *service)
| Gets the basic status of a presence service. More...
LinphoneStatus | linphone_presence_service_set_basic_status (LinphonePresenceService *service, LinphonePresenceBasicStatus basic_status)
| Sets the basic status of a presence service. More...
char * | linphone_presence_service_get_contact (const LinphonePresenceService *service)
| Gets the contact of a presence service. More...
LinphoneStatus | linphone_presence_service_set_contact (LinphonePresenceService *service, const char *contact)
| Sets the contact of a presence service. More...
bctbx_list_t * | linphone_presence_service_get_service_descriptions (const LinphonePresenceService *service)
| Gets the service descriptions of a presence service. More...
LinphoneStatus | linphone_presence_service_set_service_descriptions (LinphonePresenceService *service, bctbx_list_t *descriptions)
| Sets the service descriptions of a presence service. More...
unsigned int | linphone_presence_service_get_nb_notes (const LinphonePresenceService *service)
| Gets the number of notes included in the presence service. More...
LinphonePresenceNote * | linphone_presence_service_get_nth_note (const LinphonePresenceService *service, unsigned int index)
| Gets the nth note of a presence service. More...
LinphoneStatus | linphone_presence_service_add_note (LinphonePresenceService *service, LinphonePresenceNote *note)
| Adds a note to a presence service. More...
LinphoneStatus | linphone_presence_service_clear_notes (LinphonePresenceService *service)
| Clears the notes of a presence service. More...
LinphonePresencePerson * | linphone_presence_person_new (const char *id)
| Creates a presence person. More...
char * | linphone_presence_person_get_id (const LinphonePresencePerson *person)
| Gets the id of a presence person. More...
LinphoneStatus | linphone_presence_person_set_id (LinphonePresencePerson *person, const char *id)
| Sets the id of a presence person. More...
unsigned int | linphone_presence_person_get_nb_activities (const LinphonePresencePerson *person)
| Gets the number of activities included in the presence person. More...
LinphonePresenceActivity * | linphone_presence_person_get_nth_activity (const LinphonePresencePerson *person, unsigned int index)
| Gets the nth activity of a presence person. More...
LinphoneStatus | linphone_presence_person_add_activity (LinphonePresencePerson *person, LinphonePresenceActivity *activity)
| Adds an activity to a presence person. More...
LinphoneStatus | linphone_presence_person_clear_activities (LinphonePresencePerson *person)
| Clears the activities of a presence person. More...
unsigned int | linphone_presence_person_get_nb_notes (const LinphonePresencePerson *person)
| Gets the number of notes included in the presence person. More...
LinphonePresenceNote * | linphone_presence_person_get_nth_note (const LinphonePresencePerson *person, unsigned int index)
| Gets the nth note of a presence person. More...
LinphoneStatus | linphone_presence_person_add_note (LinphonePresencePerson *person, LinphonePresenceNote *note)
| Adds a note to a presence person. More...
LinphoneStatus | linphone_presence_person_clear_notes (LinphonePresencePerson *person)
| Clears the notes of a presence person. More...
unsigned int | linphone_presence_person_get_nb_activities_notes (const LinphonePresencePerson *person)
| Gets the number of activities notes included in the presence person. More...
LinphonePresenceNote * | linphone_presence_person_get_nth_activities_note (const LinphonePresencePerson *person, unsigned int index)
| Gets the nth activities note of a presence person. More...
LinphoneStatus | linphone_presence_person_add_activities_note (LinphonePresencePerson *person, LinphonePresenceNote *note)
| Adds an activities note to a presence person. More...
LinphoneStatus | linphone_presence_person_clear_activities_notes (LinphonePresencePerson *person)
| Clears the activities notes of a presence person. More...
LinphonePresenceActivity * | linphone_presence_activity_new (LinphonePresenceActivityType acttype, const char *description)
| Creates a presence activity. More...
char * | linphone_presence_activity_to_string (const LinphonePresenceActivity *activity)
| Gets the string representation of a presence activity. More...
LinphonePresenceActivityType | linphone_presence_activity_get_type (const LinphonePresenceActivity *activity)
| Gets the activity type of a presence activity. More...
LinphoneStatus | linphone_presence_activity_set_type (LinphonePresenceActivity *activity, LinphonePresenceActivityType acttype)
| Sets the type of activity of a presence activity. More...
const char * | linphone_presence_activity_get_description (const LinphonePresenceActivity *activity)
| Gets the description of a presence activity. More...
LinphoneStatus | linphone_presence_activity_set_description (LinphonePresenceActivity *activity, const char *description)
| Sets the description of a presence activity. More...
LinphonePresenceNote * | linphone_presence_note_new (const char *content, const char *lang)
| Creates a presence note. More...
const char * | linphone_presence_note_get_content (const LinphonePresenceNote *note)
| Gets the content of a presence note. More...
LinphoneStatus | linphone_presence_note_set_content (LinphonePresenceNote *note, const char *content)
| Sets the content of a presence note. More...
const char * | linphone_presence_note_get_lang (const LinphonePresenceNote *note)
| Gets the language of a presence note. More...
LinphoneStatus | linphone_presence_note_set_lang (LinphonePresenceNote *note, const char *lang)
| Sets the language of a presence note. More...
LinphonePresenceModel * | linphone_presence_model_ref (LinphonePresenceModel *model)
| Increase the reference count of the LinphonePresenceModel object. More...
LinphonePresenceModel * | linphone_presence_model_unref (LinphonePresenceModel *model)
| Decrease the reference count of the LinphonePresenceModel object and destroy it if it reaches 0. More...
void | linphone_presence_model_set_user_data (LinphonePresenceModel *model, void *user_data)
| Sets the user data of a LinphonePresenceModel object. More...
void * | linphone_presence_model_get_user_data (const LinphonePresenceModel *model)
| Gets the user data of a LinphonePresenceModel object. More...
int | linphone_presence_model_get_capabilities (const LinphonePresenceModel *model)
| Gets the capabilities of a LinphonePresenceModel object. More...
bool_t | linphone_presence_model_has_capability (const LinphonePresenceModel *model, const LinphoneFriendCapability capability)
| Returns whether or not the LinphonePresenceModel object has a given capability. More...
bool_t | linphone_presence_model_has_capability_with_version (const LinphonePresenceModel *model, const LinphoneFriendCapability capability, float version)
| Returns whether or not the LinphonePresenceModel object has a given capability with a certain version. More...
bool_t | linphone_presence_model_has_capability_with_version_or_more (const LinphonePresenceModel *model, const LinphoneFriendCapability capability, float version)
| Returns whether or not the LinphonePresenceModel object has a given capability with a certain version or more. More...
float | linphone_presence_model_get_capability_version (const LinphonePresenceModel *model, const LinphoneFriendCapability capability)
| Returns the version of the capability of a LinphonePresenceModel. More...
LinphonePresenceService * | linphone_presence_service_ref (LinphonePresenceService *service)
| Increase the reference count of the LinphonePresenceService object. More...
LinphonePresenceService * | linphone_presence_service_unref (LinphonePresenceService *service)
| Decrease the reference count of the LinphonePresenceService object and destroy it if it reaches 0. More...
void | linphone_presence_service_set_user_data (LinphonePresenceService *service, void *user_data)
| Sets the user data of a LinphonePresenceService object. More...
void * | linphone_presence_service_get_user_data (const LinphonePresenceService *service)
| Gets the user data of a LinphonePresenceService object. More...
LinphonePresencePerson * | linphone_presence_person_ref (LinphonePresencePerson *person)
| Increase the reference count of the LinphonePresencePerson object. More...
LinphonePresencePerson * | linphone_presence_person_unref (LinphonePresencePerson *person)
| Decrease the reference count of the LinphonePresencePerson object and destroy it if it reaches 0. More...
void | linphone_presence_person_set_user_data (LinphonePresencePerson *person, void *user_data)
| Sets the user data of a LinphonePresencePerson object. More...
void * | linphone_presence_person_get_user_data (const LinphonePresencePerson *person)
| Gets the user data of a LinphonePresencePerson object. More...
LinphonePresenceActivity * | linphone_presence_activity_ref (LinphonePresenceActivity *activity)
| Increase the reference count of the LinphonePresenceActivity object. More...
LinphonePresenceActivity * | linphone_presence_activity_unref (LinphonePresenceActivity *activity)
| Decrease the reference count of the LinphonePresenceActivity object and destroy it if it reaches 0. More...
void | linphone_presence_activity_set_user_data (LinphonePresenceActivity *activity, void *user_data)
| Sets the user data of a LinphonePresenceActivity object. More...
void * | linphone_presence_activity_get_user_data (const LinphonePresenceActivity *activity)
| Gets the user data of a LinphonePresenceActivity object. More...
LinphonePresenceNote * | linphone_presence_note_ref (LinphonePresenceNote *note)
| Increase the reference count of the LinphonePresenceNote object. More...
LinphonePresenceNote * | linphone_presence_note_unref (LinphonePresenceNote *note)
| Decrease the reference count of the LinphonePresenceNote object and destroy it if it reaches 0. More...
void | linphone_presence_note_set_user_data (LinphonePresenceNote *note, void *user_data)
| Sets the user data of a LinphonePresenceNote object. More...
void * | linphone_presence_note_get_user_data (const LinphonePresenceNote *note)
| Gets the user data of a LinphonePresenceNote object. More...

## Detailed Description

Managing Buddies and buddy list and presence.

Buddies and buddy list
Each buddy is represented by a LinphoneFriend object created by function linphone_friend_new(). Buddy configuration parameters like sip uri or status publication policy for this * friend are configurable for each buddy.
Here under a typical buddy creation:

LinphoneFriend* my_friend=linphone_core_create_friend_with_address("sip:joe@sip.linphone.org"); /*creates friend object for buddy joe*/
linphone_friend_enable_subscribes(my_friend,TRUE); /*configure this friend to emit SUBSCRIBE message after being added to LinphoneCore*/
linphone_friend_set_inc_subscribe_policy(my_friend,LinphoneSPAccept); /* accept Incoming subscription request for this friend*/
linphone_core_create_friend_with_address
LinphoneFriend * linphone_core_create_friend_with_address(LinphoneCore *core, const char *address)
Create a LinphoneFriend from the given address.
LinphoneFriend
struct _LinphoneFriend LinphoneFriend
This object is used to store a SIP address.
Definition: types.h:276
linphone_friend_enable_subscribes
LinphoneStatus linphone_friend_enable_subscribes(LinphoneFriend *fr, bool_t enable)
Configure LinphoneFriend to subscribe to presence information.
linphone_friend_set_inc_subscribe_policy
LinphoneStatus linphone_friend_set_inc_subscribe_policy(LinphoneFriend *fr, LinphoneSubscribePolicy policy)
Configure incoming subscription policy for this friend.
LinphoneSPAccept
@ LinphoneSPAccept
Automatically accepts a subscription request.
Definition: types.h:1064

friends status changes are reported by callback LinphoneCoreVTable.notify_presence_recv

static void notify_presence_recv_updated (struct _LinphoneCore *lc, LinphoneFriend *friend) {
const LinphoneAddress* friend_address = linphone_friend_get_address(friend);
printf("New state state [%s] for user id [%s] \n"
,linphone_online_status_to_string(linphone_friend_get_status(friend))
,linphone_address_as_string (friend_address));
}
linphone_friend_get_address
const LinphoneAddress * linphone_friend_get_address(const LinphoneFriend *linphone_friend)
Get address of this friend.
linphone_friend_get_status
MS2_DEPRECATED LinphoneOnlineStatus linphone_friend_get_status(const LinphoneFriend *linphone_friend)
Get the status of a friend.
linphone_address_as_string
char * linphone_address_as_string(const LinphoneAddress *address)
Returns the address as a string.
LinphoneAddress
struct _LinphoneAddress LinphoneAddress
Object that represents a parsed SIP address.
Definition: c-types.h:125

Once created a buddy can be added to the buddy list using function linphone_core_add_friend() . Added friends will be notified about local status changes
Any subsequente modifications to LinphoneFriend must be first started by a call to function linphone_friend_edit() and validated by function linphone_friend_done()

linphone_friend_edit(my_friend); /* start editing friend */
linphone_friend_enable_subscribes(my_friend,FALSE); /*disable subscription for this friend*/
linphone_friend_done(my_friend); /*commit changes triggering an UNSUBSCRIBE message*/
linphone_friend_done
void linphone_friend_done(LinphoneFriend *linphone_friend)
Commits modification made to the friend configuration.
linphone_friend_edit
void linphone_friend_edit(LinphoneFriend *linphone_friend)
Starts editing a friend configuration.

Publishing presence status
Local presence status can be changed using function linphone_core_set_presence_model() .New status is propagated to all friends previously added to LinphoneCore.

Handling incoming subscription request
New incoming subscription requests are process according to the incoming subscription policy state for subscription initiated by members of the buddy list.
For incoming request comming from an unknown buddy, the call back LinphoneCoreVTable.new_subscription_request is invoked.

A complete tutorial can be found at : Registration tutorial

## Typedef Documentation

## ◆ LinphoneFriend

typedef struct _LinphoneFriend LinphoneFriend

This object is used to store a SIP address.

LinphoneFriend is mainly used to implement an adressbook feature, and are used as data for the LinphoneMagicSearch object. If your proxy supports it, you can also use it to subscribe to presence information.

The objects are stored in a LinphoneFriendList which are in turn stored inside the LinphoneCore. They can be stored inside a database if the path to it is configured, otherwise they will be lost after the LinphoneCore is destroyed.

Thanks to the vCard plugin, you can also store more information like phone numbers, organization, etc...

## ◆ LinphoneFriendList

typedef struct _LinphoneFriendList LinphoneFriendList

This object representing a list of LinphoneFriend.

You can use it to store contacts locally or synchronize them through CardDAV protocol.

## ◆ LinphoneFriendListCbsContactCreatedCb

typedef void(* LinphoneFriendListCbsContactCreatedCb) (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)

Callback used to notify a new contact has been created on the CardDAV server and downloaded locally.

Parameters

  friend_list | The LinphoneFriendList object the new contact is added to
  linphone_friend | The LinphoneFriend object that has been created

## ◆ LinphoneFriendListCbsContactDeletedCb

typedef void(* LinphoneFriendListCbsContactDeletedCb) (LinphoneFriendList *friend_list, LinphoneFriend *linphone_friend)

Callback used to notify a contact has been deleted on the CardDAV server.

Parameters

  friend_list | The LinphoneFriendList object a contact has been removed from
  linphone_friend | The LinphoneFriend object that has been deleted

## ◆ LinphoneFriendListCbsContactUpdatedCb

typedef void(* LinphoneFriendListCbsContactUpdatedCb) (LinphoneFriendList *friend_list, LinphoneFriend *new_friend, LinphoneFriend *old_friend)

Callback used to notify a contact has been updated on the CardDAV server.

Parameters

  friend_list | The LinphoneFriendList object in which a contact has been updated
  new_friend | The new LinphoneFriend object corresponding to the updated contact
  old_friend | The old LinphoneFriend object before update

## ◆ LinphoneFriendListCbsPresenceReceivedCb

typedef void(* LinphoneFriendListCbsPresenceReceivedCb) (LinphoneFriendList *friend_list, const bctbx_list_t *friends)

Callback used to notify a list with all friends that have received presence information.

Parameters

  friend_list | The LinphoneFriendList object for which the status has changed
  friends | A of the relevant friends

## ◆ LinphoneFriendListCbsSyncStateChangedCb

typedef void(* LinphoneFriendListCbsSyncStateChangedCb) (LinphoneFriendList *friend_list, LinphoneFriendListSyncStatus status, const char *message)

Callback used to notify the status of the synchronization has changed.

Parameters

  friend_list | The LinphoneFriendList object for which the status has changed
  status | The new LinphoneFriendListSyncStatus
  message | An additional information on the status update

## ◆ LinphoneSubscribePolicy

typedef enum _LinphoneSubscribePolicy LinphoneSubscribePolicy

Enum controlling behavior for incoming subscription request.

Use by linphone_friend_set_inc_subscribe_policy()

## Enumeration Type Documentation

## ◆ _LinphoneFriendCapability

enum _LinphoneFriendCapability

Enum describing the capabilities of a LinphoneFriend, populated through presence subscribe/notify process.

Enumerator
LinphoneFriendCapabilityNone | No capabilities populated.
LinphoneFriendCapabilityGroupChat | This friend can be invited in a Flexisip backend LinphoneChatRoom.
LinphoneFriendCapabilityLimeX3dh | This friend can be invited in a Flexisip backend end-to-end encrypted LinphoneChatRoom.
LinphoneFriendCapabilityEphemeralMessages | This friend is able to delete ephemeral messages once they have expired.

## ◆ _LinphoneFriendListStatus

enum _LinphoneFriendListStatus

Enum describing the status of a LinphoneFriendList operation.

Enumerator
LinphoneFriendListOK | Operation went fine.
LinphoneFriendListNonExistentFriend | LinphoneFriend wasn't found in the LinphoneFriendList
LinphoneFriendListInvalidFriend | LinphoneFriend is already present in a LinphoneFriendList

## ◆ _LinphoneFriendListSyncStatus

enum _LinphoneFriendListSyncStatus

Enum describing the status of a CardDAV synchronization.

Enumerator
LinphoneFriendListSyncStarted | Synchronization started.
LinphoneFriendListSyncSuccessful | Synchronization finished successfuly.
LinphoneFriendListSyncFailure | Synchronization failed.

## ◆ _LinphoneSubscribePolicy

enum _LinphoneSubscribePolicy

Enum controlling behavior for incoming subscription request.

Use by linphone_friend_set_inc_subscribe_policy()

Enumerator
LinphoneSPWait | Does not automatically accept an incoming subscription request. This policy implies that a decision has to be taken for each incoming subscription request notified by callback LinphoneCoreVTable.new_subscription_requested
LinphoneSPDeny | Rejects incoming subscription request.
LinphoneSPAccept | Automatically accepts a subscription request.

## ◆ LinphonePresenceActivityType

enum LinphonePresenceActivityType

Activities as defined in section 3.2 of RFC 4480.

Enumerator
LinphonePresenceActivityAppointment | The person has a calendar appointment, without specifying exactly of what type. This activity is indicated if more detailed information is not available or the person chooses not to reveal more information.
LinphonePresenceActivityAway | The person is physically away from all interactive communication devices.
LinphonePresenceActivityBreakfast | The person is eating the first meal of the day, usually eaten in the morning.
LinphonePresenceActivityBusy | The person is busy, without further details.
LinphonePresenceActivityDinner | The person is having his or her main meal of the day, eaten in the evening or at midday.
LinphonePresenceActivityHoliday | This is a scheduled national or local holiday.
LinphonePresenceActivityInTransit | The person is riding in a vehicle, such as a car, but not steering.
LinphonePresenceActivityLookingForWork | The person is looking for (paid) work.
LinphonePresenceActivityLunch | The person is eating his or her midday meal.
LinphonePresenceActivityMeal | The person is scheduled for a meal, without specifying whether it is breakfast, lunch, or dinner, or some other meal.
LinphonePresenceActivityMeeting | The person is in an assembly or gathering of people, as for a business, social, or religious purpose. A meeting is a sub-class of an appointment.
LinphonePresenceActivityOnThePhone | The person is talking on the telephone.
LinphonePresenceActivityOther | The person is engaged in an activity with no defined representation. A string describing the activity in plain text SHOULD be provided.
LinphonePresenceActivityPerformance | A performance is a sub-class of an appointment and includes musical, theatrical, and cinematic performances as well as lectures. It is distinguished from a meeting by the fact that the person may either be lecturing or be in the audience, with a potentially large number of other people, making interruptions particularly noticeable.
LinphonePresenceActivityPermanentAbsence | The person will not return for the foreseeable future, e.g., because it is no longer working for the company.
LinphonePresenceActivityPlaying | The person is occupying himself or herself in amusement, sport, or other recreation.
LinphonePresenceActivityPresentation | The person is giving a presentation, lecture, or participating in a formal round-table discussion.
LinphonePresenceActivityShopping | The person is visiting stores in search of goods or services.
LinphonePresenceActivitySleeping | The person is sleeping.
LinphonePresenceActivitySpectator | The person is observing an event, such as a sports event.
LinphonePresenceActivitySteering | The person is controlling a vehicle, watercraft, or plane.
LinphonePresenceActivityTravel | The person is on a business or personal trip, but not necessarily in-transit.
LinphonePresenceActivityTV | The person is watching television.
LinphonePresenceActivityUnknown | The activity of the person is unknown.
LinphonePresenceActivityVacation | A period of time devoted to pleasure, rest, or relaxation.
LinphonePresenceActivityWorking | The person is engaged in, typically paid, labor, as part of a profession or job.
LinphonePresenceActivityWorship | The person is participating in religious rites.

## ◆ LinphonePresenceBasicStatus

enum LinphonePresenceBasicStatus

Basic status as defined in section 4.1.4 of RFC 3863.

Enumerator
LinphonePresenceBasicStatusOpen | This value means that the associated contact element, if any, is ready to accept communication.
LinphonePresenceBasicStatusClosed | This value means that the associated contact element, if any, is unable to accept communication.

## Function Documentation

## ◆ linphone_core_add_friend_list()

void linphone_core_add_friend_list | ( | LinphoneCore * | core,
|  | LinphoneFriendList * | list
| ) |  |

Add a friend list.

Parameters

  core | LinphoneCore object
  list | LinphoneFriendList object

## ◆ linphone_core_create_friend()

LinphoneFriend * linphone_core_create_friend | ( | LinphoneCore * | core | ) |

Create a default LinphoneFriend.

Parameters

  core | LinphoneCore object

Returns
  The created LinphoneFriend object

## ◆ linphone_core_create_friend_list()

LinphoneFriendList * linphone_core_create_friend_list | ( | LinphoneCore * | core | ) |

Create a new empty LinphoneFriendList object.

Parameters

  core | LinphoneCore object.

Returns
  A new LinphoneFriendList object.

## ◆ linphone_core_create_friend_with_address()

LinphoneFriend * linphone_core_create_friend_with_address | ( | LinphoneCore * | core,
|  | const char * | address
| ) |  |

Create a LinphoneFriend from the given address.

Parameters

  core | LinphoneCore object
  address | A string containing the address to create the LinphoneFriend from

Returns
  The created LinphoneFriend object.

## ◆ linphone_core_create_presence_activity()

LinphonePresenceActivity * linphone_core_create_presence_activity | ( | LinphoneCore * | core,
|  | LinphonePresenceActivityType | acttype,
|  | const char * | description
| ) |  |

Create a LinphonePresenceActivity with the given type and description.

Parameters

  core | LinphoneCore object.
  acttype | The LinphonePresenceActivityType to set for the activity.
  description | An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.

Returns
  The created LinphonePresenceActivity object.

## ◆ linphone_core_create_presence_model()

LinphonePresenceModel * linphone_core_create_presence_model | ( | LinphoneCore * | core | ) |

Create a default LinphonePresenceModel.

Parameters

  core | LinphoneCore object.

Returns
  The created LinphonePresenceModel object.

## ◆ linphone_core_create_presence_model_with_activity()

LinphonePresenceModel * linphone_core_create_presence_model_with_activity | ( | LinphoneCore * | core,
|  | LinphonePresenceActivityType | acttype,
|  | const char * | description
| ) |  |

Create a LinphonePresenceModel with the given activity type and activity description.

Parameters

  core | LinphoneCore object.
  acttype | The LinphonePresenceActivityType to set for the activity of the created model.
  description | An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.

Returns
  The created LinphonePresenceModel object.

## ◆ linphone_core_create_presence_model_with_activity_and_note()

LinphonePresenceModel * linphone_core_create_presence_model_with_activity_and_note | ( | LinphoneCore * | core,
|  | LinphonePresenceActivityType | acttype,
|  | const char * | description,
|  | const char * | note,
|  | const char * | lang
| ) |  |

Create a LinphonePresenceModel with the given activity type, activity description, note content and note language.

Parameters

  core | LinphoneCore object.
  acttype | The LinphonePresenceActivityType to set for the activity of the created model.
  description | An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
  note | The content of the note to be added to the created model.
  lang | The language of the note to be added to the created model.

Returns
  The created LinphonePresenceModel object.

## ◆ linphone_core_create_presence_note()

LinphonePresenceNote * linphone_core_create_presence_note | ( | LinphoneCore * | core,
|  | const char * | content,
|  | const char * | lang
| ) |  |

Create a LinphonePresenceNote with the given content and language.

Parameters

  core | LinphoneCore object.
  content | The content of the note to be created.
  lang | The language of the note to be created.

Returns
  The created LinphonePresenceNote object.

## ◆ linphone_core_create_presence_person()

LinphonePresencePerson * linphone_core_create_presence_person | ( | LinphoneCore * | core,
|  | const char * | id
| ) |  |

Create a LinphonePresencePerson with the given id.

Parameters

  core | LinphoneCore object
  id | The id of the person to be created.

Returns
  The created LinphonePresencePerson object.

## ◆ linphone_core_create_presence_service()

LinphonePresenceService * linphone_core_create_presence_service | ( | LinphoneCore * | core,
|  | const char * | id,
|  | LinphonePresenceBasicStatus | basic_status,
|  | const char * | contact
| ) |  |

Create a LinphonePresenceService with the given id, basic status and contact.

Parameters

  core | LinphoneCore object.
  id | The id of the service to be created.
  basic_status | The basic status of the service to be created.
  contact | A string containing a contact information corresponding to the service to be created.

Returns
  The created LinphonePresenceService object.

## ◆ linphone_core_enable_friend_list_subscription()

void linphone_core_enable_friend_list_subscription | ( | LinphoneCore * | core,
|  | bool_t | enable
| ) |  |

Sets whether or not to start friend lists subscription when in foreground.

Parameters

  core | The LinphoneCore
  enable | whether or not to enable the feature

## ◆ linphone_core_enable_sender_name_hidden_in_forward_message()

void linphone_core_enable_sender_name_hidden_in_forward_message | ( | LinphoneCore * | core,
|  | bool_t | enable
| ) |  |

Enable whether or not to hide sender name in forward message.

Parameters

  core | The LinphoneCore
  enable | whether or not to enable the feature

## ◆ linphone_core_find_contacts_by_char()

const bctbx_list_t * linphone_core_find_contacts_by_char | ( | LinphoneCore * | core,
|  | const char * | filter,
|  | bool_t | sip_only
| ) |  |

Retrieves a list of LinphoneAddress sort and filter.

Parameters

  core | LinphoneCore object
  filter | Chars used for the filter*
  sip_only | Only sip address or not

Returns
  A list of filtered LinphoneAddress + the LinphoneAddress created with the filter.

## ◆ linphone_core_find_friend()

LinphoneFriend * linphone_core_find_friend | ( | const LinphoneCore * | core,
|  | const LinphoneAddress * | address
| ) |  |

Search a LinphoneFriend by its address.

Parameters

  core | LinphoneCore object.
  address | The LinphoneAddress to use to search the friend.

Returns
  The LinphoneFriend object corresponding to the given address or NULL if not found.

## ◆ linphone_core_find_friend_by_phone_number()

LinphoneFriend * linphone_core_find_friend_by_phone_number | ( | const LinphoneCore * | core,
|  | const char * | phone_number
| ) |  |

Search a LinphoneFriend by its phone number.

Parameters

  core | LinphoneCore object.
  phone_number | The phone number to use to search the friend.

Returns
  The LinphoneFriend object corresponding to the given phone number or NULL if not found.

## ◆ linphone_core_find_friends()

bctbx_list_t * linphone_core_find_friends | ( | const LinphoneCore * | core,
|  | const LinphoneAddress * | address
| ) |  |

Search all LinphoneFriend matching an address.

Parameters

  core | LinphoneCore object.
  address | The address to use to search the friends.

Returns
  A list of LinphoneFriend corresponding to the given address.

## ◆ linphone_core_get_consolidated_presence()

LinphoneConsolidatedPresence linphone_core_get_consolidated_presence | ( | const LinphoneCore * | core | ) |

Get my consolidated presence.

Parameters

  core | LinphoneCore object

Returns
  My LinphoneConsolidatedPresence presence

## ◆ linphone_core_get_default_friend_list()

LinphoneFriendList * linphone_core_get_default_friend_list | ( | const LinphoneCore * | core | ) |

Retrieves the first list of LinphoneFriend from the core.

Parameters

  core | LinphoneCore object

Returns
  the first LinphoneFriendList object or NULL.

## ◆ linphone_core_get_friend_by_ref_key()

LinphoneFriend * linphone_core_get_friend_by_ref_key | ( | const LinphoneCore * | core,
|  | const char * | key
| ) |  |

Search a LinphoneFriend by its reference key.

Parameters

  core | LinphoneCore object.
  key | The reference key to use to search the friend.

Returns
  The LinphoneFriend object corresponding to the given reference key.

## ◆ linphone_core_get_friend_list_by_name()

LinphoneFriendList * linphone_core_get_friend_list_by_name | ( | const LinphoneCore * | core,
|  | const char * | name
| ) |  |

Retrieves the list of LinphoneFriend from the core that has the given display name.

Parameters

  core | LinphoneCore object
  name | the name of the list

Returns
  the first LinphoneFriendList object or NULL.

## ◆ linphone_core_get_friends_lists()

const bctbx_list_t * linphone_core_get_friends_lists | ( | const LinphoneCore * | core | ) |

Retrieves the list of LinphoneFriendList from the core.

Parameters

  core | LinphoneCore object

Returns
  A list of LinphoneFriendList.

## ◆ linphone_core_get_max_size_for_auto_download_incoming_files()

int linphone_core_get_max_size_for_auto_download_incoming_files | ( | LinphoneCore * | core | ) |

Gets the size under which incoming files in chat messages will be downloaded automatically.

Parameters

  core | LinphoneCore object

Returns
  The size in bytes, -1 if autodownload feature is disabled, 0 to download them all no matter the size

## ◆ linphone_core_get_presence_model()

LinphonePresenceModel * linphone_core_get_presence_model | ( | const LinphoneCore * | core | ) |

Get my presence model.

Parameters

  core | LinphoneCore object

Returns
  A LinphonePresenceModel object, or NULL if no presence model has been set.

## ◆ linphone_core_is_friend_list_subscription_enabled()

bool_t linphone_core_is_friend_list_subscription_enabled | ( | LinphoneCore * | core | ) |

Returns whether or not friend lists subscription are enabled.

Parameters

  core | The LinphoneCore

Returns
  whether or not the feature is enabled

## ◆ linphone_core_is_sender_name_hidden_in_forward_message()

bool_t linphone_core_is_sender_name_hidden_in_forward_message | ( | LinphoneCore * | core | ) |

Returns whether or not sender name is hidden in forward message.

Parameters

  core | The LinphoneCore

Returns
  whether or not the feature

## ◆ linphone_core_notify_all_friends()

void linphone_core_notify_all_friends | ( | LinphoneCore * | core,
|  | LinphonePresenceModel * | presence
| ) |  |

Notify all friends that have subscribed.

Parameters

  core | LinphoneCore object
  presence | LinphonePresenceModel to notify

## ◆ linphone_core_notify_notify_presence_received()

void linphone_core_notify_notify_presence_received | ( | LinphoneCore * | core,
|  | LinphoneFriend * | linphone_friend
| ) |  |

Notifies the upper layer that a presence status has been received by calling the appropriate callback if one has been set.

This method is for advanced usage, where customization of the liblinphone's internal behavior is required.

Parameters

  core | the LinphoneCore object.
  linphone_friend | the LinphoneFriend whose presence information has been received.

## ◆ linphone_core_notify_notify_presence_received_for_uri_or_tel()

void linphone_core_notify_notify_presence_received_for_uri_or_tel | ( | LinphoneCore * | core,
|  | LinphoneFriend * | linphone_friend,
|  | const char * | uri_or_tel,
|  | const LinphonePresenceModel * | presence_model
| ) |  |

Notifies the upper layer that a presence model change has been received for the uri or telephone number given as a parameter, by calling the appropriate callback if one has been set.

This method is for advanced usage, where customization of the liblinphone's internal behavior is required.

Parameters

  core | the LinphoneCore object.
  linphone_friend | the LinphoneFriend whose presence information has been received.
  uri_or_tel | telephone number or sip uri
  presence_model | the LinphonePresenceModel that has been modified

## ◆ linphone_core_reject_subscriber()

void linphone_core_reject_subscriber | ( | LinphoneCore * | core,
|  | LinphoneFriend * | linphone_friend
| ) |  |

Black list a friend.

same as linphone_friend_set_inc_subscribe_policy() with LinphoneSPDeny policy;

Parameters

  core | LinphoneCore object
  linphone_friend | LinphoneFriend to reject

## ◆ linphone_core_remove_friend_list()

void linphone_core_remove_friend_list | ( | LinphoneCore * | core,
|  | LinphoneFriendList * | list
| ) |  |

Removes a friend list.

Parameters

  core | LinphoneCore object
  list | LinphoneFriendList object

## ◆ linphone_core_set_consolidated_presence()

void linphone_core_set_consolidated_presence | ( | LinphoneCore * | core,
|  | LinphoneConsolidatedPresence | presence
| ) |  |

Set my consolidated presence.

Parameters

  core | LinphoneCore object
  presence | LinphoneConsolidatedPresence value

## ◆ linphone_core_set_max_size_for_auto_download_incoming_files()

void linphone_core_set_max_size_for_auto_download_incoming_files | ( | LinphoneCore * | core,
|  | int | size
| ) |  |

Sets the size under which incoming files in chat messages will be downloaded automatically.

Parameters

  core | LinphoneCore object
  size | The size in bytes, -1 to disable the autodownload feature, 0 to download them all no matter the size

## ◆ linphone_core_set_presence_model()

void linphone_core_set_presence_model | ( | LinphoneCore * | core,
|  | LinphonePresenceModel * | presence
| ) |  |

Set my presence model.

Parameters

  core | LinphoneCore object
  presence | LinphonePresenceModel

## ◆ linphone_friend_add_address()

void linphone_friend_add_address | ( | LinphoneFriend * | linphone_friend,
|  | const LinphoneAddress * | address
| ) |  |

Adds an address in this friend.

Parameters

  linphone_friend | LinphoneFriend object
  address | LinphoneAddress object

## ◆ linphone_friend_add_phone_number()

void linphone_friend_add_phone_number | ( | LinphoneFriend * | linphone_friend,
|  | const char * | phone_number
| ) |  |

Adds a phone number in this friend.

Parameters

  linphone_friend | LinphoneFriend object
  phone_number | number to add

## ◆ linphone_friend_create_vcard()

bool_t linphone_friend_create_vcard | ( | LinphoneFriend * | linphone_friend,
|  | const char * | name
| ) |  |

Creates a vCard object associated to this friend if there isn't one yet and if the full name is available, either by the parameter or the one in the friend's SIP URI.

Parameters

  linphone_friend | LinphoneFriend object
  name | The full name of the friend or NULL to use the one from the friend's SIP URI

Returns
  TRUE if the vCard has been created, FALSE if it wasn't possible (for exemple if name and the friend's SIP URI are null or if the friend's SIP URI doesn't have a display name), or if there is already one vcard

## ◆ linphone_friend_destroy()

MS2_DEPRECATED void linphone_friend_destroy | ( | LinphoneFriend * | linphone_friend | ) |

Destroy a LinphoneFriend.

Parameters

  linphone_friend | LinphoneFriend object

Deprecated:
  31/03/2015 Use linphone_friend_unref() instead.

## ◆ linphone_friend_done()

void linphone_friend_done | ( | LinphoneFriend * | linphone_friend | ) |

Commits modification made to the friend configuration.

Parameters

  linphone_friend | LinphoneFriend object

## ◆ linphone_friend_edit()

void linphone_friend_edit | ( | LinphoneFriend * | linphone_friend | ) |

Starts editing a friend configuration.

Because friend configuration must be consistent, applications MUST call linphone_friend_edit() before doing any attempts to modify friend configuration (such as linphone_friend_set_address() or linphone_friend_set_inc_subscribe_policy()). Once the modifications are done, then the application must call linphone_friend_done() to commit the changes.

Parameters

  linphone_friend | LinphoneFriend object

## ◆ linphone_friend_enable_subscribes()

LinphoneStatus linphone_friend_enable_subscribes | ( | LinphoneFriend * | fr,
|  | bool_t | enable
| ) |  |

Configure LinphoneFriend to subscribe to presence information.

Parameters

  linphone_friend | LinphoneFriend object
  enable | if TRUE this friend will receive subscription message

Returns
  0

## ◆ linphone_friend_get_address()

const LinphoneAddress * linphone_friend_get_address | ( | const LinphoneFriend * | linphone_friend | ) |

Get address of this friend.

Note
  the LinphoneAddress object returned is hold by the LinphoneFriend, however calling several time this function may return different objects.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  the LinphoneAddress.

## ◆ linphone_friend_get_addresses()

const bctbx_list_t * linphone_friend_get_addresses | ( | const LinphoneFriend * | linphone_friend | ) |

Returns a list of LinphoneAddress for this friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  A list of LinphoneAddress.

## ◆ linphone_friend_get_capabilities()

int linphone_friend_get_capabilities | ( | const LinphoneFriend * | linphone_friend | ) |

Returns the capabilities associated to this friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  an int representing the capabilities of the friend

## ◆ linphone_friend_get_capability_version()

float linphone_friend_get_capability_version | ( | const LinphoneFriend * | linphone_friend,
|  | const LinphoneFriendCapability | capability
| ) |  |

Returns the version of a friend's capbility.

Parameters

  linphone_friend | LinphoneFriend object
  capability | LinphoneFriendCapability object

Returns
  the version of a friend's capbility.

## ◆ linphone_friend_get_consolidated_presence()

LinphoneConsolidatedPresence linphone_friend_get_consolidated_presence | ( | const LinphoneFriend * | linphone_friend | ) |

Get the consolidated presence of a friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  The LinphoneConsolidatedPresence of the friend

## ◆ linphone_friend_get_core()

LinphoneCore * linphone_friend_get_core | ( | const LinphoneFriend * | linphone_friend | ) |

Returns the LinphoneCore object managing this friend, if any.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  the LinphoneCore object associated.

## ◆ linphone_friend_get_inc_subscribe_policy()

LinphoneSubscribePolicy linphone_friend_get_inc_subscribe_policy | ( | const LinphoneFriend * | linphone_friend | ) |

get current subscription policy for this LinphoneFriend

Parameters

  linphone_friend | LinphoneFriend object

Returns
  the LinphoneSubscribePolicy enum

## ◆ linphone_friend_get_name()

const char * linphone_friend_get_name | ( | const LinphoneFriend * | linphone_friend | ) |

Get the display name for this friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  The display name of this friend.

## ◆ linphone_friend_get_phone_numbers()

bctbx_list_t * linphone_friend_get_phone_numbers | ( | const LinphoneFriend * | linphone_friend | ) |

Returns a list of phone numbers for this friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  A list of phone numbers as string.

## ◆ linphone_friend_get_presence_model()

const LinphonePresenceModel * linphone_friend_get_presence_model | ( | const LinphoneFriend * | linphone_friend | ) |

Get the presence model of a friend.

Parameters

  linphone_friend | A LinphoneFriend object

Returns
  A LinphonePresenceModel object, or NULL if the friend do not have presence information (in which case he is considered offline).

## ◆ linphone_friend_get_presence_model_for_uri_or_tel()

const LinphonePresenceModel * linphone_friend_get_presence_model_for_uri_or_tel | ( | const LinphoneFriend * | linphone_friend,
|  | const char * | uri_or_tel
| ) |  |

Get the presence model for a specific SIP URI or phone number of a friend.

Parameters

  linphone_friend | A LinphoneFriend object
  uri_or_tel | The SIP URI or phone number for which to get the presence model

Returns
  A LinphonePresenceModel object, or NULL if the friend do not have presence information for this SIP URI or phone number.

## ◆ linphone_friend_get_ref_key()

const char * linphone_friend_get_ref_key | ( | const LinphoneFriend * | linphone_friend | ) |

Get the reference key of a friend.

Parameters

  linphone_friend | LinphoneFriend object.

Returns
  The reference key of the friend.

## ◆ linphone_friend_get_status()

MS2_DEPRECATED LinphoneOnlineStatus linphone_friend_get_status | ( | const LinphoneFriend * | linphone_friend | ) |

Get the status of a friend.

Parameters

  lf | A LinphoneFriend object

Returns
  #LinphoneOnlineStatus

Deprecated:
  19/06/2013 Use linphone_friend_get_presence_model() instead

## ◆ linphone_friend_get_subscription_state()

LinphoneSubscriptionState linphone_friend_get_subscription_state | ( | const LinphoneFriend * | linphone_friend | ) |

Get subscription state of a friend.

Parameters

  linphone_friend | A LinphoneFriend object

Returns
  the LinphoneSubscriptionState enum

## ◆ linphone_friend_get_user_data()

void * linphone_friend_get_user_data | ( | const LinphoneFriend * | linphone_friend | ) |

Retrieve user data associated with friend.

Parameters

  linphone_friend | A LinphoneFriend object

Returns
  the user data pointer.

## ◆ linphone_friend_get_vcard()

LinphoneVcard * linphone_friend_get_vcard | ( | const LinphoneFriend * | linphone_friend | ) |

Returns the vCard object associated to this friend, if any.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  the LinphoneVcard or NULL.

## ◆ linphone_friend_has_capability()

bool_t linphone_friend_has_capability | ( | const LinphoneFriend * | linphone_friend,
|  | const LinphoneFriendCapability | capability
| ) |  |

Returns whether or not a friend has a capbility.

Parameters

  linphone_friend | LinphoneFriend object
  capability | LinphoneFriendCapability object

Returns
  whether or not a friend has a capbility

## ◆ linphone_friend_has_capability_with_version()

bool_t linphone_friend_has_capability_with_version | ( | const LinphoneFriend * | linphone_friend,
|  | const LinphoneFriendCapability | capability,
|  | float | version
| ) |  |

Returns whether or not a friend has a capbility with a given version.

Parameters

  linphone_friend | LinphoneFriend object
  capability | LinphoneFriendCapability object
  version | the version to test

Returns
  whether or not a friend has a capbility with a given version or -1.0 if friend has not capability.

## ◆ linphone_friend_has_capability_with_version_or_more()

bool_t linphone_friend_has_capability_with_version_or_more | ( | const LinphoneFriend * | linphone_friend,
|  | const LinphoneFriendCapability | capability,
|  | float | version
| ) |  |

Returns whether or not a friend has a capbility with a given version or more.

Parameters

  linphone_friend | LinphoneFriend object
  capability | LinphoneFriendCapability object
  version | the version to test

Returns
  whether or not a friend has a capbility with a given version or more.

## ◆ linphone_friend_has_phone_number()

bool_t linphone_friend_has_phone_number | ( | const LinphoneFriend * | linphone_friend,
|  | const char * | phone_number
| ) |  |

Returns whether a friend contains the given phone number.

Parameters

  linphone_friend | LinphoneFriend object
  phone_number | the phone number to search for

Returns
  TRUE if found, FALSE otherwise

## ◆ linphone_friend_in_list()

bool_t linphone_friend_in_list | ( | const LinphoneFriend * | linphone_friend | ) |

Check that the given friend is in a friend list.

Parameters

  linphone_friend | LinphoneFriend object.

Returns
  TRUE if the friend is in a friend list, FALSE otherwise.

## ◆ linphone_friend_is_presence_received()

bool_t linphone_friend_is_presence_received | ( | const LinphoneFriend * | linphone_friend | ) |

Tells whether we already received presence information for a friend.

Parameters

  linphone_friend | A LinphoneFriend object

Returns
  TRUE if presence information has been received for the friend, FALSE otherwise.

## ◆ linphone_friend_list_add_callbacks()

void linphone_friend_list_add_callbacks | ( | LinphoneFriendList * | friend_list,
|  | LinphoneFriendListCbs * | cbs
| ) |  |

Adds the LinphoneFriendListCbs object associated with a LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object
  cbs | The current LinphoneFriendListCbs object to be added to the LinphoneFriendList.

## ◆ linphone_friend_list_add_friend()

LinphoneFriendListStatus linphone_friend_list_add_friend | ( | LinphoneFriendList * | friend_list,
|  | LinphoneFriend * | linphone_friend
| ) |  |

Add a friend to a friend list.

If or when a remote CardDAV server will be attached to the list, the friend will be sent to the server.

Parameters

  friend_list | LinphoneFriendList object.
  linphone_friend | LinphoneFriend object to add to the friend list.

Returns
  LinphoneFriendListOK if successfully added, LinphoneFriendListInvalidFriend if the friend is not valid.

## ◆ linphone_friend_list_add_local_friend()

LinphoneFriendListStatus linphone_friend_list_add_local_friend | ( | LinphoneFriendList * | friend_list,
|  | LinphoneFriend * | linphone_friend
| ) |  |

Add a friend to a friend list.

The friend will never be sent to a remote CardDAV server. Warning! #LinphoneFriends added this way will be removed on the next synchronization, and the callback contact_deleted will be called.

Parameters

  friend_list | LinphoneFriendList object.
  linphone_friend | LinphoneFriend object to add to the friend list.

Returns
  LinphoneFriendListOK if successfully added, LinphoneFriendListInvalidFriend if the friend is not valid.

## ◆ linphone_friend_list_cbs_get_contact_created()

LinphoneFriendListCbsContactCreatedCb linphone_friend_list_cbs_get_contact_created | ( | const LinphoneFriendListCbs * | cbs | ) |

Get the contact created callback.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The current contact created callback.

## ◆ linphone_friend_list_cbs_get_contact_deleted()

LinphoneFriendListCbsContactDeletedCb linphone_friend_list_cbs_get_contact_deleted | ( | const LinphoneFriendListCbs * | cbs | ) |

Get the contact deleted callback.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The current contact deleted callback.

## ◆ linphone_friend_list_cbs_get_contact_updated()

LinphoneFriendListCbsContactUpdatedCb linphone_friend_list_cbs_get_contact_updated | ( | const LinphoneFriendListCbs * | cbs | ) |

Get the contact updated callback.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The current contact updated callback.

## ◆ linphone_friend_list_cbs_get_presence_received()

LinphoneFriendListCbsPresenceReceivedCb linphone_friend_list_cbs_get_presence_received | ( | const LinphoneFriendListCbs * | cbs | ) |

Get the presence received callback.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The current presence received callback.

## ◆ linphone_friend_list_cbs_get_sync_status_changed()

LinphoneFriendListCbsSyncStateChangedCb linphone_friend_list_cbs_get_sync_status_changed | ( | const LinphoneFriendListCbs * | cbs | ) |

Get the sync status changed callback.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The current sync status changedcallback.

## ◆ linphone_friend_list_cbs_get_user_data()

void * linphone_friend_list_cbs_get_user_data | ( | const LinphoneFriendListCbs * | cbs | ) |

Retrieve the user pointer associated with a LinphoneFriendListCbs object.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The user pointer associated with the LinphoneFriendListCbs object.

## ◆ linphone_friend_list_cbs_ref()

LinphoneFriendListCbs * linphone_friend_list_cbs_ref | ( | LinphoneFriendListCbs * | cbs | ) |

Acquire a reference to a LinphoneFriendListCbs object.

Parameters

  cbs | LinphoneFriendListCbs object.

Returns
  The same LinphoneFriendListCbs object.

## ◆ linphone_friend_list_cbs_set_contact_created()

void linphone_friend_list_cbs_set_contact_created | ( | LinphoneFriendListCbs * | cbs,
|  | LinphoneFriendListCbsContactCreatedCb | cb
| ) |  |

Set the contact created callback.

Parameters

  cbs | LinphoneFriendListCbs object.
  cb | The contact created to be used.

## ◆ linphone_friend_list_cbs_set_contact_deleted()

void linphone_friend_list_cbs_set_contact_deleted | ( | LinphoneFriendListCbs * | cbs,
|  | LinphoneFriendListCbsContactDeletedCb | cb
| ) |  |

Set the contact deleted callback.

Parameters

  cbs | LinphoneFriendListCbs object.
  cb | The contact deleted to be used.

## ◆ linphone_friend_list_cbs_set_contact_updated()

void linphone_friend_list_cbs_set_contact_updated | ( | LinphoneFriendListCbs * | cbs,
|  | LinphoneFriendListCbsContactUpdatedCb | cb
| ) |  |

Set the contact updated callback.

Parameters

  cbs | LinphoneFriendListCbs object.
  cb | The contact updated to be used.

## ◆ linphone_friend_list_cbs_set_presence_received()

void linphone_friend_list_cbs_set_presence_received | ( | LinphoneFriendListCbs * | cbs,
|  | LinphoneFriendListCbsPresenceReceivedCb | cb
| ) |  |

Set the presence received callback.

Parameters

  cbs | LinphoneFriendListCbs object.
  cb | The presence received callback to be used.

## ◆ linphone_friend_list_cbs_set_sync_status_changed()

void linphone_friend_list_cbs_set_sync_status_changed | ( | LinphoneFriendListCbs * | cbs,
|  | LinphoneFriendListCbsSyncStateChangedCb | cb
| ) |  |

Set the contact updated callback.

Parameters

  cbs | LinphoneFriendListCbs object.
  cb | The sync status changed to be used.

## ◆ linphone_friend_list_cbs_set_user_data()

void linphone_friend_list_cbs_set_user_data | ( | LinphoneFriendListCbs * | cbs,
|  | void * | user_data
| ) |  |

Assign a user pointer to a LinphoneFriendListCbs object.

Parameters

  cbs | LinphoneFriendListCbs object.
  user_data | The user pointer to associate with the LinphoneFriendListCbs object.

## ◆ linphone_friend_list_cbs_unref()

void linphone_friend_list_cbs_unref | ( | LinphoneFriendListCbs * | cbs | ) |

Release a reference to a LinphoneFriendListCbs object.

Parameters

  cbs | LinphoneFriendListCbs object.

## ◆ linphone_friend_list_enable_subscriptions()

void linphone_friend_list_enable_subscriptions | ( | LinphoneFriendList * | friend_list,
|  | bool_t | enabled
| ) |  |

Enable subscription to NOTIFYes of all friends list.

Parameters

  friend_list | the LinphoneFriendList object
  enabled | should subscription be enabled or not

## ◆ linphone_friend_list_export_friends_as_vcard4_file()

void linphone_friend_list_export_friends_as_vcard4_file | ( | LinphoneFriendList * | friend_list,
|  | const char * | vcard_file
| ) |  |

Creates and export LinphoneFriend objects from LinphoneFriendList to a file using vCard 4 format.

Parameters

  friend_list | the LinphoneFriendList object
  vcard_file | the path to a file that will contain the vCards

## ◆ linphone_friend_list_find_friend_by_address()

LinphoneFriend * linphone_friend_list_find_friend_by_address | ( | const LinphoneFriendList * | friend_list,
|  | const LinphoneAddress * | address
| ) |  |

Find a friend in the friend list using a LinphoneAddress.

Parameters

  friend_list | LinphoneFriendList object.
  address | LinphoneAddress object of the friend we want to search for.

Returns
  A LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_find_friend_by_phone_number()

LinphoneFriend * linphone_friend_list_find_friend_by_phone_number | ( | const LinphoneFriendList * | friend_list,
|  | const char * | phone_number
| ) |  |

Find a friend in the friend list using a phone number.

Parameters

  friend_list | LinphoneFriendList object.
  phone_number | a string of the phone number for which we want to find a friend.

Returns
  A LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_find_friend_by_ref_key()

LinphoneFriend * linphone_friend_list_find_friend_by_ref_key | ( | const LinphoneFriendList * | friend_list,
|  | const char * | ref_key
| ) |  |

Find a friend in the friend list using a ref key.

Parameters

  friend_list | LinphoneFriendList object.
  ref_key | The ref key string of the friend we want to search for.

Returns
  A LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_find_friend_by_uri()

LinphoneFriend * linphone_friend_list_find_friend_by_uri | ( | const LinphoneFriendList * | friend_list,
|  | const char * | uri
| ) |  |

Find a friend in the friend list using an URI string.

Parameters

  friend_list | LinphoneFriendList object.
  uri | A string containing the URI of the friend we want to search for.

Returns
  A LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_find_friends_by_address()

bctbx_list_t * linphone_friend_list_find_friends_by_address | ( | const LinphoneFriendList * | friend_list,
|  | const LinphoneAddress * | address
| ) |  |

Find all friends in the friend list using a LinphoneAddress.

Parameters

  friend_list | LinphoneFriendList object.
  address | LinphoneAddress object of the friends we want to search for.

Returns
  A list of LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_find_friends_by_uri()

bctbx_list_t * linphone_friend_list_find_friends_by_uri | ( | const LinphoneFriendList * | friend_list,
|  | const char * | uri
| ) |  |

Find all friends in the friend list using an URI string.

Parameters

  friend_list | LinphoneFriendList object.
  uri | A string containing the URI of the friends we want to search for.

Returns
  A list of LinphoneFriend if found, NULL otherwise.

## ◆ linphone_friend_list_get_callbacks()

MS2_DEPRECATED LinphoneFriendListCbs * linphone_friend_list_get_callbacks | ( | const LinphoneFriendList * | friend_list | ) |

Get the LinphoneFriendListCbs object associated with a LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object

Returns
  The LinphoneFriendListCbs object associated with the LinphoneFriendList.

Deprecated:
  19/02/2019 use add_callbacks / remove_callbacks instead

## ◆ linphone_friend_list_get_core()

LinphoneCore * linphone_friend_list_get_core | ( | const LinphoneFriendList * | friend_list | ) |

Returns the LinphoneCore object attached to this LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  a LinphoneCore object

## ◆ linphone_friend_list_get_current_callbacks()

LinphoneFriendListCbs * linphone_friend_list_get_current_callbacks | ( | const LinphoneFriendList * | friend_list | ) |

Get the current LinphoneFriendListCbs object associated with a LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object

Returns
  The current LinphoneFriendListCbs object associated with the LinphoneFriendList.

## ◆ linphone_friend_list_get_display_name()

const char * linphone_friend_list_get_display_name | ( | const LinphoneFriendList * | friend_list | ) |

Get the display name of the friend list.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The display name of the friend list.

## ◆ linphone_friend_list_get_friends()

const bctbx_list_t * linphone_friend_list_get_friends | ( | const LinphoneFriendList * | friend_list | ) |

Retrieves the list of LinphoneFriend from this LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object

Returns
  A list of LinphoneFriend

## ◆ linphone_friend_list_get_rls_address()

const LinphoneAddress * linphone_friend_list_get_rls_address | ( | const LinphoneFriendList * | friend_list | ) |

Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The RLS URI as LinphoneAddress associated with the friend list.

## ◆ linphone_friend_list_get_rls_uri()

const char * linphone_friend_list_get_rls_uri | ( | const LinphoneFriendList * | friend_list | ) |

Get the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The RLS URI associated with the friend list.

Deprecated:
  27/10/2020. Use linphone_friend_list_get_rls_address() instead.

## ◆ linphone_friend_list_get_uri()

const char * linphone_friend_list_get_uri | ( | const LinphoneFriendList * | friend_list | ) |

Get the URI associated with the friend list.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The URI associated with the friend list.

## ◆ linphone_friend_list_get_user_data()

void * linphone_friend_list_get_user_data | ( | const LinphoneFriendList * | friend_list | ) |

Retrieve the user pointer associated with the friend list.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The user pointer associated with the friend list.

## ◆ linphone_friend_list_import_friends_from_vcard4_buffer()

int linphone_friend_list_import_friends_from_vcard4_buffer | ( | LinphoneFriendList * | friend_list,
|  | const char * | vcard_buffer
| ) |  |

Creates and adds LinphoneFriend objects to LinphoneFriendList from a buffer that contains the vCard(s) to parse.

Parameters

  friend_list | the LinphoneFriendList object
  vcard_buffer | the buffer that contains the vCard(s) to parse

Returns
  the amount of linphone friends created

## ◆ linphone_friend_list_import_friends_from_vcard4_file()

int linphone_friend_list_import_friends_from_vcard4_file | ( | LinphoneFriendList * | friend_list,
|  | const char * | vcard_file
| ) |  |

Creates and adds LinphoneFriend objects to LinphoneFriendList from a file that contains the vCard(s) to parse.

Parameters

  friend_list | the LinphoneFriendList object
  vcard_file | the path to a file that contains the vCard(s) to parse

Returns
  the amount of linphone friends created

## ◆ linphone_friend_list_is_subscription_bodyless()

bool_t linphone_friend_list_is_subscription_bodyless | ( | LinphoneFriendList * | friend_list | ) |

Get wheter the subscription of the friend list is bodyless or not.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  Wheter the subscription of the friend list is bodyless or not.

## ◆ linphone_friend_list_notify_presence()

void linphone_friend_list_notify_presence | ( | LinphoneFriendList * | friend_list,
|  | LinphonePresenceModel * | presence
| ) |  |

Notify our presence to all the friends in the friend list that have subscribed to our presence directly (not using a RLS).

Parameters

  friend_list | LinphoneFriendList object.
  presence | LinphonePresenceModel object.

## ◆ linphone_friend_list_ref()

LinphoneFriendList * linphone_friend_list_ref | ( | LinphoneFriendList * | friend_list | ) |

Acquire a reference to the friend list.

Parameters

  friend_list | LinphoneFriendList object.

Returns
  The same LinphoneFriendList object.

## ◆ linphone_friend_list_remove_callbacks()

void linphone_friend_list_remove_callbacks | ( | LinphoneFriendList * | friend_list,
|  | LinphoneFriendListCbs * | cbs
| ) |  |

Removes the LinphoneFriendListCbs object associated with a LinphoneFriendList.

Parameters

  friend_list | LinphoneFriendList object
  cbs | The current LinphoneFriendListCbs object to be remove from the LinphoneFriendList.

## ◆ linphone_friend_list_remove_friend()

LinphoneFriendListStatus linphone_friend_list_remove_friend | ( | LinphoneFriendList * | friend_list,
|  | LinphoneFriend * | linphone_friend
| ) |  |

Remove a friend from a friend list.

Parameters

  friend_list | LinphoneFriendList object.
  linphone_friend | LinphoneFriend object to remove from the friend list.

Returns
  LinphoneFriendListOK if removed successfully, LinphoneFriendListNonExistentFriend if the friend is not in the list.

## ◆ linphone_friend_list_set_display_name()

void linphone_friend_list_set_display_name | ( | LinphoneFriendList * | friend_list,
|  | const char * | display_name
| ) |  |

Set the display name of the friend list.

Parameters

  friend_list | LinphoneFriendList object.
  display_name | The new display name of the friend list.

## ◆ linphone_friend_list_set_rls_address()

void linphone_friend_list_set_rls_address | ( | LinphoneFriendList * | friend_list,
|  | const LinphoneAddress * | rls_addr
| ) |  |

Set the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Parameters

  friend_list | LinphoneFriendList object.
  rls_addr | The RLS URI to associate with the friend list.

## ◆ linphone_friend_list_set_rls_uri()

void linphone_friend_list_set_rls_uri | ( | LinphoneFriendList * | friend_list,
|  | const char * | rls_uri
| ) |  |

Set the RLS (Resource List Server) URI associated with the friend list to subscribe to these friends presence.

Parameters

  friend_list | LinphoneFriendList object.
  rls_uri | The RLS URI to associate with the friend list.

Deprecated:
  27/10/2020. Use linphone_friend_list_set_rls_address() instead.

## ◆ linphone_friend_list_set_subscription_bodyless()

void linphone_friend_list_set_subscription_bodyless | ( | LinphoneFriendList * | friend_list,
|  | bool_t | bodyless
| ) |  |

Set wheter the subscription of the friend list is bodyless or not.

Parameters

  friend_list | LinphoneFriendList object.
  bodyless | boolean telling if the subscription of the friend list is bodyless or not.

## ◆ linphone_friend_list_set_uri()

void linphone_friend_list_set_uri | ( | LinphoneFriendList * | friend_list,
|  | const char * | uri
| ) |  |

Set the URI associated with the friend list.

Parameters

  friend_list | LinphoneFriendList object.
  uri | The URI to associate with the friend list.

## ◆ linphone_friend_list_set_user_data()

void linphone_friend_list_set_user_data | ( | LinphoneFriendList * | friend_list,
|  | void * | user_data
| ) |  |

Assign a user pointer to the friend list.

Parameters

  friend_list | LinphoneFriendList object.
  user_data | The user pointer to associate with the friend list.

## ◆ linphone_friend_list_subscriptions_enabled()

bool_t linphone_friend_list_subscriptions_enabled | ( | LinphoneFriendList * | friend_list | ) |

Gets whether subscription to NOTIFYes of all friends list are enabled or not.

Parameters

  friend_list | the LinphoneFriendList object

Returns
  Whether subscriptions are enabled or not

## ◆ linphone_friend_list_synchronize_friends_from_server()

void linphone_friend_list_synchronize_friends_from_server | ( | LinphoneFriendList * | friend_list | ) |

Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri.

Parameters

  friend_list | LinphoneFriendList object.

## ◆ linphone_friend_list_unref()

void linphone_friend_list_unref | ( | LinphoneFriendList * | friend_list | ) |

Release reference to the friend list.

Parameters

  friend_list | LinphoneFriendList object.

## ◆ linphone_friend_list_update_dirty_friends()

void linphone_friend_list_update_dirty_friends | ( | LinphoneFriendList * | friend_list | ) |

Goes through all the LinphoneFriend that are dirty and does a CardDAV PUT to update the server.

Parameters

  friend_list | LinphoneFriendList object.

## ◆ linphone_friend_list_update_revision()

void linphone_friend_list_update_revision | ( | LinphoneFriendList * | friend_list,
|  | int | revision
| ) |  |

Sets the revision from the last synchronization.

Parameters

  friend_list | LinphoneFriendList object.
  revision | The revision

## ◆ linphone_friend_list_update_subscriptions()

void linphone_friend_list_update_subscriptions | ( | LinphoneFriendList * | friend_list | ) |

Update presence subscriptions for the entire list.

Calling this function is necessary when list subscriptions are enabled, ie when a RLS presence server is used.

Parameters

  friend_list | the LinphoneFriendList

## ◆ linphone_friend_new()

MS2_DEPRECATED LinphoneFriend * linphone_friend_new | ( | void |  | ) |

Contructor.

Returns
  a new empty LinphoneFriend

Deprecated:
  03/02/2016 use linphone_core_create_friend() instead

## ◆ linphone_friend_new_from_vcard()

LinphoneFriend * linphone_friend_new_from_vcard | ( | LinphoneVcard * | vcard | ) |

Contructor same as linphone_friend_new() + linphone_friend_set_address()

Parameters

  vcard | a LinphoneVcard object

Returns
  a new LinphoneFriend which has its vCard attribute initialized from the given vCard. This can be get by linphone_friend_get_vcard().

## ◆ linphone_friend_new_with_address()

MS2_DEPRECATED LinphoneFriend * linphone_friend_new_with_address | ( | const char * | addr | ) |

Contructor same as linphone_friend_new() + linphone_friend_set_address()

Parameters

  addr | a buddy address, must be a sip uri like sip:joe@s.nosp@m.ip.l.nosp@m.inpho.nosp@m.ne.o.nosp@m.rg

Returns
  a new LinphoneFriend with an initialized address.

Deprecated:
  03/02/2016 use linphone_core_create_friend_with_address() instead

## ◆ linphone_friend_ref()

LinphoneFriend * linphone_friend_ref | ( | LinphoneFriend * | linphone_friend | ) |

Acquire a reference to the linphone friend.

Parameters

  linphone_friend | LinphoneFriend object

Returns
  The same LinphoneFriend object

## ◆ linphone_friend_remove()

void linphone_friend_remove | ( | LinphoneFriend * | linphone_friend | ) |

Removes a friend from it's friend list and from the rc if exists.

Parameters

  linphone_friend | LinphoneFriend object to delete

## ◆ linphone_friend_remove_address()

void linphone_friend_remove_address | ( | LinphoneFriend * | linphone_friend,
|  | const LinphoneAddress * | address
| ) |  |

Removes an address in this friend.

Parameters

  linphone_friend | LinphoneFriend object
  address | LinphoneAddress object

## ◆ linphone_friend_remove_phone_number()

void linphone_friend_remove_phone_number | ( | LinphoneFriend * | linphone_friend,
|  | const char * | phone_number
| ) |  |

Removes a phone number in this friend.

Parameters

  linphone_friend | LinphoneFriend object
  phone_number | number to remove

## ◆ linphone_friend_save()

void linphone_friend_save | ( | LinphoneFriend * | linphone_friend,
|  | LinphoneCore * | core
| ) |  |

Saves a friend either in database if configured, otherwise in linphonerc.

Parameters

  linphone_friend | the linphone friend to save
  core | the linphone core

## ◆ linphone_friend_set_address()

LinphoneStatus linphone_friend_set_address | ( | LinphoneFriend * | fr,
|  | const LinphoneAddress * | address
| ) |  |

Set LinphoneAddress for this friend.

Parameters

  linphone_friend | LinphoneFriend object
  address | the LinphoneAddress to set return 0 if successfull, -1 otherwise

## ◆ linphone_friend_set_inc_subscribe_policy()

LinphoneStatus linphone_friend_set_inc_subscribe_policy | ( | LinphoneFriend * | fr,
|  | LinphoneSubscribePolicy | policy
| ) |  |

Configure incoming subscription policy for this friend.

Parameters

  linphone_friend | LinphoneFriend object
  policy | LinphoneSubscribePolicy policy to apply.

Returns
  0

## ◆ linphone_friend_set_name()

LinphoneStatus linphone_friend_set_name | ( | LinphoneFriend * | linphone_friend,
|  | const char * | name
| ) |  |

Set the display name for this friend.

Parameters

  linphone_friend | LinphoneFriend object
  name | the display name to set

Returns
  0 if successful, -1 otherwise

## ◆ linphone_friend_set_presence_model()

void linphone_friend_set_presence_model | ( | LinphoneFriend * | linphone_friend,
|  | LinphonePresenceModel * | presence
| ) |  |

Set the presence model of a friend.

Parameters

  linphone_friend | A LinphoneFriend object
  presence | The LinphonePresenceModel object to set for the friend

## ◆ linphone_friend_set_presence_model_for_uri_or_tel()

void linphone_friend_set_presence_model_for_uri_or_tel | ( | LinphoneFriend * | linphone_friend,
|  | const char * | uri_or_tel,
|  | LinphonePresenceModel * | presence
| ) |  |

Set the presence model for a specific SIP URI or phone number of a friend.

Parameters

  linphone_friend | A LinphoneFriend object
  uri_or_tel | The SIP URI or phone number for which to set the presence model
  presence | The LinphonePresenceModel object to set

## ◆ linphone_friend_set_ref_key()

void linphone_friend_set_ref_key | ( | LinphoneFriend * | linphone_friend,
|  | const char * | key
| ) |  |

Set the reference key of a friend.

Parameters

  linphone_friend | LinphoneFriend object.
  key | The reference key to use for the friend.

## ◆ linphone_friend_set_user_data()

void linphone_friend_set_user_data | ( | LinphoneFriend * | linphone_friend,
|  | void * | user_data
| ) |  |

Store user pointer to friend object.

Parameters

  linphone_friend | A LinphoneFriend object
  user_data | the user data to store.

## ◆ linphone_friend_set_vcard()

void linphone_friend_set_vcard | ( | LinphoneFriend * | linphone_friend,
|  | LinphoneVcard * | vcard
| ) |  |

Binds a vCard object to a friend.

Parameters

  linphone_friend | LinphoneFriend object
  vcard | The LinphoneVcard object to bind

## ◆ linphone_friend_subscribes_enabled()

bool_t linphone_friend_subscribes_enabled | ( | const LinphoneFriend * | linphone_friend | ) |

get subscription flag value

Parameters

  linphone_friend | LinphoneFriend object

Returns
  returns TRUE is subscription is activated for this friend

## ◆ linphone_friend_unref()

void linphone_friend_unref | ( | LinphoneFriend * | linphone_friend | ) |

Release a reference to the linphone friend.

Parameters

  linphone_friend | LinphoneFriend object

## ◆ linphone_presence_activity_get_description()

const char * linphone_presence_activity_get_description | ( | const LinphonePresenceActivity * | activity | ) |

Gets the description of a presence activity.

Parameters

  activity | A pointer to the LinphonePresenceActivity for which to get the description.

Returns
  A pointer to the description string of the presence activity, or NULL if no description is specified.

## ◆ linphone_presence_activity_get_type()

LinphonePresenceActivityType linphone_presence_activity_get_type | ( | const LinphonePresenceActivity * | activity | ) |

Gets the activity type of a presence activity.

Parameters

  activity | A pointer to the LinphonePresenceActivity for which to get the type.

Returns
  The LinphonePresenceActivityType of the activity.

## ◆ linphone_presence_activity_get_user_data()

void * linphone_presence_activity_get_user_data | ( | const LinphonePresenceActivity * | activity | ) |

Gets the user data of a LinphonePresenceActivity object.

Parameters

  activity | The LinphonePresenceActivity object for which to get the user data.

Returns
  A pointer to the user data.

## ◆ linphone_presence_activity_new()

LinphonePresenceActivity * linphone_presence_activity_new | ( | LinphonePresenceActivityType | acttype,
|  | const char * | description
| ) |  |

Creates a presence activity.

Parameters

  acttype | The LinphonePresenceActivityType to set for the activity.
  description | An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.

Returns
  The created presence activity, NULL on error.

## ◆ linphone_presence_activity_ref()

LinphonePresenceActivity * linphone_presence_activity_ref | ( | LinphonePresenceActivity * | activity | ) |

Increase the reference count of the LinphonePresenceActivity object.

Parameters

  activity | The LinphonePresenceActivity object for which the reference count is to be increased.

Returns
  The LinphonePresenceActivity object with the increased reference count.

## ◆ linphone_presence_activity_set_description()

LinphoneStatus linphone_presence_activity_set_description | ( | LinphonePresenceActivity * | activity,
|  | const char * | description
| ) |  |

Sets the description of a presence activity.

Parameters

  activity | The LinphonePresenceActivity object for which to set the description.
  description | An additional description of the activity. Can be NULL if no additional description is to be added.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_activity_set_type()

LinphoneStatus linphone_presence_activity_set_type | ( | LinphonePresenceActivity * | activity,
|  | LinphonePresenceActivityType | acttype
| ) |  |

Sets the type of activity of a presence activity.

Parameters

  activity | The LinphonePresenceActivity for which to set for the activity type.
  acttype | The LinphonePresenceActivityType to set for the activity.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_activity_set_user_data()

void linphone_presence_activity_set_user_data | ( | LinphonePresenceActivity * | activity,
|  | void * | user_data
| ) |  |

Sets the user data of a LinphonePresenceActivity object.

Parameters

  activity | The LinphonePresenceActivity object for which to set the user data.
  user_data | A pointer to the user data to set.

## ◆ linphone_presence_activity_to_string()

char * linphone_presence_activity_to_string | ( | const LinphonePresenceActivity * | activity | ) |

Gets the string representation of a presence activity.

Parameters

  activity | A pointer to the LinphonePresenceActivity object for which to get a string representation.

Returns
  A pointer a dynamically allocated string representing the given activity.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_activity_unref()

LinphonePresenceActivity * linphone_presence_activity_unref | ( | LinphonePresenceActivity * | activity | ) |

Decrease the reference count of the LinphonePresenceActivity object and destroy it if it reaches 0.

Parameters

  activity | The LinphonePresenceActivity object for which the reference count is to be decreased.

Returns
  The LinphonePresenceActivity object if the reference count is still positive, NULL if the object has been destroyed.

## ◆ linphone_presence_basic_status_to_string()

char * linphone_presence_basic_status_to_string | ( | LinphonePresenceBasicStatus | basic_status | ) |

Gets the string representation of a presence basic status.

Parameters

  basic_status | A LinphonePresenceBasicStatus for which to get a string representation.

Returns
  A pointer a dynamically allocated string representing the given basic status.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_model_add_activity()

LinphoneStatus linphone_presence_model_add_activity | ( | LinphonePresenceModel * | model,
|  | LinphonePresenceActivity * | activity
| ) |  |

Adds an activity to a presence model.

Parameters

  model | The LinphonePresenceModel object for which to add an activity.
  activity | The LinphonePresenceActivity object to add to the model.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_add_note()

LinphoneStatus linphone_presence_model_add_note | ( | LinphonePresenceModel * | model,
|  | const char * | note_content,
|  | const char * | lang
| ) |  |

Adds a note to a presence model.

Parameters

  model | The LinphonePresenceModel object to add a note to.
  note_content | The note to be added to the presence model.
  lang | The language of the note to be added. Can be NULL if no language is to be specified for the note.

Returns
  0 if successful, a value < 0 in case of error.

Only one note for each language can be set, so e.g. setting a note for the 'fr' language if there is only one will replace the existing one.

## ◆ linphone_presence_model_add_person()

LinphoneStatus linphone_presence_model_add_person | ( | LinphonePresenceModel * | model,
|  | LinphonePresencePerson * | person
| ) |  |

Adds a person to a presence model.

Parameters

  model | The LinphonePresenceModel object for which to add a person.
  person | The LinphonePresencePerson object to add to the model.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_add_service()

LinphoneStatus linphone_presence_model_add_service | ( | LinphonePresenceModel * | model,
|  | LinphonePresenceService * | service
| ) |  |

Adds a service to a presence model.

Parameters

  model | The LinphonePresenceModel object for which to add a service.
  service | The LinphonePresenceService object to add to the model.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_clear_activities()

LinphoneStatus linphone_presence_model_clear_activities | ( | LinphonePresenceModel * | model | ) |

Clears the activities of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to clear the activities.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_clear_notes()

LinphoneStatus linphone_presence_model_clear_notes | ( | LinphonePresenceModel * | model | ) |

Clears all the notes of a presence model.

Parameters

  model | The LinphonePresenceModel for which to clear notes.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_clear_persons()

LinphoneStatus linphone_presence_model_clear_persons | ( | LinphonePresenceModel * | model | ) |

Clears the persons of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to clear the persons.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_clear_services()

LinphoneStatus linphone_presence_model_clear_services | ( | LinphonePresenceModel * | model | ) |

Clears the services of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to clear the services.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_get_activity()

LinphonePresenceActivity * linphone_presence_model_get_activity | ( | const LinphonePresenceModel * | model | ) |

Gets the first activity of a presence model (there is usually only one).

Parameters

  model | The LinphonePresenceModel object to get the activity from.

Returns
  A LinphonePresenceActivity object if successful, NULL otherwise.

## ◆ linphone_presence_model_get_basic_status()

LinphonePresenceBasicStatus linphone_presence_model_get_basic_status | ( | const LinphonePresenceModel * | model | ) |

Gets the basic status of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the basic status from.

Returns
  The LinphonePresenceBasicStatus of the LinphonePresenceModel object given as parameter.

## ◆ linphone_presence_model_get_capabilities()

int linphone_presence_model_get_capabilities | ( | const LinphonePresenceModel * | model | ) |

Gets the capabilities of a LinphonePresenceModel object.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.

Returns
  the capabilities.

## ◆ linphone_presence_model_get_capability_version()

float linphone_presence_model_get_capability_version | ( | const LinphonePresenceModel * | model,
|  | const LinphoneFriendCapability | capability
| ) |  |

Returns the version of the capability of a LinphonePresenceModel.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  capability | The LinphoneFriendCapability to test.

Returns
  the version of the capability of a LinphonePresenceModel or -1.0 if the model has not the capability.

## ◆ linphone_presence_model_get_consolidated_presence()

LinphoneConsolidatedPresence linphone_presence_model_get_consolidated_presence | ( | const LinphonePresenceModel * | model | ) |

Get the consolidated presence from a presence model.

Parameters

  model | LinphonePresenceModel object

Returns
  The LinphoneConsolidatedPresence corresponding to the presence model

## ◆ linphone_presence_model_get_contact()

char * linphone_presence_model_get_contact | ( | const LinphonePresenceModel * | model | ) |

Gets the contact of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the contact from.

Returns
  A pointer to a dynamically allocated string containing the contact, or NULL if no contact is found.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_model_get_nb_activities()

unsigned int linphone_presence_model_get_nb_activities | ( | const LinphonePresenceModel * | model | ) |

Gets the number of activities included in the presence model.

Parameters

  model | The LinphonePresenceModel object to get the number of activities from.

Returns
  The number of activities included in the LinphonePresenceModel object.

## ◆ linphone_presence_model_get_nb_persons()

unsigned int linphone_presence_model_get_nb_persons | ( | const LinphonePresenceModel * | model | ) |

Gets the number of persons included in the presence model.

Parameters

  model | The LinphonePresenceModel object to get the number of persons from.

Returns
  The number of persons included in the LinphonePresenceModel object.

## ◆ linphone_presence_model_get_nb_services()

unsigned int linphone_presence_model_get_nb_services | ( | const LinphonePresenceModel * | model | ) |

Gets the number of services included in the presence model.

Parameters

  model | The LinphonePresenceModel object to get the number of services from.

Returns
  The number of services included in the LinphonePresenceModel object.

## ◆ linphone_presence_model_get_note()

LinphonePresenceNote * linphone_presence_model_get_note | ( | const LinphonePresenceModel * | model,
|  | const char * | lang
| ) |  |

Gets the first note of a presence model (there is usually only one).

Parameters

  model | The LinphonePresenceModel object to get the note from.
  lang | The language of the note to get. Can be NULL to get a note that has no language specified or to get the first note whatever language it is written into.

Returns
  A pointer to a LinphonePresenceNote object if successful, NULL otherwise.

## ◆ linphone_presence_model_get_nth_activity()

LinphonePresenceActivity * linphone_presence_model_get_nth_activity | ( | const LinphonePresenceModel * | model,
|  | unsigned int | index
| ) |  |

Gets the nth activity of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the activity from.
  index | The index of the activity to get (the first activity having the index 0).

Returns
  A pointer to a LinphonePresenceActivity object if successful, NULL otherwise.

## ◆ linphone_presence_model_get_nth_person()

LinphonePresencePerson * linphone_presence_model_get_nth_person | ( | const LinphonePresenceModel * | model,
|  | unsigned int | index
| ) |  |

Gets the nth person of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the person from.
  index | The index of the person to get (the first person having the index 0).

Returns
  A pointer to a LinphonePresencePerson object if successful, NULL otherwise.

## ◆ linphone_presence_model_get_nth_service()

LinphonePresenceService * linphone_presence_model_get_nth_service | ( | const LinphonePresenceModel * | model,
|  | unsigned int | index
| ) |  |

Gets the nth service of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the service from.
  index | The index of the service to get (the first service having the index 0).

Returns
  A pointer to a LinphonePresenceService object if successful, NULL otherwise.

## ◆ linphone_presence_model_get_presentity()

const LinphoneAddress * linphone_presence_model_get_presentity | ( | const LinphonePresenceModel * | model | ) |

Gets the presentity of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the contact from.

Returns
  A pointer to a const LinphoneAddress, or NULL if no contact is found.

## ◆ linphone_presence_model_get_timestamp()

time_t linphone_presence_model_get_timestamp | ( | const LinphonePresenceModel * | model | ) |

Gets the timestamp of a presence model.

Parameters

  model | The LinphonePresenceModel object to get the timestamp from.

Returns
  The timestamp of the LinphonePresenceModel object or -1 on error.

## ◆ linphone_presence_model_get_user_data()

void * linphone_presence_model_get_user_data | ( | const LinphonePresenceModel * | model | ) |

Gets the user data of a LinphonePresenceModel object.

Parameters

  model | The LinphonePresenceModel object for which to get the user data.

Returns
  A pointer to the user data.

## ◆ linphone_presence_model_has_capability()

bool_t linphone_presence_model_has_capability | ( | const LinphonePresenceModel * | model,
|  | const LinphoneFriendCapability | capability
| ) |  |

Returns whether or not the LinphonePresenceModel object has a given capability.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  capability | The capability to test.

Returns
  whether or not the LinphonePresenceModel object has a given capability.

## ◆ linphone_presence_model_has_capability_with_version()

bool_t linphone_presence_model_has_capability_with_version | ( | const LinphonePresenceModel * | model,
|  | const LinphoneFriendCapability | capability,
|  | float | version
| ) |  |

Returns whether or not the LinphonePresenceModel object has a given capability with a certain version.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  capability | The LinphoneFriendCapability to test.
  version | The wanted version to test.

Returns
  whether or not the LinphonePresenceModel object has a given capability with a certain version.

## ◆ linphone_presence_model_has_capability_with_version_or_more()

bool_t linphone_presence_model_has_capability_with_version_or_more | ( | const LinphonePresenceModel * | model,
|  | const LinphoneFriendCapability | capability,
|  | float | version
| ) |  |

Returns whether or not the LinphonePresenceModel object has a given capability with a certain version or more.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  capability | The LinphoneFriendCapability to test.
  version | The wanted version to test.

Returns
  whether or not the LinphonePresenceModel object has a given capability with a certain version or more.

## ◆ linphone_presence_model_is_online()

bool_t linphone_presence_model_is_online | ( | const LinphonePresenceModel * | model | ) |

Tells whether a presence model is considered online.

It is any of theses cases:

- basic status is'open' and no activities
- explicit 'online' tag in the status
  Parameters

    model | LinphonePresenceModel object

  Returns
    A boolean value telling whether the presence model is considered online or not.

## ◆ linphone_presence_model_new()

LinphonePresenceModel * linphone_presence_model_new | ( | void |  | ) |

Creates a default presence model.

Returns
  The created presence model, NULL on error.

See also
  linphone_presence_model_new_with_activity(), linphone_presence_model_new_with_activity_and_note()

The created presence model is considered 'offline'.

## ◆ linphone_presence_model_new_with_activity()

LinphonePresenceModel * linphone_presence_model_new_with_activity | ( | LinphonePresenceActivityType | activity,
|  | const char * | description
| ) |  |

Creates a presence model specifying an activity.

Parameters

  activity | The LinphonePresenceActivityType to set for the created presence model.
  description | An additional description of the activity (mainly useful for the 'other' activity). Set it to NULL to not add a description.

Returns
  The created LinphonePresenceModel, or NULL if an error occured.

See also
  linphone_presence_model_new(), linphone_presence_model_new_with_activity_and_note()

The created presence model has the activity specified in the parameters.

## ◆ linphone_presence_model_new_with_activity_and_note()

LinphonePresenceModel * linphone_presence_model_new_with_activity_and_note | ( | LinphonePresenceActivityType | activity,
|  | const char * | description,
|  | const char * | note,
|  | const char * | lang
| ) |  |

Creates a presence model specifying an activity and adding a note.

Parameters

  activity | The LinphonePresenceActivityType to set for the created presence model.
  description | An additional description of the activity (mainly useful for the 'other' activity). Set it to NULL to not add a description.
  note | An additional note giving additional information about the contact presence.
  lang | The language the note is written in. It can be set to NULL in order to not specify the language of the note.

Returns
  The created LinphonePresenceModel, or NULL if an error occured.

See also
  linphone_presence_model_new_with_activity(), linphone_presence_model_new_with_activity_and_note()

The created presence model has the activity and the note specified in the parameters.

## ◆ linphone_presence_model_ref()

LinphonePresenceModel * linphone_presence_model_ref | ( | LinphonePresenceModel * | model | ) |

Increase the reference count of the LinphonePresenceModel object.

Parameters

  model | The LinphonePresenceModel object for which the reference count is to be increased.

Returns
  The LinphonePresenceModel object with the increased reference count.

## ◆ linphone_presence_model_set_activity()

LinphoneStatus linphone_presence_model_set_activity | ( | LinphonePresenceModel * | model,
|  | LinphonePresenceActivityType | activity,
|  | const char * | description
| ) |  |

Sets the activity of a presence model (limits to only one activity).

Parameters

  model | The LinphonePresenceModel object for which to set the activity.
  activity | The LinphonePresenceActivityType to set for the model.
  description | An additional description of the activity to set for the model. Can be NULL if no additional description is to be added.

Returns
  0 if successful, a value < 0 in case of error.

WARNING: This function will modify the basic status of the model according to the activity being set. If you don't want the basic status to be modified automatically, you can use the combination of linphone_presence_model_set_basic_status(), linphone_presence_model_clear_activities() and linphone_presence_model_add_activity().

## ◆ linphone_presence_model_set_basic_status()

LinphoneStatus linphone_presence_model_set_basic_status | ( | LinphonePresenceModel * | model,
|  | LinphonePresenceBasicStatus | basic_status
| ) |  |

Sets the basic status of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to set the basic status.
  basic_status | The LinphonePresenceBasicStatus to set for the LinphonePresenceModel object.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_set_contact()

LinphoneStatus linphone_presence_model_set_contact | ( | LinphonePresenceModel * | model,
|  | const char * | contact
| ) |  |

Sets the contact of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  contact | The contact string to set.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_set_presentity()

LinphoneStatus linphone_presence_model_set_presentity | ( | LinphonePresenceModel * | model,
|  | const LinphoneAddress * | presentity
| ) |  |

Sets the presentity of a presence model.

Parameters

  model | The LinphonePresenceModel object for which to set the contact.
  presentity | The presentity address to set (presentity is copied).

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_model_set_user_data()

void linphone_presence_model_set_user_data | ( | LinphonePresenceModel * | model,
|  | void * | user_data
| ) |  |

Sets the user data of a LinphonePresenceModel object.

Parameters

  model | The LinphonePresenceModel object for which to set the user data.
  user_data | A pointer to the user data to set.

## ◆ linphone_presence_model_unref()

LinphonePresenceModel * linphone_presence_model_unref | ( | LinphonePresenceModel * | model | ) |

Decrease the reference count of the LinphonePresenceModel object and destroy it if it reaches 0.

Parameters

  model | The LinphonePresenceModel object for which the reference count is to be decreased.

Returns
  The LinphonePresenceModel object if the reference count is still positive, NULL if the object has been destroyed.

## ◆ linphone_presence_note_get_content()

const char * linphone_presence_note_get_content | ( | const LinphonePresenceNote * | note | ) |

Gets the content of a presence note.

Parameters

  note | A pointer to the LinphonePresenceNote for which to get the content.

Returns
  A pointer to the content of the presence note.

## ◆ linphone_presence_note_get_lang()

const char * linphone_presence_note_get_lang | ( | const LinphonePresenceNote * | note | ) |

Gets the language of a presence note.

Parameters

  note | A pointer to the LinphonePresenceNote for which to get the language.

Returns
  A pointer to the language string of the presence note, or NULL if no language is specified.

## ◆ linphone_presence_note_get_user_data()

void * linphone_presence_note_get_user_data | ( | const LinphonePresenceNote * | note | ) |

Gets the user data of a LinphonePresenceNote object.

Parameters

  note | The LinphonePresenceNote object for which to get the user data.

Returns
  A pointer to the user data.

## ◆ linphone_presence_note_new()

LinphonePresenceNote * linphone_presence_note_new | ( | const char * | content,
|  | const char * | lang
| ) |  |

Creates a presence note.

Parameters

  content | The content of the note to be created.
  lang | The language of the note to be created. Can be NULL if no language is to be specified for the note.

Returns
  The created presence note, NULL on error.

## ◆ linphone_presence_note_ref()

LinphonePresenceNote * linphone_presence_note_ref | ( | LinphonePresenceNote * | note | ) |

Increase the reference count of the LinphonePresenceNote object.

Parameters

  note | The LinphonePresenceNote object for which the reference count is to be increased.

Returns
  The LinphonePresenceNote object with the increased reference count.

## ◆ linphone_presence_note_set_content()

LinphoneStatus linphone_presence_note_set_content | ( | LinphonePresenceNote * | note,
|  | const char * | content
| ) |  |

Sets the content of a presence note.

Parameters

  note | The LinphonePresenceNote object for which to set the content.
  content | The content of the note.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_note_set_lang()

LinphoneStatus linphone_presence_note_set_lang | ( | LinphonePresenceNote * | note,
|  | const char * | lang
| ) |  |

Sets the language of a presence note.

Parameters

  note | The LinphonePresenceNote object for which to set the language.
  lang | The language of the note.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_note_set_user_data()

void linphone_presence_note_set_user_data | ( | LinphonePresenceNote * | note,
|  | void * | user_data
| ) |  |

Sets the user data of a LinphonePresenceNote object.

Parameters

  note | The LinphonePresenceNote object for which to set the user data.
  user_data | A pointer to the user data to set.

## ◆ linphone_presence_note_unref()

LinphonePresenceNote * linphone_presence_note_unref | ( | LinphonePresenceNote * | note | ) |

Decrease the reference count of the LinphonePresenceNote object and destroy it if it reaches 0.

Parameters

  note | The LinphonePresenceNote object for which the reference count is to be decreased.

Returns
  The LinphonePresenceNote object if the reference count is still positive, NULL if the object has been destroyed.

## ◆ linphone_presence_person_add_activities_note()

LinphoneStatus linphone_presence_person_add_activities_note | ( | LinphonePresencePerson * | person,
|  | LinphonePresenceNote * | note
| ) |  |

Adds an activities note to a presence person.

Parameters

  person | The LinphonePresencePerson object for which to add an activities note.
  note | The LinphonePresenceNote object to add to the person.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_add_activity()

LinphoneStatus linphone_presence_person_add_activity | ( | LinphonePresencePerson * | person,
|  | LinphonePresenceActivity * | activity
| ) |  |

Adds an activity to a presence person.

Parameters

  person | The LinphonePresencePerson object for which to add an activity.
  activity | The LinphonePresenceActivity object to add to the person.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_add_note()

LinphoneStatus linphone_presence_person_add_note | ( | LinphonePresencePerson * | person,
|  | LinphonePresenceNote * | note
| ) |  |

Adds a note to a presence person.

Parameters

  person | The LinphonePresencePerson object for which to add a note.
  note | The LinphonePresenceNote object to add to the person.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_clear_activities()

LinphoneStatus linphone_presence_person_clear_activities | ( | LinphonePresencePerson * | person | ) |

Clears the activities of a presence person.

Parameters

  person | The LinphonePresencePerson object for which to clear the activities.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_clear_activities_notes()

LinphoneStatus linphone_presence_person_clear_activities_notes | ( | LinphonePresencePerson * | person | ) |

Clears the activities notes of a presence person.

Parameters

  person | The LinphonePresencePerson object for which to clear the activities notes.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_clear_notes()

LinphoneStatus linphone_presence_person_clear_notes | ( | LinphonePresencePerson * | person | ) |

Clears the notes of a presence person.

Parameters

  person | The LinphonePresencePerson object for which to clear the notes.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_get_id()

char * linphone_presence_person_get_id | ( | const LinphonePresencePerson * | person | ) |

Gets the id of a presence person.

Parameters

  person | The LinphonePresencePerson object to get the id from.

Returns
  A pointer to a dynamically allocated string containing the id, or NULL in case of error.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_person_get_nb_activities()

unsigned int linphone_presence_person_get_nb_activities | ( | const LinphonePresencePerson * | person | ) |

Gets the number of activities included in the presence person.

Parameters

  person | The LinphonePresencePerson object to get the number of activities from.

Returns
  The number of activities included in the LinphonePresencePerson object.

## ◆ linphone_presence_person_get_nb_activities_notes()

unsigned int linphone_presence_person_get_nb_activities_notes | ( | const LinphonePresencePerson * | person | ) |

Gets the number of activities notes included in the presence person.

Parameters

  person | The LinphonePresencePerson object to get the number of activities notes from.

Returns
  The number of activities notes included in the LinphonePresencePerson object.

## ◆ linphone_presence_person_get_nb_notes()

unsigned int linphone_presence_person_get_nb_notes | ( | const LinphonePresencePerson * | person | ) |

Gets the number of notes included in the presence person.

Parameters

  person | The LinphonePresencePerson object to get the number of notes from.

Returns
  The number of notes included in the LinphonePresencePerson object.

## ◆ linphone_presence_person_get_nth_activities_note()

LinphonePresenceNote * linphone_presence_person_get_nth_activities_note | ( | const LinphonePresencePerson * | person,
|  | unsigned int | index
| ) |  |

Gets the nth activities note of a presence person.

Parameters

  person | The LinphonePresencePerson object to get the activities note from.
  index | The index of the activities note to get (the first note having the index 0).

Returns
  A pointer to a LinphonePresenceNote object if successful, NULL otherwise.

## ◆ linphone_presence_person_get_nth_activity()

LinphonePresenceActivity * linphone_presence_person_get_nth_activity | ( | const LinphonePresencePerson * | person,
|  | unsigned int | index
| ) |  |

Gets the nth activity of a presence person.

Parameters

  person | The LinphonePresencePerson object to get the activity from.
  index | The index of the activity to get (the first activity having the index 0).

Returns
  A pointer to a LinphonePresenceActivity object if successful, NULL otherwise.

## ◆ linphone_presence_person_get_nth_note()

LinphonePresenceNote * linphone_presence_person_get_nth_note | ( | const LinphonePresencePerson * | person,
|  | unsigned int | index
| ) |  |

Gets the nth note of a presence person.

Parameters

  person | The LinphonePresencePerson object to get the note from.
  index | The index of the note to get (the first note having the index 0).

Returns
  A pointer to a LinphonePresenceNote object if successful, NULL otherwise.

## ◆ linphone_presence_person_get_user_data()

void * linphone_presence_person_get_user_data | ( | const LinphonePresencePerson * | person | ) |

Gets the user data of a LinphonePresencePerson object.

Parameters

  person | The LinphonePresencePerson object for which to get the user data.

Returns
  A pointer to the user data.

## ◆ linphone_presence_person_new()

LinphonePresencePerson * linphone_presence_person_new | ( | const char * | id | ) |

Creates a presence person.

Parameters

  id | The id of the presence person to be created. Can be NULL to generate it automatically.

Returns
  The created presence person, NULL on error.

## ◆ linphone_presence_person_ref()

LinphonePresencePerson * linphone_presence_person_ref | ( | LinphonePresencePerson * | person | ) |

Increase the reference count of the LinphonePresencePerson object.

Parameters

  person | The LinphonePresencePerson object for which the reference count is to be increased.

Returns
  The LinphonePresencePerson object with the increased reference count.

## ◆ linphone_presence_person_set_id()

LinphoneStatus linphone_presence_person_set_id | ( | LinphonePresencePerson * | person,
|  | const char * | id
| ) |  |

Sets the id of a presence person.

Parameters

  person | The LinphonePresencePerson object for which to set the id.
  id | The id string to set. Can be NULL to generate it automatically.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_person_set_user_data()

void linphone_presence_person_set_user_data | ( | LinphonePresencePerson * | person,
|  | void * | user_data
| ) |  |

Sets the user data of a LinphonePresencePerson object.

Parameters

  person | The LinphonePresencePerson object for which to set the user data.
  user_data | A pointer to the user data to set.

## ◆ linphone_presence_person_unref()

LinphonePresencePerson * linphone_presence_person_unref | ( | LinphonePresencePerson * | person | ) |

Decrease the reference count of the LinphonePresencePerson object and destroy it if it reaches 0.

Parameters

  person | The LinphonePresencePerson object for which the reference count is to be decreased.

Returns
  The LinphonePresencePerson object if the reference count is still positive, NULL if the object has been destroyed.

## ◆ linphone_presence_service_add_note()

LinphoneStatus linphone_presence_service_add_note | ( | LinphonePresenceService * | service,
|  | LinphonePresenceNote * | note
| ) |  |

Adds a note to a presence service.

Parameters

  service | The LinphonePresenceService object for which to add a note.
  note | The LinphonePresenceNote object to add to the service.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_clear_notes()

LinphoneStatus linphone_presence_service_clear_notes | ( | LinphonePresenceService * | service | ) |

Clears the notes of a presence service.

Parameters

  service | The LinphonePresenceService object for which to clear the notes.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_get_basic_status()

LinphonePresenceBasicStatus linphone_presence_service_get_basic_status | ( | const LinphonePresenceService * | service | ) |

Gets the basic status of a presence service.

Parameters

  service | The LinphonePresenceService object to get the basic status from.

Returns
  The LinphonePresenceBasicStatus of the LinphonePresenceService object given as parameter.

## ◆ linphone_presence_service_get_contact()

char * linphone_presence_service_get_contact | ( | const LinphonePresenceService * | service | ) |

Gets the contact of a presence service.

Parameters

  service | The LinphonePresenceService object to get the contact from.

Returns
  A pointer to a dynamically allocated string containing the contact, or NULL if no contact is found.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_service_get_id()

char * linphone_presence_service_get_id | ( | const LinphonePresenceService * | service | ) |

Gets the id of a presence service.

Parameters

  service | The LinphonePresenceService object to get the id from.

Returns
  A pointer to a dynamically allocated string containing the id, or NULL in case of error.

The returned string is to be freed by calling ms_free().

## ◆ linphone_presence_service_get_nb_notes()

unsigned int linphone_presence_service_get_nb_notes | ( | const LinphonePresenceService * | service | ) |

Gets the number of notes included in the presence service.

Parameters

  service | The LinphonePresenceService object to get the number of notes from.

Returns
  The number of notes included in the LinphonePresenceService object.

## ◆ linphone_presence_service_get_nth_note()

LinphonePresenceNote * linphone_presence_service_get_nth_note | ( | const LinphonePresenceService * | service,
|  | unsigned int | index
| ) |  |

Gets the nth note of a presence service.

Parameters

  service | The LinphonePresenceService object to get the note from.
  index | The index of the note to get (the first note having the index 0).

Returns
  A pointer to a LinphonePresenceNote object if successful, NULL otherwise.

## ◆ linphone_presence_service_get_service_descriptions()

bctbx_list_t * linphone_presence_service_get_service_descriptions | ( | const LinphonePresenceService * | service | ) |

Gets the service descriptions of a presence service.

Parameters

  service | The LinphonePresenceService object to get the contact from.

Returns
  A containing the services descriptions.

The returned string is to be freed.

## ◆ linphone_presence_service_get_user_data()

void * linphone_presence_service_get_user_data | ( | const LinphonePresenceService * | service | ) |

Gets the user data of a LinphonePresenceService object.

Parameters

  service | The LinphonePresenceService object for which to get the user data.

Returns
  A pointer to the user data.

## ◆ linphone_presence_service_new()

LinphonePresenceService * linphone_presence_service_new | ( | const char * | id,
|  | LinphonePresenceBasicStatus | basic_status,
|  | const char * | contact
| ) |  |

Creates a presence service.

Parameters

  id | The id of the presence service to be created. Can be NULL to generate it automatically.
  basic_status | The LinphonePresenceBasicStatus to set for the LinphonePresenceService object.
  contact | The contact string to set.

Returns
  The created presence service, NULL on error.

The created presence service has the basic status 'closed'.

## ◆ linphone_presence_service_ref()

LinphonePresenceService * linphone_presence_service_ref | ( | LinphonePresenceService * | service | ) |

Increase the reference count of the LinphonePresenceService object.

Parameters

  service | The LinphonePresenceService object for which the reference count is to be increased.

Returns
  The LinphonePresenceService object with the increased reference count.

## ◆ linphone_presence_service_set_basic_status()

LinphoneStatus linphone_presence_service_set_basic_status | ( | LinphonePresenceService * | service,
|  | LinphonePresenceBasicStatus | basic_status
| ) |  |

Sets the basic status of a presence service.

Parameters

  service | The LinphonePresenceService object for which to set the basic status.
  basic_status | The LinphonePresenceBasicStatus to set for the LinphonePresenceService object.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_set_contact()

LinphoneStatus linphone_presence_service_set_contact | ( | LinphonePresenceService * | service,
|  | const char * | contact
| ) |  |

Sets the contact of a presence service.

Parameters

  service | The LinphonePresenceService object for which to set the contact.
  contact | The contact string to set.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_set_id()

LinphoneStatus linphone_presence_service_set_id | ( | LinphonePresenceService * | service,
|  | const char * | id
| ) |  |

Sets the id of a presence service.

Parameters

  service | The LinphonePresenceService object for which to set the id.
  id | The id string to set. Can be NULL to generate it automatically.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_set_service_descriptions()

LinphoneStatus linphone_presence_service_set_service_descriptions | ( | LinphonePresenceService * | service,
|  | bctbx_list_t * | descriptions
| ) |  |

Sets the service descriptions of a presence service.

Parameters

  service | The LinphonePresenceService object for which to set the contact.
  descriptions | The service descriptions.

Returns
  0 if successful, a value < 0 in case of error.

## ◆ linphone_presence_service_set_user_data()

void linphone_presence_service_set_user_data | ( | LinphonePresenceService * | service,
|  | void * | user_data
| ) |  |

Sets the user data of a LinphonePresenceService object.

Parameters

  service | The LinphonePresenceService object for which to set the user data.
  user_data | A pointer to the user data to set.

## ◆ linphone_presence_service_unref()

LinphonePresenceService * linphone_presence_service_unref | ( | LinphonePresenceService * | service | ) |

Decrease the reference count of the LinphonePresenceService object and destroy it if it reaches 0.

Parameters

  service | The LinphonePresenceService object for which the reference count is to be decreased.

Returns
  The LinphonePresenceService object if the reference count is still positive, NULL if the object has been destroyed.