Interface PresencePerson


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

  • Method Details

    • getId

      @Nullable 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(@Nullable 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 < 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(@NonNull 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 < 0 in case of error.
    • addActivity

      int addActivity(@NonNull 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 < 0 in case of error.
    • addNote

      int addNote(@NonNull 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 < 0 in case of error.
    • clearActivities

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

      Returns:
      0 if successful, a value < 0 in case of error.
    • clearActivitiesNotes

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

      Returns:
      0 if successful, a value < 0 in case of error.
    • clearNotes

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

      Returns:
      0 if successful, a value < 0 in case of error.
    • getNthActivitiesNote

      @Nullable 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

      @Nullable 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

      @Nullable 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