comparison src/protocols/novell/nmconference.h @ 8675:9ee2542d1104

[gaim-migrate @ 9428] A GroupWise plugin from Novell. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 17 Apr 2004 13:55:28 +0000
parents
children 046dd8ef2920
comparison
equal deleted inserted replaced
8674:8c7da2e36136 8675:9ee2542d1104
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.
12 *
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 *
54 * The reference to the conference should be released
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 /**
62 * Releases the resources associated with the conference
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 /**
72 * Set the GUID for the conference.
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 /**
81 * Return the GUID for the conference.
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 *
95 * @return
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 *
135 * @return TRUE if the conference has been instantiated,
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