Mercurial > pidgin
annotate src/protocols/novell/nmconference.h @ 8718:6ab61697426e
[gaim-migrate @ 9473]
simguy wants this
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 20 Apr 2004 04:04:41 +0000 |
parents | 046dd8ef2920 |
children | 6663ad2386d9 |
rev | line source |
---|---|
8675 | 1 /* |
2 * nmconference.h | |
3 * | |
4 * Copyright © 2004 Unpublished Work of Novell, Inc. All Rights Reserved. | |
5 * | |
6 * THIS WORK IS AN UNPUBLISHED WORK OF NOVELL, INC. NO PART OF THIS WORK MAY BE | |
7 * USED, PRACTICED, PERFORMED, COPIED, DISTRIBUTED, REVISED, MODIFIED, | |
8 * TRANSLATED, ABRIDGED, CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, | |
9 * RECAST, TRANSFORMED OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, | |
10 * INC. ANY USE OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT | |
11 * THE PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY. | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
12 * |
8675 | 13 * AS BETWEEN [GAIM] AND NOVELL, NOVELL GRANTS [GAIM] THE RIGHT TO REPUBLISH |
14 * THIS WORK UNDER THE GPL (GNU GENERAL PUBLIC LICENSE) WITH ALL RIGHTS AND | |
15 * LICENSES THEREUNDER. IF YOU HAVE RECEIVED THIS WORK DIRECTLY OR INDIRECTLY | |
16 * FROM [GAIM] AS PART OF SUCH A REPUBLICATION, YOU HAVE ALL RIGHTS AND LICENSES | |
17 * GRANTED BY [GAIM] UNDER THE GPL. IN CONNECTION WITH SUCH A REPUBLICATION, IF | |
18 * ANYTHING IN THIS NOTICE CONFLICTS WITH THE TERMS OF THE GPL, SUCH TERMS | |
19 * PREVAIL. | |
20 * | |
21 */ | |
22 | |
23 #ifndef __NM_CONFERENCE_H__ | |
24 #define __NM_CONFERENCE_H__ | |
25 | |
26 typedef struct _NMConference NMConference; | |
27 | |
28 #include "nmuserrecord.h" | |
29 | |
30 /* A blank GUID -- represents an uninstatiated conference */ | |
31 #define BLANK_GUID "[00000000-00000000-00000000-0000-0000]" | |
32 | |
33 /* This is how much of the conference GUIDs to compare when testing | |
34 * to see if two conferences are the same. We cannot compare the | |
35 * entire GUID because the last part is the session count. | |
36 */ | |
37 #define CONF_GUID_END 27 | |
38 | |
39 /** | |
40 * Creates an conference object. | |
41 * | |
42 * The conference should be released by calling | |
43 * nm_release_conference | |
44 * | |
45 * @param guid The GUID for the conference. | |
46 * | |
47 * @return The new NMConference | |
48 */ | |
49 NMConference *nm_create_conference(const char *guid); | |
50 | |
51 /** | |
52 * Increments the reference count for the conference. | |
53 * | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
54 * The reference to the conference should be released |
8675 | 55 * by calling nm_release_conference |
56 * | |
57 * @param conference The conference to reference | |
58 */ | |
59 void nm_conference_add_ref(NMConference * conference); | |
60 | |
61 /** | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
62 * Releases the resources associated with the conference |
8675 | 63 * if there are no more references to it, otherwise just |
64 * decrements the reference count. | |
65 * | |
66 * @param conf The conference to release | |
67 * | |
68 */ | |
69 void nm_release_conference(NMConference * conf); | |
70 | |
71 /** | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
72 * Set the GUID for the conference. |
8675 | 73 * |
74 * @param conference The conference | |
75 * @param guid The new conference GUID | |
76 * | |
77 */ | |
78 void nm_conference_set_guid(NMConference * conference, const char *guid); | |
79 | |
80 /** | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
81 * Return the GUID for the conference. |
8675 | 82 * |
83 * @param conference The conference | |
84 * | |
85 * @return The GUID for the conference | |
86 */ | |
87 const char *nm_conference_get_guid(NMConference * conference); | |
88 | |
89 /** | |
90 * Add a participant to the conference. | |
91 * | |
92 * @param conference The conference | |
93 * @param user_record The user record to add as a participant | |
94 * | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
95 * @return |
8675 | 96 */ |
97 void nm_conference_add_participant(NMConference * conference, | |
98 NMUserRecord * user_record); | |
99 | |
100 /** | |
101 * Remove a participant to the conference. | |
102 * | |
103 * @param conference The conference | |
104 * @param dn The dn of the participant to remove | |
105 * | |
106 */ | |
107 void nm_conference_remove_participant(NMConference * conference, const char *dn); | |
108 | |
109 /** | |
110 * Return the total number of participants in the conference. | |
111 * | |
112 * @param conference The conference | |
113 * | |
114 * @return The number of participants for the conference | |
115 * | |
116 */ | |
117 int nm_conference_get_participant_count(NMConference * conference); | |
118 | |
119 /** | |
120 * Return a participant given an index. | |
121 * | |
122 * @param conference The conference | |
123 * @param index The index of the participant to get | |
124 * | |
125 * @return The participant or NULL if the index is out of range. | |
126 * | |
127 */ | |
128 NMUserRecord *nm_conference_get_participant(NMConference * conference, int index); | |
129 | |
130 /** | |
131 * Check to see if the conference has been instantiated | |
132 * | |
133 * @param conference The conference | |
134 * | |
8684
046dd8ef2920
[gaim-migrate @ 9437]
Christian Hammond <chipx86@chipx86.com>
parents:
8675
diff
changeset
|
135 * @return TRUE if the conference has been instantiated, |
8675 | 136 * FALSE otherwise. |
137 * | |
138 */ | |
139 gboolean nm_conference_is_instantiated(NMConference * conf); | |
140 | |
141 /** | |
142 * Set the flags for the conference. | |
143 * | |
144 * @param conference The conference | |
145 * @param flags The conference flags. | |
146 * | |
147 */ | |
148 void nm_conference_set_flags(NMConference * conference, guint32 flags); | |
149 | |
150 /** | |
151 * Set the user defined data for the conference. | |
152 * | |
153 * @param conference The conference | |
154 * @param data User defined data | |
155 * | |
156 */ | |
157 void nm_conference_set_data(NMConference * conference, gpointer data); | |
158 | |
159 /** | |
160 * Get the user defined data for the conference. | |
161 * | |
162 * @param conference The conference | |
163 * | |
164 * @return The data if it has been set, NULL otherwise. | |
165 * | |
166 */ | |
167 gpointer nm_conference_get_data(NMConference * conference); | |
168 | |
169 #endif |