Package org.linphone.core

# Interface PresencePerson

public interface PresencePerson
Presence person holding information about a presence person.

## Method Summary

Modifier and Type
Method
Description
`int`
`addActivitiesNote(PresenceNote note)`
Adds an activities note to a presence person.
`int`
`addActivity(PresenceActivity activity)`
Adds an activity to a presence person.
`int`
`addNote(PresenceNote note)`
Adds a note to a presence person.
`int`
`clearActivities()`
Clears the activities of a presence person.
`int`
`clearActivitiesNotes()`
Clears the activities notes of a presence person.
`int`
`clearNotes()`
Clears the notes of a presence person.
`String`
`getId()`
Gets the id of a presence person.
`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 person.
`int`
`getNbActivitiesNotes()`
Gets the number of activities notes included in the presence person.
`int`
`getNbNotes()`
Gets the number of notes included in the presence person.
`PresenceNote`
`getNthActivitiesNote(int index)`
Gets the nth activities note of a presence person.
`PresenceActivity`
`getNthActivity(int index)`
Gets the nth activity of a presence person.
`PresenceNote`
`getNthNote(int index)`
Gets the nth note of a presence person.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`int`
`setId(String id)`
Sets the id of a presence person.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`String`
`toString()`

## Method Details

### getId

String getId()
Gets the id of a presence person.

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

int setId(String id)
Sets the id of a presence person.

Parameters:
  `id` - The id string to set. Can be null to generate it automatically.
Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### getNbActivities

int getNbActivities()
Gets the number of activities included in the presence person.

Returns:
  The number of activities included in the `PresencePerson` object.

### getNbActivitiesNotes

int getNbActivitiesNotes()
Gets the number of activities notes included in the presence person.

Returns:
  The number of activities notes included in the `PresencePerson`
  object.

### getNbNotes

int getNbNotes()
Gets the number of notes included in the presence person.

Returns:
  The number of notes included in the `PresencePerson` object.

### addActivitiesNote

int addActivitiesNote(PresenceNote note)
Adds an activities note to a presence person.

Parameters:
  `note` - The `PresenceNote` object to add to the person.
Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### addActivity

int addActivity(PresenceActivity activity)
Adds an activity to a presence person.

Parameters:
  `activity` - The `PresenceActivity` object to add to the person.
Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### addNote

int addNote(PresenceNote note)
Adds a note to a presence person.

Parameters:
  `note` - The `PresenceNote` object to add to the person.
Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### clearActivities

int clearActivities()
Clears the activities of a presence person.

Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### clearActivitiesNotes

int clearActivitiesNotes()
Clears the activities notes of a presence person.

Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### clearNotes

int clearNotes()
Clears the notes of a presence person.

Returns:
  0 if successful, a value invalid input: '<' 0 in case of error.

### getNthActivitiesNote

PresenceNote getNthActivitiesNote(int index)
Gets the nth activities note of a presence person.

Parameters:
  `index` - The index of the activities note to get (the first note having the
  index 0).
Returns:
  A pointer to a `PresenceNote` object if successful, null
  otherwise.

### getNthActivity

PresenceActivity getNthActivity(int index)
Gets the nth activity of a presence person.

Parameters:
  `index` - The index of the activity to get (the first activity having the
  index 0).
Returns:
  A pointer to a `PresenceActivity` object if successful, null
  otherwise.

### getNthNote

PresenceNote getNthNote(int index)
Gets the nth note of a presence person.

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

void setUserData(Object data)
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()

Overrides:
  `toString` in class `Object`