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

Public Member Functions

void AddActivity (Linphone.PresenceActivity activity)
 
void AddNote (string noteContent, string lang)
 
void AddPerson (Linphone.PresencePerson person)
 
void AddService (Linphone.PresenceService service)
 
void ClearActivities ()
 
void ClearNotes ()
 
void ClearPersons ()
 
void ClearServices ()
 
float GetCapabilityVersion (Linphone.FriendCapability capability)
 
Linphone.PresenceNote GetNote (string lang)
 
Linphone.PresenceActivity GetNthActivity (uint index)
 
Linphone.PresencePerson GetNthPerson (uint index)
 
Linphone.PresenceService GetNthService (uint index)
 
bool HasCapability (Linphone.FriendCapability capability)
 
bool HasCapabilityWithVersion (Linphone.FriendCapability capability, float version)
 
bool HasCapabilityWithVersionOrMore (Linphone.FriendCapability capability, float version)
 
void SetActivity (Linphone.PresenceActivityType activity, string description)
 

Static Public Member Functions

static Linphone.PresenceModel NewWithActivity (Linphone.PresenceActivityType activity, string description)
 
static Linphone.PresenceModel NewWithActivityAndNote (Linphone.PresenceActivityType activity, string description, string note, string lang)
 
static Linphone.PresenceModel NewWithConsolidatedPresence (Linphone.ConsolidatedPresence presence)
 

Properties

Linphone.PresenceActivity Activity [get]
 
Linphone.PresenceBasicStatus BasicStatus [get, set]
 
int Capabilities [get]
 
Linphone.ConsolidatedPresence ConsolidatedPresence [get]
 
string Contact [get, set]
 
bool IsOnline [get]
 
long LatestActivityTimestamp [get]
 
uint NbActivities [get]
 
uint NbPersons [get]
 
uint NbServices [get]
 
Linphone.Address Presentity [get, set]
 
long Timestamp [get]
 

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

Presence model type holding information about the presence of a person.

Member Function Documentation

void Linphone.PresenceModel.AddActivity ( Linphone.PresenceActivity  activity)
inline

Adds an activity to a presence model.

Parameters
activityThe Linphone.PresenceActivity object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.AddNote ( string  noteContent,
string  lang 
)
inline

Adds a note to a presence model.

Parameters
noteContentThe note to be added to the presence model.
langThe 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.

void Linphone.PresenceModel.AddPerson ( Linphone.PresencePerson  person)
inline

Adds a person to a presence model.

Parameters
personThe Linphone.PresencePerson object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.AddService ( Linphone.PresenceService  service)
inline

Adds a service to a presence model.

Parameters
serviceThe Linphone.PresenceService object to add to the model.
Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.ClearActivities ( )
inline

Clears the activities of a presence model.

Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.ClearNotes ( )
inline

Clears all the notes of a presence model.

Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.ClearPersons ( )
inline

Clears the persons of a presence model.

Returns
0 if successful, a value < 0 in case of error.
void Linphone.PresenceModel.ClearServices ( )
inline

Clears the services of a presence model.

Returns
0 if successful, a value < 0 in case of error.
float Linphone.PresenceModel.GetCapabilityVersion ( Linphone.FriendCapability  capability)
inline

Returns the version of the capability of a Linphone.PresenceModel.

Parameters
capabilityThe Linphone.FriendCapability to test.
Returns
the version of the capability of a Linphone.PresenceModel or -1.0 if the model has not the capability.
Linphone.PresenceNote Linphone.PresenceModel.GetNote ( string  lang)
inline

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

Parameters
langThe 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 Linphone.PresenceNote object if successful, null otherwise.
Linphone.PresenceActivity Linphone.PresenceModel.GetNthActivity ( uint  index)
inline

Gets the nth activity of a presence model.

Parameters
indexThe index of the activity to get (the first activity having the index 0).
Returns
A pointer to a Linphone.PresenceActivity object if successful, null otherwise.
Linphone.PresencePerson Linphone.PresenceModel.GetNthPerson ( uint  index)
inline

Gets the nth person of a presence model.

Parameters
indexThe index of the person to get (the first person having the index 0).
Returns
A pointer to a Linphone.PresencePerson object if successful, null otherwise.
Linphone.PresenceService Linphone.PresenceModel.GetNthService ( uint  index)
inline

Gets the nth service of a presence model.

Parameters
indexThe index of the service to get (the first service having the index 0).
Returns
A pointer to a Linphone.PresenceService object if successful, null otherwise.
bool Linphone.PresenceModel.HasCapability ( Linphone.FriendCapability  capability)
inline

Returns whether or not the Linphone.PresenceModel object has a given capability.

Parameters
capabilityThe capability to test.
Returns
whether or not the Linphone.PresenceModel object has a given capability.
bool Linphone.PresenceModel.HasCapabilityWithVersion ( Linphone.FriendCapability  capability,
float  version 
)
inline

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

