mw_srvc_place.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_PLACE_H
#define _MW_SRVC_PLACE_H
#include <glib.h>
#include "mw_common.h"
#ifdef __cplusplus
extern "C" {
#endif
#define mwService_PLACE 0x80000022
struct mwServicePlace;
struct mwPlace;
struct mwPlaceHandler {
void (*opened)(struct mwPlace *place);
void (*closed)(struct mwPlace *place, guint32 code);
void (*peerJoined)(struct mwPlace *place,
const struct mwIdBlock *peer);
void (*peerParted)(struct mwPlace *place,
const struct mwIdBlock *peer);
void (*peerSetAttribute)(struct mwPlace *place,
const struct mwIdBlock *peer,
guint32 attr, struct mwOpaque *o);
void (*peerUnsetAttribute)(struct mwPlace *place,
const struct mwIdBlock *peer,
guint32 attr);
void (*message)(struct mwPlace *place,
const struct mwIdBlock *who,
const char *msg);
void (*clear)(struct mwServicePlace *srvc);
};
enum mwPlacePeerAttribute {
mwPlacePeer_TYPING = 0x00000008,
};
struct mwServicePlace *
mwServicePlace_new(struct mwSession *session,
struct mwPlaceHandler *handler);
struct mwPlaceHandler *
mwServicePlace_getHandler(struct mwServicePlace *srvc);
const GList *mwServicePlace_getPlaces(struct mwServicePlace *srvc);
struct mwPlace *mwPlace_new(struct mwServicePlace *srvc,
const char *name, const char *title);
struct mwServicePlace *mwPlace_getService(struct mwPlace *place);
const char *mwPlace_getName(struct mwPlace *place);
const char *mwPlace_getTitle(struct mwPlace *place);
int mwPlace_open(struct mwPlace *place);
int mwPlace_destroy(struct mwPlace *place, guint32 code);
GList *mwPlace_getMembers(struct mwPlace *place);
int mwPlace_sendText(struct mwPlace *place, const char *msg);
int mwPlace_legacyInvite(struct mwPlace *place,
struct mwIdBlock *idb,
const char *message);
int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib,
struct mwOpaque *data);
int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib);
void mwPlace_setClientData(struct mwPlace *place,
gpointer data, GDestroyNotify clean);
gpointer mwPlace_getClientData(struct mwPlace *place);
void mwPlace_removeClientData(struct mwPlace *place);
#ifdef __cplusplus
}
#endif
#endif /* _MW_SRVC_PLACE_H */
mw_common.h
Common data types and functions for handling those types.
mwPlace_destroy
int mwPlace_destroy(struct mwPlace *place, guint32 code)
mwPlace_sendText
int mwPlace_sendText(struct mwPlace *place, const char *msg)
mwPlace_removeClientData
void mwPlace_removeClientData(struct mwPlace *place)
mwPlace_legacyInvite
int mwPlace_legacyInvite(struct mwPlace *place, struct mwIdBlock *idb, const char *message)
send a legacy invitation for this place to a user.
mwPlace_getName
const char * mwPlace_getName(struct mwPlace *place)
mwPlacePeerAttribute
mwPlacePeerAttribute
Definition mw_srvc_place.h:72
mwPlacePeer_TYPING
@ mwPlacePeer_TYPING
Definition mw_srvc_place.h:73
mwPlace_getClientData
gpointer mwPlace_getClientData(struct mwPlace *place)
mwServicePlace_getPlaces
const GList * mwServicePlace_getPlaces(struct mwServicePlace *srvc)
mwPlace_getMembers
GList * mwPlace_getMembers(struct mwPlace *place)
returns a GList* of struct mwIdBlock*.
mwPlace_setClientData
void mwPlace_setClientData(struct mwPlace *place, gpointer data, GDestroyNotify clean)
mwPlace_unsetAttribute
int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib)
mwServicePlace_getHandler
struct mwPlaceHandler * mwServicePlace_getHandler(struct mwServicePlace *srvc)
mwPlace_open
int mwPlace_open(struct mwPlace *place)
mwPlace_setAttribute
int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib, struct mwOpaque *data)
mwPlace_getTitle
const char * mwPlace_getTitle(struct mwPlace *place)
mwPlace_new
struct mwPlace * mwPlace_new(struct mwServicePlace *srvc, const char *name, const char *title)
mwPlace_getService
struct mwServicePlace * mwPlace_getService(struct mwPlace *place)
mwServicePlace_new
struct mwServicePlace * mwServicePlace_new(struct mwSession *session, struct mwPlaceHandler *handler)
mwIdBlock
Definition mw_common.h:178
mwOpaque
A length of binary data, not null-terminated.
Definition mw_common.h:79
mwPlaceHandler
Definition mw_srvc_place.h:46
mwPlaceHandler::message
void(* message)(struct mwPlace *place, const struct mwIdBlock *who, const char *msg)
Definition mw_srvc_place.h:64
mwPlaceHandler::peerSetAttribute
void(* peerSetAttribute)(struct mwPlace *place, const struct mwIdBlock *peer, guint32 attr, struct mwOpaque *o)
Definition mw_srvc_place.h:56
mwPlaceHandler::opened
void(* opened)(struct mwPlace *place)
Definition mw_srvc_place.h:47
mwPlaceHandler::peerParted
void(* peerParted)(struct mwPlace *place, const struct mwIdBlock *peer)
Definition mw_srvc_place.h:53
mwPlaceHandler::peerUnsetAttribute
void(* peerUnsetAttribute)(struct mwPlace *place, const struct mwIdBlock *peer, guint32 attr)
Definition mw_srvc_place.h:60
mwPlaceHandler::clear
void(* clear)(struct mwServicePlace *srvc)
Definition mw_srvc_place.h:68
mwPlaceHandler::closed
void(* closed)(struct mwPlace *place, guint32 code)
Definition mw_srvc_place.h:48
mwPlaceHandler::peerJoined
void(* peerJoined)(struct mwPlace *place, const struct mwIdBlock *peer)
Definition mw_srvc_place.h:50
mwPlace
mwServicePlace
mwSession
Represents a Sametime client session.