public interface PresenceModel
Modifier and Type | Method and Description |
---|---|
int |
addActivity(PresenceActivity activity)
Adds an activity to a presence model.
|
int |
addNote(String note_content,
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.
|
String |
getContact()
Gets the contact of a presence model.
|
long |
getNbActivities()
Gets the number of activities included in the presence model.
|
long |
getNbPersons()
Gets the number of persons included in the presence model.
|
long |
getNbServices()
Gets the number of services included in the presence model.
|
PresenceNote |
getNote(String lang)
Gets the first note of a presence model (there is usually only one).
|
PresenceActivity |
getNthActivity(long idx)
Gets the nth activity of a presence model.
|
PresencePerson |
getNthPerson(long idx)
Gets the nth person of a presence model.
|
PresenceService |
getNthService(long idx)
Gets the nth service of a presence model.
|
long |
getTimestamp()
Gets the timestamp of a presence model.
|
int |
setActivity(PresenceActivityType activity,
String description)
Sets the activity of a presence model (limits to only one activity).
|
int |
setBasicStatus(PresenceBasicStatus basic_status)
Sets the basic status of a presence model.
|
void |
setContact(String contact)
Sets the contact of a presence model.
|
PresenceBasicStatus getBasicStatus()
int setBasicStatus(PresenceBasicStatus basic_status)
basic_status
- The #BasicStatus to set for the #PresenceModel object.long getTimestamp()
String getContact()
void setContact(String contact)
contact
- The contact string to set.PresenceActivity getActivity()
int setActivity(PresenceActivityType activity, String description)
activity
- The #PresenceActivityType to set for the model.description
- An additional description of the activity to set for the model. Can be null if no additional description is to be added.long getNbActivities()
PresenceActivity getNthActivity(long idx)
idx
- The index of the activity to get (the first activity having the index 0).int addActivity(PresenceActivity activity)
activity
- The #PresenceActivity to add to the model.int clearActivities()
PresenceNote getNote(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.int addNote(String note_content, String lang)
note_content
- The note to be added to the presence model.lang
- The language of the note to be added. Can be null if no language is to be specified for the note.int clearNotes()
long getNbServices()
PresenceService getNthService(long idx)
idx
- The index of the service to get (the first service having the index 0).int addService(PresenceService service)
service
- The #PresenceService object to add to the model.int clearServices()
long getNbPersons()
PresencePerson getNthPerson(long idx)
idx
- The index of the person to get (the first person having the index 0).int addPerson(PresencePerson person)
person
- The #PresencePerson object to add to the model.int clearPersons()