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 "mw_common.h" 00034 00035 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00040 00041 #define ST_LIST_MAJOR 3 00042 #define ST_LIST_MINOR 1 00043 #define ST_LIST_MICRO 3 00044 00045 00046 enum mwSametimeGroupType { 00047 mwSametimeGroup_NORMAL = 1, 00048 mwSametimeGroup_DYNAMIC = 2, 00049 mwSametimeGroup_UNKNOWN = 0, 00050 }; 00051 00052 00053 enum mwSametimeUserType { 00054 mwSametimeUser_NORMAL = 1, 00055 mwSametimeUser_EXTERNAL = 2, 00056 mwSametimeUser_UNKNOWN = 0, 00057 }; 00058 00059 00063 struct mwSametimeList; 00064 00065 00069 struct mwSametimeGroup; 00070 00071 00075 struct mwSametimeUser; 00076 00077 00079 struct mwSametimeList *mwSametimeList_new(); 00080 00081 00083 void mwSametimeList_free(struct mwSametimeList *l); 00084 00085 00089 void mwSametimeList_get(struct mwGetBuffer *b, struct mwSametimeList *l); 00090 00091 00095 void mwSametimeList_put(struct mwPutBuffer *b, struct mwSametimeList *l); 00096 00097 00099 struct mwSametimeList *mwSametimeList_load(const char *str); 00100 00101 00103 char *mwSametimeList_store(struct mwSametimeList *l); 00104 00105 00106 void mwSametimeList_setMajor(struct mwSametimeList *l, guint v); 00107 00108 00109 guint mwSametimeList_getMajor(struct mwSametimeList *l); 00110 00111 00112 void mwSametimeList_setMinor(struct mwSametimeList *l, guint v); 00113 00114 00115 guint mwSametimeList_getMinor(struct mwSametimeList *l); 00116 00117 00118 void mwSametimeList_setMicro(struct mwSametimeList *l, guint v); 00119 00120 00121 guint mwSametimeList_getMicro(struct mwSametimeList *l); 00122 00123 00125 GList *mwSametimeList_getGroups(struct mwSametimeList *l); 00126 00127 00128 struct mwSametimeGroup * 00129 mwSametimeList_findGroup(struct mwSametimeList *l, 00130 const char *name); 00131 00132 00134 struct mwSametimeGroup * 00135 mwSametimeGroup_new(struct mwSametimeList *l, 00136 enum mwSametimeGroupType type, 00137 const char *name); 00138 00139 00142 void mwSametimeGroup_free(struct mwSametimeGroup *g); 00143 00144 00145 enum mwSametimeGroupType mwSametimeGroup_getType(struct mwSametimeGroup *g); 00146 00147 00148 const char *mwSametimeGroup_getName(struct mwSametimeGroup *g); 00149 00150 00151 void mwSametimeGroup_setAlias(struct mwSametimeGroup *g, 00152 const char *alias); 00153 00154 00155 const char *mwSametimeGroup_getAlias(struct mwSametimeGroup *g); 00156 00157 00158 void mwSametimeGroup_setOpen(struct mwSametimeGroup *g, gboolean open); 00159 00160 00161 gboolean mwSametimeGroup_isOpen(struct mwSametimeGroup *g); 00162 00163 00164 struct mwSametimeList *mwSametimeGroup_getList(struct mwSametimeGroup *g); 00165 00166 00168 GList *mwSametimeGroup_getUsers(struct mwSametimeGroup *g); 00169 00170 00171 struct mwSametimeUser * 00172 mwSametimeGroup_findUser(struct mwSametimeGroup *g, 00173 struct mwIdBlock *user); 00174 00175 00177 struct mwSametimeUser * 00178 mwSametimeUser_new(struct mwSametimeGroup *g, 00179 enum mwSametimeUserType type, 00180 struct mwIdBlock *user); 00181 00182 00184 void mwSametimeUser_free(struct mwSametimeUser *u); 00185 00186 00187 struct mwSametimeGroup *mwSametimeUser_getGroup(struct mwSametimeUser *u); 00188 00189 00190 enum mwSametimeUserType mwSametimeUser_getType(struct mwSametimeUser *u); 00191 00192 00193 const char *mwSametimeUser_getUser(struct mwSametimeUser *u); 00194 00195 00196 const char *mwSametimeUser_getCommunity(struct mwSametimeUser *u); 00197 00198 00199 void mwSametimeUser_setShortName(struct mwSametimeUser *u, const char *name); 00200 00201 00202 const char *mwSametimeUser_getShortName(struct mwSametimeUser *u); 00203 00204 00205 void mwSametimeUser_setAlias(struct mwSametimeUser *u, const char *alias); 00206 00207 00208 const char *mwSametimeUser_getAlias(struct mwSametimeUser *u); 00209 00210 00211 00212 #ifdef __cplusplus 00213 } 00214 #endif 00215 00216 00217 #endif /* _MW_ST_LIST_H */