Package org.linphone.core
Interface PresenceService
public interface PresenceService
Presence service type holding information about a presence service.
-
Method Summary
Modifier and TypeMethodDescriptionintaddNote(PresenceNote note) Adds a note to a presence service.intClears the notes of a presence service.Gets the basic status of a presence service.Gets the contact of a presence service.getId()Gets the id of a presence service.longGets the native pointer used by this class to make native method calls.intGets the number of notes included in the presence service.getNthNote(int index) Gets the nth note of a presence service.String[]Gets the service descriptions of a presence service.Gets the object stored in this object user's dataintsetBasicStatus(PresenceBasicStatus basicStatus) Sets the basic status of a presence service.intsetContact(String contact) Sets the contact of a presence service.intSets the id of a presence service.intsetServiceDescriptions(String[] descriptions) Sets the service descriptions of a presence service.voidsetUserData(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getBasicStatus
PresenceBasicStatus getBasicStatus()Gets the basic status of a presence service.
- Returns:
- The
PresenceBasicStatusof thePresenceServiceobject
given as parameter.
-
setBasicStatus
Sets the basic status of a presence service.
- Parameters:
basicStatus- ThePresenceBasicStatusto set for thePresenceService
object.- Returns:
- 0 if successful, a value < 0 in case of error.
-
getContact
Gets the contact of a presence service.
- 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().
-
setContact
Sets the contact of a presence service.
- Parameters:
contact- The contact string to set.- Returns:
- 0 if successful, a value < 0 in case of error.
-
getId
Gets the id of a presence service.
- Returns:
- A pointer to a dynamically allocated string containing the id, or null
in case of error.
The returned string is to be freed by calling ms_free().
-
setId
Sets the id of a presence service.
- Parameters:
id- The id string to set. Can be null to generate it automatically.- Returns:
- 0 if successful, a value < 0 in case of error.
-
getNbNotes
int getNbNotes()Gets the number of notes included in the presence service.
- Returns:
- The number of notes included in the
PresenceServiceobject.
-
getServiceDescriptions
Gets the service descriptions of a presence service.
- Returns:
- A containing the services descriptions.
The returned string is to be freed.
-
setServiceDescriptions
Sets the service descriptions of a presence service.
- Parameters:
descriptions- The service descriptions.- Returns:
- 0 if successful, a value < 0 in case of error.
-
addNote
Adds a note to a presence service.
- Parameters:
note- ThePresenceNoteobject to add to the service.- Returns:
- 0 if successful, a value < 0 in case of error.
-
clearNotes
int clearNotes()Clears the notes of a presence service.
- Returns:
- 0 if successful, a value < 0 in case of error.
-
getNthNote
Gets the nth note of a presence service.
- Parameters:
index- The index of the note to get (the first note having the index 0).- Returns:
- A pointer to a
PresenceNoteobject if successful, null
otherwise.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-