1 /*
2 PresencePerson.java
3 Copyright (C) 2010-2013  Belledonne Communications, Grenoble, France
4 
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 */
19 
20 package org.linphone.core;
21 
22 public interface PresencePerson {
23 
24 	/**
25 	 * Gets the id of a presence person.
26 	 * @return A string containing the id.
27 	 */
getId()28 	String getId();
29 
30 	/**
31 	 * Sets the id of a presence person.
32 	 * @param id The id string to set. Can be null to generate it automatically.
33 	 * @return 0 if successful, a value < 0 in case of error.
34 	 */
setId(String id)35 	int setId(String id);
36 
37 	/**
38 	 * Gets the number of activities included in the presence person.
39 	 * @return The number of activities included in the #PresencePerson object.
40 	 */
getNbActivities()41 	long getNbActivities();
42 
43 	/**
44 	 * Gets the nth activity of a presence person.
45 	 * @param idx The index of the activity to get (the first activity having the index 0).
46 	 * @return A #PresenceActivity object if successful, null otherwise.
47 	 */
getNthActivity(long idx)48 	PresenceActivity getNthActivity(long idx);
49 
50 	/**
51 	 * Adds an activity to a presence person.
52 	 * @param activity The #PresenceActivity object to add to the person.
53 	 * @return 0 if successful, a value < 0 in case of error.
54 	 */
addActivity(PresenceActivity activity)55 	int addActivity(PresenceActivity activity);
56 
57 	/**
58 	 * Clears the activities of a presence person.
59 	 * @return 0 if successful, a value < 0 in case of error.
60 	 */
clearActivities()61 	int clearActivities();
62 
63 	/**
64 	 * Gets the number of notes included in the presence person.
65 	 * @return The number of notes included in the #PresencePerson object.
66 	 */
getNbNotes()67 	long getNbNotes();
68 
69 	/**
70 	 * Gets the nth note of a presence person.
71 	 * @param idx The index of the note to get (the first note having the index 0).
72 	 * @return A pointer to a #PresenceNote object if successful, null otherwise.
73 	 */
getNthNote(long idx)74 	PresenceNote getNthNote(long idx);
75 
76 	/**
77 	 * Adds a note to a presence person.
78 	 * @param note The #PresenceNote object to add to the person.
79 	 * @return 0 if successful, a value < 0 in case of error.
80 	 */
addNote(PresenceNote note)81 	int addNote(PresenceNote note);
82 
83 	/**
84 	 * Clears the notes of a presence person.
85 	 * @return 0 if successful, a value < 0 in case of error.
86 	 */
clearNotes()87 	int clearNotes();
88 
89 	/**
90 	 * Gets the number of activities notes included in the presence person.
91 	 * @return The number of activities notes included in the #PresencePerson object.
92 	 */
getNbActivitiesNotes()93 	long getNbActivitiesNotes();
94 
95 	/**
96 	 * Gets the nth activities note of a presence person.
97 	 * @param idx The index of the activities note to get (the first note having the index 0).
98 	 * @return A pointer to a #PresenceNote object if successful, null otherwise.
99 	 */
getNthActivitiesNote(long idx)100 	PresenceNote getNthActivitiesNote(long idx);
101 
102 	/**
103 	 * Adds an activities note to a presence person.
104 	 * @param note The #PresenceNote object to add to the person.
105 	 * @return 0 if successful, a value < 0 in case of error.
106 	 */
addActivitiesNote(PresenceNote note)107 	int addActivitiesNote(PresenceNote note);
108 
109 	/**
110 	 * Clears the activities notes of a presence person.
111 	 * @return 0 if successful, a value < 0 in case of error.
112 	 */
clearActivitesNotes()113 	int clearActivitesNotes();
114 
115 	/**
116 	 * Gets the native pointer for this object.
117 	 */
getNativePtr()118 	long getNativePtr();
119 
120 }
121