meanwhile  1.0.2
mw_srvc_conf.h
Go to the documentation of this file.
1 
2 /*
3  Meanwhile - Unofficial Lotus Sametime Community Client Library
4  Copyright (C) 2004 Christopher (siege) O'Brien
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public
17  License along with this library; if not, write to the Free
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 
21 #ifndef _MW_SRVC_CONF_H
22 #define _MW_SRVC_CONF_H
23 
24 
25 #include <glib.h>
26 #include "mw_common.h"
27 
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
35 #define mwService_CONFERENCE 0x80000010
36 
37 
46 };
47 
48 
52 
53 
56 struct mwConference;
57 
58 
62 
71  void (*on_invited)(struct mwConference *conf,
72  struct mwLoginInfo *inviter, const char *invite);
73 
80  void (*conf_opened)(struct mwConference *conf, GList *members);
81 
84  void (*conf_closed)(struct mwConference *, guint32 reason);
85 
87  void (*on_peer_joined)(struct mwConference *, struct mwLoginInfo *);
88 
90  void (*on_peer_parted)(struct mwConference *, struct mwLoginInfo *);
91 
93  void (*on_text)(struct mwConference *conf,
94  struct mwLoginInfo *who, const char *what);
95 
97  void (*on_typing)(struct mwConference *conf,
98  struct mwLoginInfo *who, gboolean typing);
99 
101  void (*clear)(struct mwServiceConference *srvc);
102 };
103 
104 
109 struct mwServiceConference *
111  struct mwConferenceHandler *handler);
112 
113 
115 struct mwConferenceHandler *
117 
118 
122 
123 
127  const char *title);
128 
129 
132 
133 
135 const char *mwConference_getName(struct mwConference *conf);
136 
137 
139 const char *mwConference_getTitle(struct mwConference *conf);
140 
141 
144 GList *mwConference_getMembers(struct mwConference *conf);
145 
146 
150 int mwConference_open(struct mwConference *conf);
151 
152 
157 int mwConference_destroy(struct mwConference *conf,
158  guint32 reason, const char *text);
159 
160 
161 #define mwConference_reject(c,r,t) \
162  mwConference_destroy((c),(r),(t))
163 
164 
167 int mwConference_accept(struct mwConference *conf);
168 
169 
175 int mwConference_invite(struct mwConference *conf,
176  struct mwIdBlock *who, const char *text);
177 
178 
180 int mwConference_sendText(struct mwConference *conf, const char *text);
181 
182 
184 int mwConference_sendTyping(struct mwConference *conf, gboolean typing);
185 
186 
190 void mwConference_setClientData(struct mwConference *conf,
191  gpointer data, GDestroyNotify clear);
192 
193 
195 gpointer mwConference_getClientData(struct mwConference *conf);
196 
197 
201 
202 
203 #ifdef __cplusplus
204 }
205 #endif
206 
207 
208 #endif /* _MW_SRVC_CONF_H */
209 
mwConference
Definition: mw_srvc_conf.h:51
mwConference_getMembers
GList * mwConference_getMembers(struct mwConference *conf)
a mwIdBlock list of the members of the conference.
mwConferenceHandler
Handler structure used to provide callbacks for an instance of the conferencing service.
Definition: mw_srvc_conf.h:61
mwConference_PENDING
@ mwConference_PENDING
outgoing conference pending creation
Definition: mw_srvc_conf.h:40
mwConference_UNKNOWN
@ mwConference_UNKNOWN
unable to determine conference state
Definition: mw_srvc_conf.h:45
mwLoginInfo
Definition: mw_common.h:123
mwConferenceHandler::conf_opened
void(* conf_opened)(struct mwConference *conf, GList *members)
triggered when we enter the conference.
Definition: mw_srvc_conf.h:80
mwConferenceState
mwConferenceState
Definition: mw_srvc_conf.h:38
mwConference_open
int mwConference_open(struct mwConference *conf)
Initiate a conference.
mwConference_invite
int mwConference_invite(struct mwConference *conf, struct mwIdBlock *who, const char *text)
invite another user to an ACTIVE conference
mwConference_ERROR
@ mwConference_ERROR
conference is closing due to error
Definition: mw_srvc_conf.h:44
mw_common.h
mwConference_getName
const char * mwConference_getName(struct mwConference *conf)
mwConference_OPEN
@ mwConference_OPEN
conference open and active
Definition: mw_srvc_conf.h:42
mwConference_getTitle
const char * mwConference_getTitle(struct mwConference *conf)
mwServiceConference
mwConference_sendTyping
int mwConference_sendTyping(struct mwConference *conf, gboolean typing)
send typing notification over an open conference
mwConference_getClientData
gpointer mwConference_getClientData(struct mwConference *conf)
reference associated client data
mwConference_sendText
int mwConference_sendText(struct mwConference *conf, const char *text)
send a text message over an open conference
mwConferenceHandler::on_peer_parted
void(* on_peer_parted)(struct mwConference *, struct mwLoginInfo *)
triggered when someone leaves the conference
Definition: mw_srvc_conf.h:90
mwConferenceHandler::on_invited
void(* on_invited)(struct mwConference *conf, struct mwLoginInfo *inviter, const char *invite)
triggered when we receive a conference invitation.
Definition: mw_srvc_conf.h:71
mwConference_new
struct mwConference * mwConference_new(struct mwServiceConference *srvc, const char *title)
Allocate a new conference, in state NEW with the given title.
mwConferenceHandler::clear
void(* clear)(struct mwServiceConference *srvc)
optional.
Definition: mw_srvc_conf.h:101
mwConference_destroy
int mwConference_destroy(struct mwConference *conf, guint32 reason, const char *text)
Leave and close an existing conference, or reject an invitation.
mwConference_INVITED
@ mwConference_INVITED
invited to incoming conference
Definition: mw_srvc_conf.h:41
mwSession
mwIdBlock
Definition: mw_common.h:174
mwConferenceHandler::on_typing
void(* on_typing)(struct mwConference *conf, struct mwLoginInfo *who, gboolean typing)
typing notification
Definition: mw_srvc_conf.h:97
mwConferenceHandler::on_text
void(* on_text)(struct mwConference *conf, struct mwLoginInfo *who, const char *what)
triggered when someone says something
Definition: mw_srvc_conf.h:93
mwConference_CLOSING
@ mwConference_CLOSING
conference is closing
Definition: mw_srvc_conf.h:43
mwServiceConference_new
struct mwServiceConference * mwServiceConference_new(struct mwSession *sess, struct mwConferenceHandler *handler)
Allocate a new conferencing service, attaching the given handler.
mwConference_removeClientData
void mwConference_removeClientData(struct mwConference *conf)
remove associated client data if any, and call the cleanup function on the data as necessary
mwServiceConference_getConferences
GList * mwServiceConference_getConferences(struct mwServiceConference *srvc)
a mwConference list of the conferences in this service.
mwService::clear
mwService_funcClear clear
The service's cleanup handler.
Definition: mw_service.h:195
mwConference_getService
struct mwServiceConference * mwConference_getService(struct mwConference *conf)
mwConferenceHandler::on_peer_joined
void(* on_peer_joined)(struct mwConference *, struct mwLoginInfo *)
triggered when someone joins the conference
Definition: mw_srvc_conf.h:87
mwConference_setClientData
void mwConference_setClientData(struct mwConference *conf, gpointer data, GDestroyNotify clear)
associate arbitrary client data and an optional cleanup function with a conference.
mwConferenceHandler::conf_closed
void(* conf_closed)(struct mwConference *, guint32 reason)
triggered when a conference is closed.
Definition: mw_srvc_conf.h:84
mwConference_NEW
@ mwConference_NEW
new outgoing conference
Definition: mw_srvc_conf.h:39
mwConference_accept
int mwConference_accept(struct mwConference *conf)
accept a conference invitation.
mwServiceConference_getHandler
struct mwConferenceHandler * mwServiceConference_getHandler(struct mwServiceConference *srvc)