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

mw_srvc_conf.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_CONF_H
00022 #define _MW_SRVC_CONF_H
00023 
00024 
00025 #include <glib/glist.h>
00026 #include "mw_common.h"
00027 
00028 
00030 #define mwService_CONFERENCE  0x80000010
00031 
00032 
00033 enum mwConferenceState {
00034   mwConference_NEW,      
00035   mwConference_PENDING,  
00036   mwConference_INVITED,  
00037   mwConference_OPEN,     
00038   mwConference_CLOSING,  
00039   mwConference_ERROR,    
00040   mwConference_UNKNOWN,  
00041 };
00042 
00043 
00046 struct mwServiceConference;
00047 
00048 
00051 struct mwConference;
00052 
00053 
00056 struct mwConferenceHandler {
00057 
00066   void (*on_invited)(struct mwConference *conf,
00067                      struct mwLoginInfo *inviter, const char *invite);
00068 
00075   void (*conf_opened)(struct mwConference *conf, GList *members);
00076 
00079   void (*conf_closed)(struct mwConference *, guint32 reason);
00080 
00082   void (*on_peer_joined)(struct mwConference *, struct mwLoginInfo *);
00083 
00085   void (*on_peer_parted)(struct mwConference *, struct mwLoginInfo *);
00086 
00088   void (*on_text)(struct mwConference *conf,
00089                   struct mwLoginInfo *who, const char *what);
00090 
00092   void (*on_typing)(struct mwConference *conf,
00093                     struct mwLoginInfo *who, gboolean typing);
00094 
00096   void (*clear)(struct mwServiceConference *srvc);
00097 };
00098 
00099 
00104 struct mwServiceConference *
00105 mwServiceConference_new(struct mwSession *sess,
00106                         struct mwConferenceHandler *handler);
00107 
00108 
00110 struct mwConferenceHandler *
00111 mwServiceConference_getHandler(struct mwServiceConference *srvc);
00112 
00113 
00116 GList *mwServiceConference_getConferences(struct mwServiceConference *srvc);
00117 
00118 
00121 struct mwConference *mwConference_new(struct mwServiceConference *srvc,
00122                                       const char *title);
00123 
00124 
00126 struct mwServiceConference *mwConference_getService(struct mwConference *conf);
00127 
00128 
00130 const char *mwConference_getName(struct mwConference *conf);
00131 
00132 
00134 const char *mwConference_getTitle(struct mwConference *conf);
00135 
00136 
00139 GList *mwConference_getMembers(struct mwConference *conf);
00140 
00141 
00145 int mwConference_open(struct mwConference *conf);
00146 
00147 
00152 int mwConference_destroy(struct mwConference *conf,
00153                          guint32 reason, const char *text);
00154 
00155 
00156 #define mwConference_reject(c,r,t) \
00157   mwConference_destroy((c),(r),(t))
00158 
00159 
00162 int mwConference_accept(struct mwConference *conf);
00163 
00164 
00170 int mwConference_invite(struct mwConference *conf,
00171                         struct mwIdBlock *who, const char *text);
00172 
00173 
00175 int mwConference_sendText(struct mwConference *conf, const char *text);
00176 
00177 
00179 int mwConference_sendTyping(struct mwConference *conf, gboolean typing);
00180 
00181 
00185 void mwConference_setClientData(struct mwConference *conf,
00186                                 gpointer data, GDestroyNotify clear);
00187 
00188 
00190 gpointer mwConference_getClientData(struct mwConference *conf);
00191 
00192 
00195 void mwConference_removeClientData(struct mwConference *conf);
00196                                     
00197 
00198 #endif
00199 

Generated on Sun Nov 27 16:56:33 2005 for meanwhile by doxygen 1.3.5