Liblinphone  5.5.0
Linphone.FriendList Class Reference
Inheritance diagram for Linphone.FriendList:
Linphone.LinphoneObject

Public Member Functions

Linphone.FriendListStatus AddFriend (Linphone.Friend linphoneFriend)
 
Linphone.FriendListStatus AddLocalFriend (Linphone.Friend linphoneFriend)
 
void ExportFriendsAsVcard4File (string vcardFile)
 
Linphone.Friend FindFriendByAddress (Linphone.Address address)
 
Linphone.Friend FindFriendByPhoneNumber (string phoneNumber)
 
Linphone.Friend FindFriendByRefKey (string refKey)
 
Linphone.Friend FindFriendByUri (string uri)
 
IEnumerable< Linphone.FriendFindFriendsByAddress (Linphone.Address address)
 
IEnumerable< Linphone.FriendFindFriendsByUri (string uri)
 
int ImportFriendsFromVcard4Buffer (string vcardBuffer)
 
int ImportFriendsFromVcard4File (string vcardFile)
 
void NotifyPresence (Linphone.PresenceModel presence)
 
Linphone.FriendListStatus RemoveFriend (Linphone.Friend linphoneFriend)
 
void SynchronizeFriendsFromServer ()
 
bool SynchronizeFriendsWith (IEnumerable< Linphone.Friend > sourceFriends)
 
void UpdateDirtyFriends ()
 
void UpdateRevision (string revision)
 
void UpdateSubscriptions ()
 

Properties

FriendListListener Listener [get, set]
 
Linphone.Core Core [get]
 
bool DatabaseStorageEnabled [get, set]
 
string DisplayName [get, set]
 
IEnumerable< Linphone.FriendFriends [get]
 
bool IsReadOnly [get, set]
 
bool IsSubscriptionBodyless [get]
 
Linphone.Address RlsAddress [get, set]
 
string RlsUri [get, set]
 
bool SubscriptionBodyless [set]
 
bool SubscriptionsEnabled [get, set]
 
Linphone.FriendListType Type [get, set]
 
string Uri [get, set]
 

Additional Inherited Members

- Protected Member Functions inherited from Linphone.LinphoneObject
static String linphone_pointer_to_string (IntPtr ptr)
 
static IntPtr linphone_string_to_pointer ([MarshalAs(LinphoneWrapper.ByteStringMarshalling)] String str)
 
IntPtr StringArrayToBctbxList (IEnumerable< string > stringlist)
 
void CleanStringArrayPtrs (IntPtr l)
 

Detailed Description

This object representing a list of Linphone.Friend.

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

Member Function Documentation

Linphone.FriendListStatus Linphone.FriendList.AddFriend ( Linphone.Friend  linphoneFriend)
inline

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
linphoneFriendLinphone.Friend object to add to the friend list.
Returns
Linphone.FriendListStatus.OK if successfully added, Linphone.FriendListStatus.InvalidFriend if the friend is not valid.
Linphone.FriendListStatus Linphone.FriendList.AddLocalFriend ( Linphone.Friend  linphoneFriend)
inline

Add a friend to a friend list.

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

Parameters
linphoneFriendLinphone.Friend object to add to the friend list.
Returns
Linphone.FriendListStatus.OK if successfully added, Linphone.FriendListStatus.InvalidFriend if the friend is not valid.
void Linphone.FriendList.ExportFriendsAsVcard4File ( string  vcardFile)
inline

Creates and export Linphone.Friend objects from Linphone.FriendList to a file using vCard 4 format.

Parameters
vcardFilethe path to a file that will contain the vCards
Linphone.Friend Linphone.FriendList.FindFriendByAddress ( Linphone.Address  address)
inline

Find a friend in the friend list using a LinphoneAddress.

Parameters
addressLinphone.Address object of the friend we want to search for.
Returns
A Linphone.Friend if found, null otherwise.
Linphone.Friend Linphone.FriendList.FindFriendByPhoneNumber ( string  phoneNumber)
inline

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

Parameters
phoneNumbera string of the phone number for which we want to find a friend.
Returns
A Linphone.Friend if found, null otherwise.
Linphone.Friend Linphone.FriendList.FindFriendByRefKey ( string  refKey)
inline

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

Parameters
refKeyThe ref key string of the friend we want to search for.
Returns
A Linphone.Friend if found, null otherwise.
Linphone.Friend Linphone.FriendList.FindFriendByUri ( string  uri)
inline

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

Parameters
uriA string containing the URI of the friend we want to search for.
Returns
A Linphone.Friend if found, null otherwise.
IEnumerable<Linphone.Friend> Linphone.FriendList.FindFriendsByAddress ( Linphone.Address  address)
inline

Find all friends in the friend list using a LinphoneAddress.

