meanwhile 1.1.0
mw_st_list.h
Go to the documentation of this file.
1
2/*
3 Meanwhile - Unofficial Lotus Sametime Community Client Library
4 Copyright (C) 2004 Christopher (siege) O'Brien
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public
17 License along with this library; if not, write to the Free
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19*/
20
21#ifndef _MW_ST_LIST_H
22#define _MW_ST_LIST_H
23
24
32#include <glib.h>
33#include "mw_common.h"
34
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40
41#define ST_LIST_MAJOR 3
42#define ST_LIST_MINOR 1
43#define ST_LIST_MICRO 3
44
45
50};
51
52
57};
58
59
63struct mwSametimeList;
64
65
69struct mwSametimeGroup;
70
71
75struct mwSametimeUser;
76
77
80
81
84
85
90
91
96
97
99struct mwSametimeList *mwSametimeList_load(const char *str);
100
101
104
105
107
108
110
111
113
114
116
117
119
120
122
123
126
127
128struct mwSametimeGroup *
130 const char *name);
131
132
134struct mwSametimeGroup *
136 enum mwSametimeGroupType type,
137 const char *name);
138
139
143
144
146
147
149
150
152 const char *alias);
153
154
156
157
158void mwSametimeGroup_setOpen(struct mwSametimeGroup *g, gboolean open);
159
160
162
163
165
166
169
170
171struct mwSametimeUser *
173 struct mwIdBlock *user);
174
175
177struct mwSametimeUser *
179 enum mwSametimeUserType type,
180 struct mwIdBlock *user);
181
182
185
186
188
189
191
192
194
195
197
198
199void mwSametimeUser_setShortName(struct mwSametimeUser *u, const char *name);
200
201
203
204
205void mwSametimeUser_setAlias(struct mwSametimeUser *u, const char *alias);
206
207
209
210
211
212#ifdef __cplusplus
213}
214#endif
215
216
217#endif /* _MW_ST_LIST_H */
Common data types and functions for handling those types.
const char * mwSametimeGroup_getName(struct mwSametimeGroup *g)
void mwSametimeUser_setShortName(struct mwSametimeUser *u, const char *name)
void mwSametimeList_put(struct mwPutBuffer *b, struct mwSametimeList *l)
Write a sametime list onto a buffer.
enum mwSametimeGroupType mwSametimeGroup_getType(struct mwSametimeGroup *g)
struct mwSametimeGroup * mwSametimeGroup_new(struct mwSametimeList *l, enum mwSametimeGroupType type, const char *name)
Create a new group in a list.
void mwSametimeList_free(struct mwSametimeList *l)
Free the list, all of its groups, and all of the groups' members.
void mwSametimeGroup_free(struct mwSametimeGroup *g)
Remove a group from its list, and free it.
guint mwSametimeList_getMajor(struct mwSametimeList *l)
void mwSametimeUser_free(struct mwSametimeUser *u)
Remove user from its group, and free it.
const char * mwSametimeGroup_getAlias(struct mwSametimeGroup *g)
enum mwSametimeUserType mwSametimeUser_getType(struct mwSametimeUser *u)
struct mwSametimeList * mwSametimeList_load(const char *str)
convert a plain string into a sametime list
GList * mwSametimeList_getGroups(struct mwSametimeList *l)
Get a GList snapshot of the groups in a list.
void mwSametimeGroup_setAlias(struct mwSametimeGroup *g, const char *alias)
guint mwSametimeList_getMicro(struct mwSametimeList *l)
struct mwSametimeGroup * mwSametimeUser_getGroup(struct mwSametimeUser *u)
struct mwSametimeList * mwSametimeGroup_getList(struct mwSametimeGroup *g)
struct mwSametimeGroup * mwSametimeList_findGroup(struct mwSametimeList *l, const char *name)
struct mwSametimeUser * mwSametimeGroup_findUser(struct mwSametimeGroup *g, struct mwIdBlock *user)
void mwSametimeList_setMinor(struct mwSametimeList *l, guint v)
void mwSametimeList_get(struct mwGetBuffer *b, struct mwSametimeList *l)
Load a sametime list from a buffer.
guint mwSametimeList_getMinor(struct mwSametimeList *l)
void mwSametimeList_setMicro(struct mwSametimeList *l, guint v)
void mwSametimeList_setMajor(struct mwSametimeList *l, guint v)
void mwSametimeGroup_setOpen(struct mwSametimeGroup *g, gboolean open)
GList * mwSametimeGroup_getUsers(struct mwSametimeGroup *g)
Get a GList snapshot of the users in a list.
const char * mwSametimeUser_getUser(struct mwSametimeUser *u)
const char * mwSametimeUser_getCommunity(struct mwSametimeUser *u)
const char * mwSametimeUser_getAlias(struct mwSametimeUser *u)
char * mwSametimeList_store(struct mwSametimeList *l)
convert a sametime list into a string
mwSametimeGroupType
Definition: mw_st_list.h:46
@ mwSametimeGroup_NORMAL
a normal group of users
Definition: mw_st_list.h:47
@ mwSametimeGroup_UNKNOWN
error determining group type
Definition: mw_st_list.h:49
@ mwSametimeGroup_DYNAMIC
a server-side group
Definition: mw_st_list.h:48
mwSametimeUserType
Definition: mw_st_list.h:53
@ mwSametimeUser_EXTERNAL
external user
Definition: mw_st_list.h:55
@ mwSametimeUser_NORMAL
user on same community
Definition: mw_st_list.h:54
@ mwSametimeUser_UNKNOWN
error determining user type
Definition: mw_st_list.h:56
void mwSametimeUser_setAlias(struct mwSametimeUser *u, const char *alias)
const char * mwSametimeUser_getShortName(struct mwSametimeUser *u)
gboolean mwSametimeGroup_isOpen(struct mwSametimeGroup *g)
struct mwSametimeList * mwSametimeList_new(void)
Create a new list.
struct mwSametimeUser * mwSametimeUser_new(struct mwSametimeGroup *g, enum mwSametimeUserType type, struct mwIdBlock *user)
Create a user in a group.
buffer to be read from
Definition: mw_common.h:71
Definition: mw_common.h:178
buffer to be written to
Represents a group in a buddy list.
Definition: mw_st_list.h:63
Represents a group-based buddy list.
Represents a user in a group in a buddy list.
Definition: mw_st_list.h:69