mw_srvc_conf.h
Go to the documentation of this file.
/*
Meanwhile - Unofficial Lotus Sametime Community Client Library
Copyright (C) 2004 Christopher (siege) O'Brien
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _MW_SRVC_CONF_H
#define _MW_SRVC_CONF_H
#include <glib.h>
#include "mw_common.h"
#ifdef __cplusplus
extern "C" {
#endif
#define mwService_CONFERENCE 0x80000010
enum mwConferenceState {
mwConference_NEW,
mwConference_PENDING,
mwConference_INVITED,
mwConference_OPEN,
mwConference_CLOSING,
mwConference_ERROR,
mwConference_UNKNOWN,
};
struct mwServiceConference;
struct mwConference;
struct mwConferenceHandler {
void (*on_invited)(struct mwConference *conf,
struct mwLoginInfo *inviter, const char *invite);
void (*conf_opened)(struct mwConference *conf, GList *members);
void (*conf_closed)(struct mwConference *, guint32 reason);
void (*on_peer_joined)(struct mwConference *, struct mwLoginInfo *);
void (*on_peer_parted)(struct mwConference *, struct mwLoginInfo *);
void (*on_text)(struct mwConference *conf,
struct mwLoginInfo *who, const char *what);
void (*on_typing)(struct mwConference *conf,
struct mwLoginInfo *who, gboolean typing);
void (*clear)(struct mwServiceConference *srvc);
};
struct mwServiceConference *
mwServiceConference_new(struct mwSession *sess,
struct mwConferenceHandler *handler);
struct mwConferenceHandler *
mwServiceConference_getHandler(struct mwServiceConference *srvc);
GList *mwServiceConference_getConferences(struct mwServiceConference *srvc);
struct mwConference *mwConference_new(struct mwServiceConference *srvc,
const char *title);
struct mwServiceConference *mwConference_getService(struct mwConference *conf);
const char *mwConference_getName(struct mwConference *conf);
const char *mwConference_getTitle(struct mwConference *conf);
GList *mwConference_getMembers(struct mwConference *conf);
int mwConference_open(struct mwConference *conf);
int mwConference_destroy(struct mwConference *conf,
guint32 reason, const char *text);
#define mwConference_reject(c,r,t) \
mwConference_destroy((c),(r),(t))
int mwConference_accept(struct mwConference *conf);
int mwConference_invite(struct mwConference *conf,
struct mwIdBlock *who, const char *text);
int mwConference_sendText(struct mwConference *conf, const char *text);
int mwConference_sendTyping(struct mwConference *conf, gboolean typing);
void mwConference_setClientData(struct mwConference *conf,
gpointer data, GDestroyNotify clear);
gpointer mwConference_getClientData(struct mwConference *conf);
void mwConference_removeClientData(struct mwConference *conf);
#ifdef __cplusplus
}
#endif
#endif /* _MW_SRVC_CONF_H */
mw_common.h
Common data types and functions for handling those types.
mwConference_open
int mwConference_open(struct mwConference *conf)
Initiate a conference.
mwConference_getService
struct mwServiceConference * mwConference_getService(struct mwConference *conf)
mwServiceConference_getConferences
GList * mwServiceConference_getConferences(struct mwServiceConference *srvc)
a mwConference list of the conferences in this service.
mwConference_accept
int mwConference_accept(struct mwConference *conf)
accept a conference invitation.
mwConference_invite
int mwConference_invite(struct mwConference *conf, struct mwIdBlock *who, const char *text)
invite another user to an ACTIVE conference
mwServiceConference_getHandler
struct mwConferenceHandler * mwServiceConference_getHandler(struct mwServiceConference *srvc)
mwConference_destroy
int mwConference_destroy(struct mwConference *conf, guint32 reason, const char *text)
Leave and close an existing conference, or reject an invitation.
mwConferenceState
mwConferenceState
Definition mw_srvc_conf.h:38
mwConference_CLOSING
@ mwConference_CLOSING
conference is closing
Definition mw_srvc_conf.h:43
mwConference_ERROR
@ mwConference_ERROR
conference is closing due to error
Definition mw_srvc_conf.h:44
mwConference_NEW
@ mwConference_NEW
new outgoing conference
Definition mw_srvc_conf.h:39
mwConference_UNKNOWN
@ mwConference_UNKNOWN
unable to determine conference state
Definition mw_srvc_conf.h:45
mwConference_INVITED
@ mwConference_INVITED
invited to incoming conference
Definition mw_srvc_conf.h:41
mwConference_PENDING
@ mwConference_PENDING
outgoing conference pending creation
Definition mw_srvc_conf.h:40
mwConference_OPEN
@ mwConference_OPEN
conference open and active
Definition mw_srvc_conf.h:42
mwConference_getClientData
gpointer mwConference_getClientData(struct mwConference *conf)
reference associated client data
mwServiceConference_new
struct mwServiceConference * mwServiceConference_new(struct mwSession *sess, struct mwConferenceHandler *handler)
Allocate a new conferencing service, attaching the given handler.
mwConference_sendText
int mwConference_sendText(struct mwConference *conf, const char *text)
send a text message over an open conference
mwConference_getName
const char * mwConference_getName(struct mwConference *conf)
mwConference_getMembers
GList * mwConference_getMembers(struct mwConference *conf)
a mwIdBlock list of the members of the conference.
mwConference_getTitle
const char * mwConference_getTitle(struct mwConference *conf)
mwConference_new
struct mwConference * mwConference_new(struct mwServiceConference *srvc, const char *title)
Allocate a new conference, in state NEW with the given title.
mwConference_sendTyping
int mwConference_sendTyping(struct mwConference *conf, gboolean typing)
send typing notification over an open conference
mwConference_setClientData
void mwConference_setClientData(struct mwConference *conf, gpointer data, GDestroyNotify clear)
associate arbitrary client data and an optional cleanup function with a conference.
mwConference_removeClientData
void mwConference_removeClientData(struct mwConference *conf)
remove associated client data if any, and call the cleanup function on the data as necessary
mwConferenceHandler
Handler structure used to provide callbacks for an instance of the conferencing service.
Definition mw_srvc_conf.h:61
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
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::conf_opened
void(* conf_opened)(struct mwConference *conf, GList *members)
triggered when we enter the conference.
Definition mw_srvc_conf.h:80
mwConferenceHandler::on_peer_joined
void(* on_peer_joined)(struct mwConference *, struct mwLoginInfo *)
triggered when someone joins the conference
Definition mw_srvc_conf.h:87
mwConferenceHandler::on_typing
void(* on_typing)(struct mwConference *conf, struct mwLoginInfo *who, gboolean typing)
typing notification
Definition mw_srvc_conf.h:97
mwConferenceHandler::clear
void(* clear)(struct mwServiceConference *srvc)
optional.
Definition mw_srvc_conf.h:101
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
mwConferenceHandler::conf_closed
void(* conf_closed)(struct mwConference *, guint32 reason)
triggered when a conference is closed.
Definition mw_srvc_conf.h:84
mwConference
A multi-user chat.
mwIdBlock
Definition mw_common.h:178
mwLoginInfo
Definition mw_common.h:123
mwServiceConference
Instance of the multi-user conference service.
mwSession
Represents a Sametime client session.