Package org.linphone.core
Interface PresenceService
public interface PresenceService
Presence service type holding information about a presence service.
-
Method Summary
Modifier and TypeMethodDescriptionint
addNote
(PresenceNote note) Adds a note to a presence service.int
Clears 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.long
Gets the native pointer used by this class to make native method calls.int
Gets 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 dataint
setBasicStatus
(PresenceBasicStatus basicStatus) Sets the basic status of a presence service.int
setContact
(String contact) Sets the contact of a presence service.int
Sets the id of a presence service.int
setServiceDescriptions
(String[] descriptions) Sets the service descriptions of a presence service.void
setUserData
(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
PresenceBasicStatus
of thePresenceService
object
given as parameter.
-
setBasicStatus
Sets the basic status of a presence service.
- Parameters:
basicStatus
- ThePresenceBasicStatus
to 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
PresenceService
object.
-
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
- ThePresenceNote
object 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
PresenceNote
object 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()
-