Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

mw_srvc_place.h

Go to the documentation of this file.
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 
00030 #define mwService_PLACE  0x80000022
00031 
00032 
00034 struct mwServicePlace;
00035 
00036 
00038 struct mwPlace;
00039 
00040 
00041 struct mwPlaceHandler {
00042   void (*opened)(struct mwPlace *place);
00043   void (*closed)(struct mwPlace *place, guint32 code);
00044 
00045   void (*peerJoined)(struct mwPlace *place,
00046                      const struct mwIdBlock *peer);
00047 
00048   void (*peerParted)(struct mwPlace *place,
00049                      const struct mwIdBlock *peer);
00050 
00051   void (*peerSetAttribute)(struct mwPlace *place,
00052                            const struct mwIdBlock *peer,
00053                            guint32 attr, struct mwOpaque *o);
00054 
00055   void (*peerUnsetAttribute)(struct mwPlace *place,
00056                              const struct mwIdBlock *peer,
00057                              guint32 attr);
00058 
00059   void (*message)(struct mwPlace *place,
00060                   const struct mwIdBlock *who,
00061                   const char *msg);
00062 
00063   void (*clear)(struct mwServicePlace *srvc);
00064 };
00065 
00066 
00067 enum mwPlacePeerAttribute {
00068   mwPlacePeer_TYPING = 0x00000008,
00069 };
00070 
00071 
00072 struct mwServicePlace *
00073 mwServicePlace_new(struct mwSession *session,
00074                    struct mwPlaceHandler *handler);
00075 
00076 
00077 struct mwPlaceHandler *
00078 mwServicePlace_getHandler(struct mwServicePlace *srvc);
00079 
00080 
00081 const GList *mwServicePlace_getPlaces(struct mwServicePlace *srvc);
00082 
00083 
00084 struct mwPlace *mwPlace_new(struct mwServicePlace *srvc,
00085                             const char *name, const char *title);
00086 
00087 
00088 struct mwServicePlace *mwPlace_getService(struct mwPlace *place);
00089 
00090 
00091 const char *mwPlace_getName(struct mwPlace *place);
00092 
00093 
00094 const char *mwPlace_getTitle(struct mwPlace *place);
00095 
00096 
00097 int mwPlace_open(struct mwPlace *place);
00098 
00099 
00100 int mwPlace_destroy(struct mwPlace *place, guint32 code);
00101 
00102 
00106 GList *mwPlace_getMembers(struct mwPlace *place);
00107 
00108 
00109 int mwPlace_sendText(struct mwPlace *place, const char *msg);
00110 
00111 
00112 int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib,
00113                          struct mwOpaque *data);
00114 
00115 
00116 int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib);
00117 
00118 
00119 void mwPlace_setClientData(struct mwPlace *place,
00120                            gpointer data, GDestroyNotify clean);
00121 
00122 
00123 gpointer mwPlace_getClientData(struct mwPlace *place);
00124 
00125 
00126 void mwPlace_removeClientData(struct mwPlace *place);
00127 
00128 
00129 #endif

Generated on Tue May 30 11:20:14 2006 for meanwhile by  doxygen 1.3.9.1