Parameters
addressLinphone.Address object of the friends we want to search for.
Returns
A list of Linphone.Friend if found, null otherwise. A list of Linphone.Friend objects.
IEnumerable<Linphone.Friend> Linphone.FriendList.FindFriendsByUri ( string  uri)
inline

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

Parameters
uriA string containing the URI of the friends we want to search for.
Returns
A list of Linphone.Friend if found, null otherwise. A list of Linphone.Friend objects.
int Linphone.FriendList.ImportFriendsFromVcard4Buffer ( string  vcardBuffer)
inline

Creates and adds Linphone.Friend objects to Linphone.FriendList from a buffer that contains the vCard(s) to parse.

Parameters
vcardBufferthe buffer that contains the vCard(s) to parse
Returns
the amount of linphone friends created
int Linphone.FriendList.ImportFriendsFromVcard4File ( string  vcardFile)
inline

Creates and adds Linphone.Friend objects to Linphone.FriendList from a file that contains the vCard(s) to parse.

Parameters
vcardFilethe path to a file that contains the vCard(s) to parse
Returns
the amount of linphone friends created
void Linphone.FriendList.NotifyPresence ( Linphone.PresenceModel  presence)
inline

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

Parameters
presenceLinphone.PresenceModel object.
Linphone.FriendListStatus Linphone.FriendList.RemoveFriend ( Linphone.Friend  linphoneFriend)
inline

Remove a friend from a friend list.

Parameters
linphoneFriendLinphone.Friend object to remove from the friend list.
Returns
Linphone.FriendListStatus.OK if removed successfully, Linphone.FriendListStatus.NonExistentFriend if the friend is not in the list.
void Linphone.FriendList.SynchronizeFriendsFromServer ( )
inline

Starts a CardDAV synchronization using value set using linphone_friend_list_set_uri.

bool Linphone.FriendList.SynchronizeFriendsWith ( IEnumerable< Linphone.Friend sourceFriends)
inline

Synchronize a local friendlist with another list of friends.

All friends in common will be updated using the data from the source friends. Missing friends from the source friends will be added. Extra friends from the local friendlist will be removed.

Parameters
sourceFriendsthe list of Linphone.Friend whose data will be copied. (not a Linphone.FriendList !) A list of Linphone.Friend objects.
Returns
true if the friendlist has been modified, false if no change happened
void Linphone.FriendList.UpdateDirtyFriends ( )
inline

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

void Linphone.FriendList.UpdateRevision ( string  revision)
inline

Sets the revision from the last synchronization.

Parameters
revisionThe revision.

Warning : before 5.4.0 release revision was an int, it's now a string.

void Linphone.FriendList.UpdateSubscriptions ( )
inline

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.

Property Documentation

Linphone.Core Linphone.FriendList.Core
get

Returns the Linphone.Core object attached to this LinphoneFriendList.

Returns
a Linphone.Core object
bool Linphone.FriendList.DatabaseStorageEnabled
getset

Gets whether this friend list and it's friends will be stored in DB or not.

Returns
Whether the list and it's friends will be saved in database or not
string Linphone.FriendList.DisplayName
getset

Get the display name of the friend list.

Returns
The display name of the friend list.
IEnumerable<Linphone.Friend> Linphone.FriendList.Friends
get

Retrieves the list of Linphone.Friend from this LinphoneFriendList.

Returns
A list of Linphone.Friend A list of Linphone.Friend objects.
bool Linphone.FriendList.IsReadOnly
getset

Gets whether this friend list is read only or not.

If it is, you won't be able to add/remove friends in/from it, nor to edit existing friends in it.

Returns
true if this friend list is in read-only mode and thus can't be modified, false otherwise.
bool Linphone.FriendList.IsSubscriptionBodyless
get

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

Returns
Wether the subscription of the friend list is bodyless or not.
Linphone.Address Linphone.FriendList.RlsAddress
getset

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

Returns
The RLS URI as Linphone.Address associated with the friend list.
string Linphone.FriendList.RlsUri
getset

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

Returns
The RLS URI associated with the friend list.

Deprecated : 27/10/2020. Use Linphone.FriendList.RlsAddress instead.

bool Linphone.FriendList.SubscriptionBodyless
set

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

Parameters
bodylessboolean telling if the subscription of the friend list is bodyless or not.
bool Linphone.FriendList.SubscriptionsEnabled
getset

Gets whether subscription to NOTIFYs are enabled or not.

Returns
Whether subscriptions are enabled or not
Linphone.FriendListType Linphone.FriendList.Type
getset

Get the Linphone.FriendListType of a friend list.

string Linphone.FriendList.Uri
getset

Get the URI associated with the friend list.

Returns
The URI associated with the friend list.

The documentation for this class was generated from the following file: