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

Public Member Functions

void AddAddress (Linphone.Address address)
 
void AddPhoneNumber (string phoneNumber)
 
void AddPhoneNumberWithLabel (Linphone.FriendPhoneNumber phoneNumber)
 
bool CreateVcard (string name)
 
void Done ()
 
string DumpVcard ()
 
void Edit ()
 
float GetCapabilityVersion (Linphone.FriendCapability capability)
 
IEnumerable< Linphone.FriendDeviceGetDevicesForAddress (Linphone.Address address)
 
Linphone.PresenceModel GetPresenceModelForUriOrTel (string uriOrTel)
 
Linphone.SecurityLevel GetSecurityLevelForAddress (Linphone.Address address)
 
bool HasCapability (Linphone.FriendCapability capability)
 
bool HasCapabilityWithVersion (Linphone.FriendCapability capability, float version)
 
bool HasCapabilityWithVersionOrMore (Linphone.FriendCapability capability, float version)
 
bool HasPhoneNumber (string phoneNumber)
 
bool InList ()
 
void Remove ()
 
void RemoveAddress (Linphone.Address address)
 
void RemovePhoneNumber (string phoneNumber)
 
void RemovePhoneNumberWithLabel (Linphone.FriendPhoneNumber phoneNumber)
 
void Save (Linphone.Core core)
 
void SetPresenceModelForUriOrTel (string uriOrTel, Linphone.PresenceModel presence)
 

Properties

FriendListener Listener [get, set]
 
Linphone.Address Address [get, set]
 
IEnumerable< Linphone.AddressAddresses [get]
 
int Capabilities [get]
 
Linphone.ConsolidatedPresence ConsolidatedPresence [get]
 
Linphone.Core Core [get]
 
IEnumerable< Linphone.FriendDeviceDevices [get]
 
string FirstName [get, set]
 
Linphone.FriendList FriendList [get]
 
Linphone.SubscribePolicy IncSubscribePolicy [get, set]
 
bool IsPresenceReceived [get]
 
bool IsReadOnly [get]
 
string JobTitle [get, set]
 
string LastName [get, set]
 
string Name [get, set]
 
string NativeUri [get, set]
 
string Organization [get, set]
 
IEnumerable< string > PhoneNumbers [get]
 
IEnumerable< Linphone.FriendPhoneNumberPhoneNumbersWithLabel [get]
 
string Photo [get, set]
 
Linphone.PresenceModel PresenceModel [get, set]
 
string RefKey [get, set]
 
Linphone.SecurityLevel SecurityLevel [get]
 
bool Starred [get, set]
 
bool SubscribesEnabled [get, set]
 
Linphone.SubscriptionState SubscriptionState [get]
 
Linphone.Vcard Vcard [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 is used to store a SIP address.

Linphone.Friend is mainly used to implement an adressbook feature, and are used as data for the Linphone.MagicSearch object. If your proxy supports it, you can also use it to subscribe to presence information. The objects are stored in a Linphone.FriendList which are in turn stored inside the Linphone.Core. They can be stored inside a database if the path to it is configured, otherwise they will be lost after the Linphone.Core is destroyed. Thanks to the vCard plugin, you can also store more information like phone numbers, organization, etc...

Member Function Documentation

void Linphone.Friend.AddAddress ( Linphone.Address  address)
inline

Adds an address in this friend.

Parameters
addressLinphone.Address object
void Linphone.Friend.AddPhoneNumber ( string  phoneNumber)
inline

Adds a phone number in this friend.

Parameters
phoneNumbernumber to add
void Linphone.Friend.AddPhoneNumberWithLabel ( Linphone.FriendPhoneNumber  phoneNumber)
inline

Adds a Linphone.FriendPhoneNumber to this friend.

Parameters
phoneNumberthe Linphone.FriendPhoneNumber to add
bool Linphone.Friend.CreateVcard ( string  name)
inline

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
nameThe 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
void Linphone.Friend.Done ( )
inline

Commits modification made to the friend configuration.

string Linphone.Friend.DumpVcard ( )
inline

Returns the a string matching the vCard inside the friend, if any.

Returns
the vCard as a string or null.
void Linphone.Friend.Edit ( )
inline

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.Address or Linphone.Friend.IncSubscribePolicy). Once the modifications are done, then the application must call Linphone.Friend.Done() to commit the changes.

float Linphone.Friend.GetCapabilityVersion ( Linphone.FriendCapability  capability)
inline

Returns the version of a friend's capbility.

Parameters
capabilityLinphone.FriendCapability object
Returns
the version of a friend's capbility.
IEnumerable<Linphone.FriendDevice> Linphone.Friend.GetDevicesForAddress ( Linphone.Address  address)
inline

Returns a list of Linphone.FriendDevice for this friend and a specific address.

Parameters
addressLinphone.Address object
Returns
A list of Linphone.FriendDevice. A list of Linphone.FriendDevice objects.
Linphone.PresenceModel Linphone.Friend.GetPresenceModelForUriOrTel ( string  uriOrTel)
inline

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

Parameters
uriOrTelThe SIP URI or phone number for which to get the presence model
Returns
A Linphone.PresenceModel object, or null if the friend do not have presence information for this SIP URI or phone number.
Linphone.SecurityLevel Linphone.Friend.GetSecurityLevelForAddress ( Linphone.Address  address)
inline

Returns the security level of a friend for a given address which is the lowest among all devices we know for that address.

Parameters
addressLinphone.Address object
Returns
A Linphone.SecurityLevel, which is the lowest among all known devices for that address.
bool Linphone.Friend.HasCapability ( Linphone.FriendCapability  capability)
inline

Returns whether or not a friend has a capbility.

Parameters
capabilityLinphone.FriendCapability object
Returns
whether or not a friend has a capbility
bool Linphone.Friend.HasCapabilityWithVersion ( Linphone.FriendCapability  capability,
float  version 
)
inline

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

Parameters
capabilityLinphone.FriendCapability object
versionthe version to test
Returns
whether or not a friend has a capbility with a given version or -1.0 if friend has not capability.
bool Linphone.Friend.HasCapabilityWithVersionOrMore ( Linphone.FriendCapability  capability,
float  version 
)
inline

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

Parameters
capabilityLinphone.FriendCapability object
versionthe version to test
Returns
whether or not a friend has a capbility with a given version or more.
bool Linphone.Friend.HasPhoneNumber ( string  phoneNumber)
inline

Returns whether a friend contains the given phone number.

Parameters
phoneNumberthe phone number to search for
Returns
true if found, false otherwise
bool Linphone.Friend.InList ( )
inline

Check that the given friend is in a friend list.

Returns
true if the friend is in a friend list, false otherwise.
void Linphone.Friend.Remove ( )
inline

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

void Linphone.Friend.RemoveAddress ( Linphone.Address  address)
inline

Removes an address in this friend.

Parameters
addressLinphone.Address object
void Linphone.Friend.RemovePhoneNumber ( string  phoneNumber)
inline

Removes a phone number in this friend.

Parameters
phoneNumbernumber to remove
void Linphone.Friend.RemovePhoneNumberWithLabel ( Linphone.FriendPhoneNumber  phoneNumber)
inline

Removes a Linphone.FriendPhoneNumber from this friend.

Parameters
phoneNumberthe Linphone.FriendPhoneNumber to remove
void Linphone.Friend.Save ( Linphone.Core  core)
inline

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

Parameters
corethe linphone core
void Linphone.Friend.SetPresenceModelForUriOrTel ( string  uriOrTel,
Linphone.PresenceModel  presence 
)
inline

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

Parameters
uriOrTelThe SIP URI or phone number for which to set the presence model
presenceThe Linphone.PresenceModel object to set

Property Documentation

Linphone.Address Linphone.Friend.Address
getset

Get address of this friend.

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

Returns
the Linphone.Address.
IEnumerable<Linphone.Address> Linphone.Friend.Addresses
get

Returns a list of Linphone.Address for this friend.

Returns
A list of Linphone.Address. A list of Linphone.Address objects.
int Linphone.Friend.Capabilities
get

Returns the capabilities associated to this friend.

Returns
an int representing the capabilities of the friend
Linphone.ConsolidatedPresence Linphone.Friend.ConsolidatedPresence
get

