Liblinphone
5.3.0
|
Presence model type holding information about the presence of a person. More...
#include <presence_model.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | PresenceModel (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphonePresenceModel * | cPtr () |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceActivity > | getActivity () const |
Gets the first activity of a presence model (there is usually only one). More... | |
LINPHONECXX_PUBLIC linphone::PresenceBasicStatus | getBasicStatus () const |
Gets the basic status of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | setBasicStatus (linphone::PresenceBasicStatus basicStatus) |
Sets the basic status of a presence model. More... | |
LINPHONECXX_PUBLIC int | getCapabilities () const |
Gets the capabilities of a PresenceModel object. More... | |
LINPHONECXX_PUBLIC linphone::ConsolidatedPresence | getConsolidatedPresence () const |
Get the consolidated presence from a presence model. More... | |
LINPHONECXX_PUBLIC std::string | getContact () const |
Gets the contact of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | setContact (const std::string &contact) |
Sets the contact of a presence model. More... | |
LINPHONECXX_PUBLIC bool | isOnline () const |
Tells whether a presence model is considered online. More... | |
LINPHONECXX_PUBLIC time_t | getLatestActivityTimestamp () const |
Gets the latest activity timestamp of a presence model. More... | |
LINPHONECXX_PUBLIC unsigned int | getNbActivities () const |
Gets the number of activities included in the presence model. More... | |
LINPHONECXX_PUBLIC unsigned int | getNbPersons () const |
Gets the number of persons included in the presence model. More... | |
LINPHONECXX_PUBLIC unsigned int | getNbServices () const |
Gets the number of services included in the presence model. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getPresentity () const |
Gets the presentity of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | setPresentity (const std::shared_ptr< const linphone::Address > &presentity) |
Sets the presentity of a presence model. More... | |
LINPHONECXX_PUBLIC time_t | getTimestamp () const |
Gets the timestamp of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | addActivity (const std::shared_ptr< linphone::PresenceActivity > &activity) |
Adds an activity to a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | addNote (const std::string ¬eContent, const std::string &lang) |
Adds a note to a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | addPerson (const std::shared_ptr< linphone::PresencePerson > &person) |
Adds a person to a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | addService (const std::shared_ptr< linphone::PresenceService > &service) |
Adds a service to a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | clearActivities () |
Clears the activities of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | clearNotes () |
Clears all the notes of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | clearPersons () |
Clears the persons of a presence model. More... | |
LINPHONECXX_PUBLIC linphone::Status | clearServices () |
Clears the services of a presence model. More... | |
LINPHONECXX_PUBLIC float | getCapabilityVersion (linphone::Friend::Capability capability) const |
Returns the version of the capability of a PresenceModel. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceNote > | getNote (const std::string &lang) const |
Gets the first note of a presence model (there is usually only one). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceActivity > | getNthActivity (unsigned int index) const |
Gets the nth activity of a presence model. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresencePerson > | getNthPerson (unsigned int index) const |
Gets the nth person of a presence model. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceService > | getNthService (unsigned int index) const |
Gets the nth service of a presence model. More... | |
LINPHONECXX_PUBLIC bool | hasCapability (linphone::Friend::Capability capability) const |
Returns whether or not the PresenceModel object has a given capability. More... | |
LINPHONECXX_PUBLIC bool | hasCapabilityWithVersion (linphone::Friend::Capability capability, float version) const |
Returns whether or not the PresenceModel object has a given capability with a certain version. More... | |
LINPHONECXX_PUBLIC bool | hasCapabilityWithVersionOrMore (linphone::Friend::Capability capability, float version) const |
Returns whether or not the PresenceModel object has a given capability with a certain version or more. More... | |
LINPHONECXX_PUBLIC linphone::Status | setActivity (linphone::PresenceActivity::Type activity, const std::string &description) |
Sets the activity of a presence model (limits to only one activity). More... | |
Static Public Member Functions | |
static LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceModel > | newWithActivity (linphone::PresenceActivity::Type activity, const std::string &description) |
Creates a presence model specifying an activity. More... | |
static LINPHONECXX_PUBLIC std::shared_ptr< linphone::PresenceModel > | newWithActivityAndNote (linphone::PresenceActivity::Type activity, const std::string &description, const std::string ¬e, const std::string &lang) |
Creates a presence model specifying an activity and adding a note. More... | |
Presence model type holding information about the presence of a person.
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::addActivity | ( | const std::shared_ptr< linphone::PresenceActivity > & | activity | ) |
Adds an activity to a presence model.
activity | The PresenceActivity object to add to the model. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::addNote | ( | const std::string & | noteContent, |
const std::string & | lang | ||
) |
Adds a note to a presence model.
noteContent | The note to be added to the presence model. |
lang | The language of the note to be added. Can be nullptr if no language is to be specified for the note. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::addPerson | ( | const std::shared_ptr< linphone::PresencePerson > & | person | ) |
Adds a person to a presence model.
person | The PresencePerson object to add to the model. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::addService | ( | const std::shared_ptr< linphone::PresenceService > & | service | ) |
Adds a service to a presence model.
service | The PresenceService object to add to the model. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::clearActivities | ( | ) |
Clears the activities of a presence model.
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::clearNotes | ( | ) |
Clears all the notes of a presence model.
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::clearPersons | ( | ) |
Clears the persons of a presence model.
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::clearServices | ( | ) |
Clears the services of a presence model.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PresenceActivity> linphone::PresenceModel::getActivity | ( | ) | const |
Gets the first activity of a presence model (there is usually only one).
LINPHONECXX_PUBLIC linphone::PresenceBasicStatus linphone::PresenceModel::getBasicStatus | ( | ) | const |
Gets the basic status of a presence model.
LINPHONECXX_PUBLIC int linphone::PresenceModel::getCapabilities | ( | ) | const |
Gets the capabilities of a PresenceModel object.
LINPHONECXX_PUBLIC float linphone::PresenceModel::getCapabilityVersion | ( | linphone::Friend::Capability | capability | ) | const |
Returns the version of the capability of a PresenceModel.
capability | The Friend::Capability to test. |
LINPHONECXX_PUBLIC linphone::ConsolidatedPresence linphone::PresenceModel::getConsolidatedPresence | ( | ) | const |
Get the consolidated presence from a presence model.
LINPHONECXX_PUBLIC std::string linphone::PresenceModel::getContact | ( | ) | const |
Gets the contact of a presence model.
LINPHONECXX_PUBLIC time_t linphone::PresenceModel::getLatestActivityTimestamp | ( | ) | const |
Gets the latest activity timestamp of a presence model.
LINPHONECXX_PUBLIC unsigned int linphone::PresenceModel::getNbActivities | ( | ) | const |
Gets the number of activities included in the presence model.
LINPHONECXX_PUBLIC unsigned int linphone::PresenceModel::getNbPersons | ( | ) | const |
Gets the number of persons included in the presence model.
LINPHONECXX_PUBLIC unsigned int linphone::PresenceModel::getNbServices | ( | ) | const |
Gets the number of services included in the presence model.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PresenceNote> linphone::PresenceModel::getNote | ( | const std::string & | lang | ) | const |
Gets the first note of a presence model (there is usually only one).
lang | The language of the note to get. Can be nullptr to get a note that has no language specified or to get the first note whatever language it is written into. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PresenceActivity> linphone::PresenceModel::getNthActivity | ( | unsigned int | index | ) | const |
Gets the nth activity of a presence model.
index | The index of the activity to get (the first activity having the index 0). |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PresencePerson> linphone::PresenceModel::getNthPerson | ( | unsigned int | index | ) | const |
Gets the nth person of a presence model.
index | The index of the person to get (the first person having the index 0). |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PresenceService> linphone::PresenceModel::getNthService | ( | unsigned int | index | ) | const |
Gets the nth service of a presence model.
index | The index of the service to get (the first service having the index 0). |
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::PresenceModel::getPresentity | ( | ) | const |
Gets the presentity of a presence model.
LINPHONECXX_PUBLIC time_t linphone::PresenceModel::getTimestamp | ( | ) | const |
Gets the timestamp of a presence model.
LINPHONECXX_PUBLIC bool linphone::PresenceModel::hasCapability | ( | linphone::Friend::Capability | capability | ) | const |
Returns whether or not the PresenceModel object has a given capability.
capability | The capability to test. |
LINPHONECXX_PUBLIC bool linphone::PresenceModel::hasCapabilityWithVersion | ( | linphone::Friend::Capability | capability, |
float | version | ||
) | const |
Returns whether or not the PresenceModel object has a given capability with a certain version.
capability | The Friend::Capability to test. |
version | The wanted version to test. |
LINPHONECXX_PUBLIC bool linphone::PresenceModel::hasCapabilityWithVersionOrMore | ( | linphone::Friend::Capability | capability, |
float | version | ||
) | const |
Returns whether or not the PresenceModel object has a given capability with a certain version or more.
capability | The Friend::Capability to test. |
version | The wanted version to test. |
LINPHONECXX_PUBLIC bool linphone::PresenceModel::isOnline | ( | ) | const |
Tells whether a presence model is considered online.
It is any of theses cases:
|
static |
Creates a presence model specifying an activity.
activity | The PresenceActivity::Type to set for the created presence model. |
description | An additional description of the activity (mainly useful for the 'other' activity). Set it to nullptr to not add a description. |
|
static |
Creates a presence model specifying an activity and adding a note.
activity | The PresenceActivity::Type to set for the created presence model. |
description | An additional description of the activity (mainly useful for the 'other' activity). Set it to nullptr 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 nullptr in order to not specify the language of the note. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::setActivity | ( | linphone::PresenceActivity::Type | activity, |
const std::string & | description | ||
) |
Sets the activity of a presence model (limits to only one activity).
activity | The PresenceActivity::Type to set for the model. |
description | An additional description of the activity to set for the model. Can be nullptr if no additional description is to be added. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::setBasicStatus | ( | linphone::PresenceBasicStatus | basicStatus | ) |
Sets the basic status of a presence model.
basicStatus | The PresenceBasicStatus to set for the PresenceModel object. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::setContact | ( | const std::string & | contact | ) |
Sets the contact of a presence model.
contact | The contact string to set. |
LINPHONECXX_PUBLIC linphone::Status linphone::PresenceModel::setPresentity | ( | const std::shared_ptr< const linphone::Address > & | presentity | ) |
Sets the presentity of a presence model.
presentity | The presentity address to set (presentity is copied). |