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.
|
long |
getNativePointer()
Gets the native pointer used by this class to make native method calls.
|
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 index)
Gets the nth activity of a presence model.
|
PresencePerson |
getNthPerson(int index)
Gets the nth person of a presence model.
|
PresenceService |
getNthService(int index)
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 capabilitywith a certain version. |
boolean |
hasCapabilityWithVersionOrMore(FriendCapability capability,
float version)
Returns whether or not the
PresenceModel object has a given capabilitywith 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
|
java.lang.String |
toString() |
@Nullable PresenceActivity getActivity()
PresenceActivity object if successful, null otherwise. PresenceBasicStatus getBasicStatus()
PresenceBasicStatus of the PresenceModel objectint setBasicStatus(PresenceBasicStatus basicStatus)
basicStatus - The PresenceBasicStatus to set for the PresenceModelint getCapabilities()
ConsolidatedPresence getConsolidatedPresence()
ConsolidatedPresence corresponding to the presence model @Nullable java.lang.String getContact()
int setContact(@Nullable
java.lang.String contact)
contact - The contact string to set. boolean isOnline()
int getNbActivities()
PresenceModel object. int getNbPersons()
PresenceModel object. int getNbServices()
PresenceModel object. @Nullable Address getPresentity()
Address, or null if no contact is found. int setPresentity(@Nullable
Address presentity)
presentity - The presentity address to set (presentity is copied). long getTimestamp()
PresenceModel object or -1 on error. int addActivity(@NonNull
PresenceActivity activity)
activity - The PresenceActivity object to add to the model. int addNote(@NonNull
java.lang.String noteContent,
@Nullable
java.lang.String lang)
noteContent - The note to be added to the presence model. lang - The language of the note to be added. Can be null if no language isint addPerson(@NonNull
PresencePerson person)
person - The PresencePerson object to add to the model. int addService(@NonNull
PresenceService service)
service - The PresenceService object to add to the model. int clearActivities()
int clearNotes()
int clearPersons()
int clearServices()
float getCapabilityVersion(FriendCapability capability)
capability - The FriendCapability to test. PresenceModel or -1.0 if the@Nullable PresenceNote getNote(@Nullable java.lang.String lang)
lang - The language of the note to get. Can be null to get a note that hasPresenceNote object if successful, null@Nullable PresenceActivity getNthActivity(int index)
index - The index of the activity to get (the first activity having thePresenceActivity object if successful, null@Nullable PresencePerson getNthPerson(int index)
index - The index of the person to get (the first person having the indexPresencePerson object if successful, null@Nullable PresenceService getNthService(int index)
index - The index of the service to get (the first service having thePresenceService object if successful, nullboolean hasCapability(FriendCapability capability)
capability - The capability to test. PresenceModel object has a given capability. boolean hasCapabilityWithVersion(FriendCapability capability, float version)
capability - The FriendCapability to test. version - The wanted version to test. PresenceModel object has a given capabilityboolean hasCapabilityWithVersionOrMore(FriendCapability capability, float version)
PresenceModel object has a given capabilitycapability - The FriendCapability to test. version - The wanted version to test. PresenceModel object has a given capabilityint setActivity(PresenceActivity.Type activity, @Nullable java.lang.String description)
activity - The PresenceActivity#Type to set for the model. description - An additional description of the activity to set for thesetBasicStatus(org.linphone.core.PresenceBasicStatus), clearActivities()addActivity(org.linphone.core.PresenceActivity). @Nullable PresenceModel newWithActivity(PresenceActivity.Type activity, @Nullable java.lang.String description)
activity - The PresenceActivity#Type to set for the createddescription - An additional description of the activity (mainly useful forPresenceModel, or null if an error occured. newWithActivityAndNote(org.linphone.core.PresenceActivity.Type, java.lang.String, java.lang.String, java.lang.String)@Nullable PresenceModel newWithActivityAndNote(PresenceActivity.Type activity, @Nullable java.lang.String description, @NonNull java.lang.String note, @Nullable java.lang.String lang)
activity - The PresenceActivity#Type to set for the createddescription - An additional description of the activity (mainly useful fornote - An additional note giving additional information about the contactlang - The language the note is written in. It can be set to null in orderPresenceModel, or null if an error occured. newWithActivity(org.linphone.core.PresenceActivity.Type, java.lang.String), newWithActivityAndNote(org.linphone.core.PresenceActivity.Type, java.lang.String, java.lang.String, java.lang.String)void setUserData(java.lang.Object data)
data - the object to storejava.lang.Object getUserData()
long getNativePointer()
java.lang.String toString()
toString in class java.lang.Object