Get the consolidated presence of a friend.

It will return the "most open" presence found if more than one presence model are found.

Returns
The Linphone.ConsolidatedPresence of the friend
Linphone.Core Linphone.Friend.Core
get

Returns the Linphone.Core object managing this friend, if any.

Returns
the Linphone.Core object associated.
IEnumerable<Linphone.FriendDevice> Linphone.Friend.Devices
get

Returns a list of Linphone.FriendDevice for this friend, for all known addresses.

Returns
A list of Linphone.FriendDevice. A list of Linphone.FriendDevice objects.
string Linphone.Friend.FirstName
getset

Gets the first name for this friend if vCard exists.

Returns
The first name of this friend.
Linphone.FriendList Linphone.Friend.FriendList
get

Check that the given friend is in a friend list.

Returns
The Linphone.FriendList the friend is in if any, null otherwise.
Linphone.SubscribePolicy Linphone.Friend.IncSubscribePolicy
getset

get current subscription policy for this Linphone.Friend

Returns
the Linphone.SubscribePolicy enum
bool Linphone.Friend.IsPresenceReceived
get

Tells whether we already received presence information for a friend.

Returns
true if presence information has been received for the friend, false otherwise.
bool Linphone.Friend.IsReadOnly
get

Gets whether this friend is read only or not.

A friend is read-only if the Linphone.FriendList to which it belongs is read-only.

Returns
true if the friend is attached to an existing Linphone.FriendList which is in read-only mode, false otherwise.
string Linphone.Friend.JobTitle
getset

Gets the contact's job title from it's vCard.

It's a shortcut to Linphone.Friend.Vcard and Linphone.Vcard.JobTitle.

Returns
the job_title set if any & vCard is available, null otherwise.
string Linphone.Friend.LastName
getset

Gets the last name for this friend if vCard exists.

Returns
The last name of this friend.
string Linphone.Friend.Name
getset

Gets the display name for this friend.

Returns
The display name of this friend.
string Linphone.Friend.NativeUri
getset

Gets the contact's native URI.

Returns
the native URI set if any, null otherwise.
string Linphone.Friend.Organization
getset

Gets the contact's organization from it's vCard.

It's a shortcut to Linphone.Friend.Vcard and Linphone.Vcard.Organization.

Returns
the organization set if any & vCard is available, null otherwise.
IEnumerable<string> Linphone.Friend.PhoneNumbers
get

Returns a list of phone numbers for this friend.

Returns
A list of phone numbers as string. A list of char * objects.
IEnumerable<Linphone.FriendPhoneNumber> Linphone.Friend.PhoneNumbersWithLabel
get

Returns a list of Linphone.FriendPhoneNumber for this friend.

Returns
A list of phone numbers as string. A list of Linphone.FriendPhoneNumber objects.
string Linphone.Friend.Photo
getset

Gets the contact's picture URI.

Returns
the picture URI set if any, null otherwise.
Linphone.PresenceModel Linphone.Friend.PresenceModel
getset

Get the presence model of a friend.

If a friend has more than one SIP address and phone number, this method will return the most recent presence model using Linphone.PresenceModel.Timestamp.

Returns
A Linphone.PresenceModel object, or null if the friend do not have presence information (in which case he is considered offline).
string Linphone.Friend.RefKey
getset

Get the reference key of a friend.

Returns
The reference key of the friend.
Linphone.SecurityLevel Linphone.Friend.SecurityLevel
get

Returns the security level of a friend which is the lowest among all devices we know for it.

Returns
A Linphone.SecurityLevel, which is the lowest among all known devices.
bool Linphone.Friend.Starred
getset

Gets if the friend is to be considered as important for the user.

Returns
true if the contact is a user's favorite, false otherwise.
bool Linphone.Friend.SubscribesEnabled
getset

get subscription flag value

Returns
returns true is subscription is activated for this friend
Linphone.SubscriptionState Linphone.Friend.SubscriptionState
get

Get subscription state of a friend.

Returns
the Linphone.SubscriptionState enum
Linphone.Vcard Linphone.Friend.Vcard
getset

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

Returns
the Linphone.Vcard or null.

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