public interface PresenceModel
Modifier and Type | Method and Description |
---|---|
int |
addActivity(PresenceActivity activity)
Adds an activity to a presence model.
|
int |
addNote(java.lang.String noteContent,
java.lang.String lang)
Adds a note to a presence model.
|
int |
addPerson(PresencePerson person)
Adds a person to a presence model.
|
int |
addService(PresenceService service)
Adds a service to a presence model.
|
int |
clearActivities()
Clears the activities of a presence model.
|
int |
clearNotes()
Clears all the notes of a presence model.
|
int |
clearPersons()
Clears the persons of a presence model.
|
int |
clearServices()
Clears the services of a presence model.
|
PresenceActivity |
getActivity()
Gets the first activity of a presence model (there is usually only one).
|
PresenceBasicStatus |
getBasicStatus()
Gets the basic status of a presence model.
|
int |
getCapabilities()
Gets the capabilities of a
PresenceModel object. |
float |
getCapabilityVersion(FriendCapability capability)
Returns the version of the capability of a
PresenceModel . |
ConsolidatedPresence |
getConsolidatedPresence()
Get the consolidated presence from a presence model.
|
java.lang.String |
getContact()
Gets the contact of a presence model.
|
int |
getNbActivities()
Gets the number of activities included in the presence model.
|
int |
getNbPersons()
Gets the number of persons included in the presence model.
|
int |
getNbServices()
Gets the number of services included in the presence model.
|
PresenceNote |
getNote(java.lang.String lang)
Gets the first note of a presence model (there is usually only one).
|
PresenceActivity |
getNthActivity(int idx)
Gets the nth activity of a presence model.
|
PresencePerson |
getNthPerson(int idx)
Gets the nth person of a presence model.
|
PresenceService |
getNthService(int idx)
Gets the nth service of a presence model.
|
Address |
getPresentity()
Gets the presentity of a presence model.
|
long |
getTimestamp()
Gets the timestamp of a presence model.
|
java.lang.Object |
getUserData()
Gets the object stored in this object user's data
|
boolean |
hasCapability(FriendCapability capability)
Returns whether or not the
PresenceModel object has a given capability. |
boolean |
hasCapabilityWithVersion(FriendCapability capability,
float version)
Returns whether or not the
PresenceModel object has a given capability
with a certain version. |
boolean |
hasCapabilityWithVersionOrMore(FriendCapability capability,
float version)
Returns whether or not the
PresenceModel object has a given capability
with a certain version or more. |
boolean |
isOnline()
Tells whether a presence model is considered online.
|
PresenceModel |
newWithActivity(PresenceActivity.Type activity,
java.lang.String description)
Creates a presence model specifying an activity.
|
PresenceModel |
newWithActivityAndNote(PresenceActivity.Type activity,
java.lang.String description,
java.lang.String note,
java.lang.String lang)
Creates a presence model specifying an activity and adding a note.
|
int |
setActivity(PresenceActivity.Type activity,
java.lang.String description)
Sets the activity of a presence model (limits to only one activity).
|
int |
setBasicStatus(PresenceBasicStatus basicStatus)
Sets the basic status of a presence model.
|
int |
setContact(java.lang.String contact)
Sets the contact of a presence model.
|
int |
setPresentity(Address presentity)
Sets the presentity of a presence model.
|
void |
setUserData(java.lang.Object data)
Sets the object to store in this object user's data
|
PresenceActivity getActivity()
PresenceActivity
object if successful, null otherwise.PresenceBasicStatus getBasicStatus()
PresenceModel
object
given as parameter.int setBasicStatus(PresenceBasicStatus basicStatus)
basicStatus
- The LinphonePresenceBasicStatus to set for the PresenceModel
object.int getCapabilities()
PresenceModel
object.ConsolidatedPresence getConsolidatedPresence()
java.lang.String getContact()
int setContact(java.lang.String contact)
contact
- The contact string to set.boolean isOnline()
int getNbActivities()
PresenceModel
object.int getNbPersons()
PresenceModel
object.int getNbServices()
PresenceModel
object.Address getPresentity()
int setPresentity(Address presentity)
presentity
- The presentity address to set (presentity is copied).long getTimestamp()
PresenceModel
object or -1 on error.int addActivity(PresenceActivity activity)
activity
- The PresenceActivity
object to add to the model.int addNote(java.lang.String noteContent, java.lang.String lang)
lang
- The language of the note to be added. Can be null if no language is
to be specified for the note.int addPerson(PresencePerson person)
person
- The PresencePerson
object to add to the model.int addService(PresenceService service)
service
- The PresenceService
object to add to the model.int clearActivities()
int clearNotes()
int clearPersons()
int clearServices()
float getCapabilityVersion(FriendCapability capability)
PresenceModel
.capability
- The capability to test.PresenceModel
or -1.0 if the
model has not the capability.PresenceNote getNote(java.lang.String lang)
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.PresenceNote
object if successful, null
otherwise.PresenceActivity getNthActivity(int idx)
idx
- The index of the activity to get (the first activity having the
index 0).PresenceActivity
object if successful, null
otherwise.PresencePerson getNthPerson(int idx)
idx
- The index of the person to get (the first person having the index
0).PresencePerson
object if successful, null
otherwise.PresenceService getNthService(int idx)
idx
- The index of the service to get (the first service having the index
0).PresenceService
object if successful, null
otherwise.boolean hasCapability(FriendCapability capability)
PresenceModel
object has a given capability.capability
- The capability to test.PresenceModel
object has a given capability.boolean hasCapabilityWithVersion(FriendCapability capability, float version)
PresenceModel
object has a given capability
with a certain version.version
- The wanted version to test.PresenceModel
object has a given capability
with a certain version.boolean hasCapabilityWithVersionOrMore(FriendCapability capability, float version)
PresenceModel
object has a given capability
with a certain version or more.version
- The wanted version to test.PresenceModel
object has a given capability
with a certain version or more.int setActivity(PresenceActivity.Type activity, java.lang.String description)
description
- An additional description of the activity to set for the
model. Can be null if no additional description is to be added.setBasicStatus(org.linphone.core.PresenceBasicStatus)
, clearActivities()
and addActivity(org.linphone.core.PresenceActivity)
.PresenceModel newWithActivity(PresenceActivity.Type activity, java.lang.String description)
description
- An additional description of the activity (mainly useful for
the 'other' activity). Set it to null to not add a description.PresenceModel newWithActivityAndNote(PresenceActivity.Type activity, java.lang.String description, java.lang.String note, java.lang.String lang)
lang
- The language the note is written in. It can be set to null in order
to not specify the language of the note.void setUserData(java.lang.Object data)
data
- the object to storejava.lang.Object getUserData()