meanwhile 1.1.0
|
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_SRVC_PLACE_H 00022 #define _MW_SRVC_PLACE_H 00023 00024 00025 #include <glib/glist.h> 00026 #include "mw_common.h" 00027 00028 00029 #ifdef __cplusplus 00030 extern "C" { 00031 #endif 00032 00033 00035 #define mwService_PLACE 0x80000022 00036 00037 00039 struct mwServicePlace; 00040 00041 00043 struct mwPlace; 00044 00045 00046 struct mwPlaceHandler { 00047 void (*opened)(struct mwPlace *place); 00048 void (*closed)(struct mwPlace *place, guint32 code); 00049 00050 void (*peerJoined)(struct mwPlace *place, 00051 const struct mwIdBlock *peer); 00052 00053 void (*peerParted)(struct mwPlace *place, 00054 const struct mwIdBlock *peer); 00055 00056 void (*peerSetAttribute)(struct mwPlace *place, 00057 const struct mwIdBlock *peer, 00058 guint32 attr, struct mwOpaque *o); 00059 00060 void (*peerUnsetAttribute)(struct mwPlace *place, 00061 const struct mwIdBlock *peer, 00062 guint32 attr); 00063 00064 void (*message)(struct mwPlace *place, 00065 const struct mwIdBlock *who, 00066 const char *msg); 00067 00068 void (*clear)(struct mwServicePlace *srvc); 00069 }; 00070 00071 00072 enum mwPlacePeerAttribute { 00073 mwPlacePeer_TYPING = 0x00000008, 00074 }; 00075 00076 00077 struct mwServicePlace * 00078 mwServicePlace_new(struct mwSession *session, 00079 struct mwPlaceHandler *handler); 00080 00081 00082 struct mwPlaceHandler * 00083 mwServicePlace_getHandler(struct mwServicePlace *srvc); 00084 00085 00086 const GList *mwServicePlace_getPlaces(struct mwServicePlace *srvc); 00087 00088 00089 struct mwPlace *mwPlace_new(struct mwServicePlace *srvc, 00090 const char *name, const char *title); 00091 00092 00093 struct mwServicePlace *mwPlace_getService(struct mwPlace *place); 00094 00095 00096 const char *mwPlace_getName(struct mwPlace *place); 00097 00098 00099 const char *mwPlace_getTitle(struct mwPlace *place); 00100 00101 00102 int mwPlace_open(struct mwPlace *place); 00103 00104 00105 int mwPlace_destroy(struct mwPlace *place, guint32 code); 00106 00107 00111 GList *mwPlace_getMembers(struct mwPlace *place); 00112 00113 00114 int mwPlace_sendText(struct mwPlace *place, const char *msg); 00115 00116 00120 int mwPlace_legacyInvite(struct mwPlace *place, 00121 struct mwIdBlock *idb, 00122 const char *message); 00123 00124 00125 int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib, 00126 struct mwOpaque *data); 00127 00128 00129 int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib); 00130 00131 00132 void mwPlace_setClientData(struct mwPlace *place, 00133 gpointer data, GDestroyNotify clean); 00134 00135 00136 gpointer mwPlace_getClientData(struct mwPlace *place); 00137 00138 00139 void mwPlace_removeClientData(struct mwPlace *place); 00140 00141 00142 #ifdef __cplusplus 00143 } 00144 #endif 00145 00146 00147 #endif /* _MW_SRVC_PLACE_H */ 00148