meanwhile 1.0.2
|
00001 00002 /* 00003 Meanwhile - Unofficial Lotus Sametime Community Client Library 00004 Copyright (C) 2004 Christopher (siege) O'Brien 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public 00017 License along with this library; if not, write to the Free 00018 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 */ 00020 00021 #ifndef _MW_ST_LIST_H 00022 #define _MW_ST_LIST_H 00023 00024 00032 #include <glib.h> 00033 #include <glib/glist.h> 00034 #include "mw_common.h" 00035 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00041 00042 #define ST_LIST_MAJOR 3 00043 #define ST_LIST_MINOR 1 00044 #define ST_LIST_MICRO 3 00045 00046 00047 enum mwSametimeGroupType { 00048 mwSametimeGroup_NORMAL = 1, 00049 mwSametimeGroup_DYNAMIC = 2, 00050 mwSametimeGroup_UNKNOWN = 0, 00051 }; 00052 00053 00054 enum mwSametimeUserType { 00055 mwSametimeUser_NORMAL = 1, 00056 mwSametimeUser_EXTERNAL = 2, 00057 mwSametimeUser_UNKNOWN = 0, 00058 }; 00059 00060 00064 struct mwSametimeList; 00065 00066 00070 struct mwSametimeGroup; 00071 00072 00076 struct mwSametimeUser; 00077 00078 00080 struct mwSametimeList *mwSametimeList_new(); 00081 00082 00084 void mwSametimeList_free(struct mwSametimeList *l); 00085 00086 00090 void mwSametimeList_get(struct mwGetBuffer *b, struct mwSametimeList *l); 00091 00092 00096 void mwSametimeList_put(struct mwPutBuffer *b, struct mwSametimeList *l); 00097 00098 00100 struct mwSametimeList *mwSametimeList_load(const char *str); 00101 00102 00104 char *mwSametimeList_store(struct mwSametimeList *l); 00105 00106 00107 void mwSametimeList_setMajor(struct mwSametimeList *l, guint v); 00108 00109 00110 guint mwSametimeList_getMajor(struct mwSametimeList *l); 00111 00112 00113 void mwSametimeList_setMinor(struct mwSametimeList *l, guint v); 00114 00115 00116 guint mwSametimeList_getMinor(struct mwSametimeList *l); 00117 00118 00119 void mwSametimeList_setMicro(struct mwSametimeList *l, guint v); 00120 00121 00122 guint mwSametimeList_getMicro(struct mwSametimeList *l); 00123 00124 00126 GList *mwSametimeList_getGroups(struct mwSametimeList *l); 00127 00128 00129 struct mwSametimeGroup * 00130 mwSametimeList_findGroup(struct mwSametimeList *l, 00131 const char *name); 00132 00133 00135 struct mwSametimeGroup * 00136 mwSametimeGroup_new(struct mwSametimeList *l, 00137 enum mwSametimeGroupType type, 00138 const char *name); 00139 00140 00143 void mwSametimeGroup_free(struct mwSametimeGroup *g); 00144 00145 00146 enum mwSametimeGroupType mwSametimeGroup_getType(struct mwSametimeGroup *g); 00147 00148 00149 const char *mwSametimeGroup_getName(struct mwSametimeGroup *g); 00150 00151 00152 void mwSametimeGroup_setAlias(struct mwSametimeGroup *g, 00153 const char *alias); 00154 00155 00156 const char *mwSametimeGroup_getAlias(struct mwSametimeGroup *g); 00157 00158 00159 void mwSametimeGroup_setOpen(struct mwSametimeGroup *g, gboolean open); 00160 00161 00162 gboolean mwSametimeGroup_isOpen(struct mwSametimeGroup *g); 00163 00164 00165 struct mwSametimeList *mwSametimeGroup_getList(struct mwSametimeGroup *g); 00166 00167 00169 GList *mwSametimeGroup_getUsers(struct mwSametimeGroup *g); 00170 00171 00172 struct mwSametimeUser * 00173 mwSametimeGroup_findUser(struct mwSametimeGroup *g, 00174 struct mwIdBlock *user); 00175 00176 00178 struct mwSametimeUser * 00179 mwSametimeUser_new(struct mwSametimeGroup *g, 00180 enum mwSametimeUserType type, 00181 struct mwIdBlock *user); 00182 00183 00185 void mwSametimeUser_free(struct mwSametimeUser *u); 00186 00187 00188 struct mwSametimeGroup *mwSametimeUser_getGroup(struct mwSametimeUser *u); 00189 00190 00191 enum mwSametimeUserType mwSametimeUser_getType(struct mwSametimeUser *u); 00192 00193 00194 const char *mwSametimeUser_getUser(struct mwSametimeUser *u); 00195 00196 00197 const char *mwSametimeUser_getCommunity(struct mwSametimeUser *u); 00198 00199 00200 void mwSametimeUser_setShortName(struct mwSametimeUser *u, const char *name); 00201 00202 00203 const char *mwSametimeUser_getShortName(struct mwSametimeUser *u); 00204 00205 00206 void mwSametimeUser_setAlias(struct mwSametimeUser *u, const char *alias); 00207 00208 00209 const char *mwSametimeUser_getAlias(struct mwSametimeUser *u); 00210 00211 00212 00213 #ifdef __cplusplus 00214 } 00215 #endif 00216 00217 00218 #endif /* _MW_ST_LIST_H */