Mercurial > pidgin
comparison libpurple/protocols/novell/nmconference.h @ 15373:5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 20 Jan 2007 02:32:10 +0000 |
parents | |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
15372:f79e0f4df793 | 15373:5fe8042783c1 |
---|---|
1 /* | |
2 * nmconference.h | |
3 * | |
4 * Copyright (c) 2004 Novell, Inc. All Rights Reserved. | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; version 2 of the License. | |
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 * | |
19 */ | |
20 | |
21 #ifndef __NM_CONFERENCE_H__ | |
22 #define __NM_CONFERENCE_H__ | |
23 | |
24 typedef struct _NMConference NMConference; | |
25 | |
26 #include "nmuserrecord.h" | |
27 | |
28 /* A blank GUID -- represents an uninstatiated conference */ | |
29 #define BLANK_GUID "[00000000-00000000-00000000-0000-0000]" | |
30 | |
31 /* This is how much of the conference GUIDs to compare when testing | |
32 * to see if two conferences are the same. We cannot compare the | |
33 * entire GUID because the last part is the session count. | |
34 */ | |
35 #define CONF_GUID_END 27 | |
36 | |
37 /** | |
38 * Creates an conference object. | |
39 * | |
40 * The conference should be released by calling | |
41 * nm_release_conference | |
42 * | |
43 * @param guid The GUID for the conference. | |
44 * | |
45 * @return The new NMConference | |
46 */ | |
47 NMConference *nm_create_conference(const char *guid); | |
48 | |
49 /** | |
50 * Increments the reference count for the conference. | |
51 * | |
52 * The reference to the conference should be released | |
53 * by calling nm_release_conference | |
54 * | |
55 * @param conference The conference to reference | |
56 */ | |
57 void nm_conference_add_ref(NMConference * conference); | |
58 | |
59 /** | |
60 * Releases the resources associated with the conference | |
61 * if there are no more references to it, otherwise just | |
62 * decrements the reference count. | |
63 * | |
64 * @param conf The conference to release | |
65 * | |
66 */ | |
67 void nm_release_conference(NMConference * conf); | |
68 | |
69 /** | |
70 * Set the GUID for the conference. | |
71 * | |
72 * @param conference The conference | |
73 * @param guid The new conference GUID | |
74 * | |
75 */ | |
76 void nm_conference_set_guid(NMConference * conference, const char *guid); | |
77 | |
78 /** | |
79 * Return the GUID for the conference. | |
80 * | |
81 * @param conference The conference | |
82 * | |
83 * @return The GUID for the conference | |
84 */ | |
85 const char *nm_conference_get_guid(NMConference * conference); | |
86 | |
87 /** | |
88 * Add a participant to the conference. | |
89 * | |
90 * @param conference The conference | |
91 * @param user_record The user record to add as a participant | |
92 * | |
93 * @return | |
94 */ | |
95 void nm_conference_add_participant(NMConference * conference, | |
96 NMUserRecord * user_record); | |
97 | |
98 /** | |
99 * Remove a participant to the conference. | |
100 * | |
101 * @param conference The conference | |
102 * @param dn The dn of the participant to remove | |
103 * | |
104 */ | |
105 void nm_conference_remove_participant(NMConference * conference, const char *dn); | |
106 | |
107 /** | |
108 * Return the total number of participants in the conference. | |
109 * | |
110 * @param conference The conference | |
111 * | |
112 * @return The number of participants for the conference | |
113 * | |
114 */ | |
115 int nm_conference_get_participant_count(NMConference * conference); | |
116 | |
117 /** | |
118 * Return a participant given an index. | |
119 * | |
120 * @param conference The conference | |
121 * @param index The index of the participant to get | |
122 * | |
123 * @return The participant or NULL if the index is out of range. | |
124 * | |
125 */ | |
126 NMUserRecord *nm_conference_get_participant(NMConference * conference, int index); | |
127 | |
128 /** | |
129 * Check to see if the conference has been instantiated | |
130 * | |
131 * @param conference The conference | |
132 * | |
133 * @return TRUE if the conference has been instantiated, | |
134 * FALSE otherwise. | |
135 * | |
136 */ | |
137 gboolean nm_conference_is_instantiated(NMConference * conf); | |
138 | |
139 /** | |
140 * Set the flags for the conference. | |
141 * | |
142 * @param conference The conference | |
143 * @param flags The conference flags. | |
144 * | |
145 */ | |
146 void nm_conference_set_flags(NMConference * conference, guint32 flags); | |
147 | |
148 /** | |
149 * Set the user defined data for the conference. | |
150 * | |
151 * @param conference The conference | |
152 * @param data User defined data | |
153 * | |
154 */ | |
155 void nm_conference_set_data(NMConference * conference, gpointer data); | |
156 | |
157 /** | |
158 * Get the user defined data for the conference. | |
159 * | |
160 * @param conference The conference | |
161 * | |
162 * @return The data if it has been set, NULL otherwise. | |
163 * | |
164 */ | |
165 gpointer nm_conference_get_data(NMConference * conference); | |
166 | |
167 #endif |