Parameters
capabilityThe Linphone.FriendCapability to test.
versionThe wanted version to test.
Returns
whether or not the Linphone.PresenceModel object has a given capability with a certain version.
bool Linphone.PresenceModel.HasCapabilityWithVersionOrMore ( Linphone.FriendCapability  capability,
float  version 
)
inline

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

Parameters
capabilityThe Linphone.FriendCapability to test.
versionThe wanted version to test.
Returns
whether or not the Linphone.PresenceModel object has a given capability with a certain version or more.
static Linphone.PresenceModel Linphone.PresenceModel.NewWithActivity ( Linphone.PresenceActivityType  activity,
string  description 
)
inlinestatic

Creates a presence model specifying an activity.

Parameters
activityThe Linphone.PresenceActivityType to set for the created presence model.
descriptionAn additional description of the activity (mainly useful for the 'other' activity). Set it to null to not add a description.
Returns
The created Linphone.PresenceModel, or null if an error occured.

See : linphone_presence_model_new, Linphone.PresenceModel.NewWithActivityAndNote(), Linphone.PresenceModel.NewWithConsolidatedPresence()

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

static Linphone.PresenceModel Linphone.PresenceModel.NewWithActivityAndNote ( Linphone.PresenceActivityType  activity,
string  description,
string  note,
string  lang 
)
inlinestatic

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

Parameters
activityThe Linphone.PresenceActivityType to set for the created presence model.
descriptionAn additional description of the activity (mainly useful for the 'other' activity). Set it to null to not add a description.
noteAn additional note giving additional information about the contact presence.
langThe 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 Linphone.PresenceModel, or null if an error occured.

See : linphone_presence_model_new, Linphone.PresenceModel.NewWithActivity(), Linphone.PresenceModel.NewWithConsolidatedPresence()

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

static Linphone.PresenceModel Linphone.PresenceModel.NewWithConsolidatedPresence ( Linphone.ConsolidatedPresence  presence)
inlinestatic

Creates a presence model with a consolidated presence.

Parameters
presenceThe Linphone.ConsolidatedPresence to set for the created presence model.
Returns
The created Linphone.PresenceModel, or null if an error occured.

Warning : This function will set the basic status of the model and it may create an activity depending on the Linphone.ConsolidatedPresence

See : linphone_presence_model_new, Linphone.PresenceModel.NewWithActivity(), Linphone.PresenceModel.NewWithActivityAndNote()

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

void Linphone.PresenceModel.SetActivity ( Linphone.PresenceActivityType  activity,
string  description 
)
inline

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

Parameters
activityThe Linphone.PresenceActivityType to set for the model.
descriptionAn 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.PresenceModel.BasicStatus, Linphone.PresenceModel.ClearActivities() and Linphone.PresenceModel.AddActivity().

Property Documentation

Linphone.PresenceActivity Linphone.PresenceModel.Activity
get

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

Returns
A Linphone.PresenceActivity object if successful, null otherwise.
Linphone.PresenceBasicStatus Linphone.PresenceModel.BasicStatus
getset

Gets the basic status of a presence model.

Returns
The Linphone.PresenceBasicStatus of the Linphone.PresenceModel object given as parameter.
int Linphone.PresenceModel.Capabilities
get

Gets the capabilities of a Linphone.PresenceModel object.

Returns
the capabilities.
Linphone.ConsolidatedPresence Linphone.PresenceModel.ConsolidatedPresence
get

Get the consolidated presence from a presence model.

Returns
The Linphone.ConsolidatedPresence corresponding to the presence model
string Linphone.PresenceModel.Contact
getset

Gets the contact of a presence model.

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().

bool Linphone.PresenceModel.IsOnline
get

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

long Linphone.PresenceModel.LatestActivityTimestamp
get

Gets the latest activity timestamp of a presence model.

Returns
The activity timestamp of the Linphone.PresenceModel object or -1 if there is no activity (such as when status is Online).
uint Linphone.PresenceModel.NbActivities
get

Gets the number of activities included in the presence model.

Returns
The number of activities included in the Linphone.PresenceModel object.
uint Linphone.PresenceModel.NbPersons
get

Gets the number of persons included in the presence model.

Returns
The number of persons included in the Linphone.PresenceModel object.
uint Linphone.PresenceModel.NbServices
get

Gets the number of services included in the presence model.

Returns
The number of services included in the Linphone.PresenceModel object.
Linphone.Address Linphone.PresenceModel.Presentity
getset

Gets the presentity of a presence model.

Returns
A pointer to a const Linphone.Address, or null if no contact is found.
long Linphone.PresenceModel.Timestamp
get

Gets the timestamp of a presence model.

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

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