meanwhile  1.1.0
mw_srvc_place.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_PLACE_H
22 #define _MW_SRVC_PLACE_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_PLACE 0x80000022
36 
37 
40 
41 
43 struct mwPlace;
44 
45 
47  void (*opened)(struct mwPlace *place);
48  void (*closed)(struct mwPlace *place, guint32 code);
49 
50  void (*peerJoined)(struct mwPlace *place,
51  const struct mwIdBlock *peer);
52 
53  void (*peerParted)(struct mwPlace *place,
54  const struct mwIdBlock *peer);
55 
56  void (*peerSetAttribute)(struct mwPlace *place,
57  const struct mwIdBlock *peer,
58  guint32 attr, struct mwOpaque *o);
59 
60  void (*peerUnsetAttribute)(struct mwPlace *place,
61  const struct mwIdBlock *peer,
62  guint32 attr);
63 
64  void (*message)(struct mwPlace *place,
65  const struct mwIdBlock *who,
66  const char *msg);
67 
68  void (*clear)(struct mwServicePlace *srvc);
69 };
70 
71 
73  mwPlacePeer_TYPING = 0x00000008,
74 };
75 
76 
77 struct mwServicePlace *
79  struct mwPlaceHandler *handler);
80 
81 
82 struct mwPlaceHandler *
84 
85 
86 const GList *mwServicePlace_getPlaces(struct mwServicePlace *srvc);
87 
88 
89 struct mwPlace *mwPlace_new(struct mwServicePlace *srvc,
90  const char *name, const char *title);
91 
92 
93 struct mwServicePlace *mwPlace_getService(struct mwPlace *place);
94 
95 
96 const char *mwPlace_getName(struct mwPlace *place);
97 
98 
99 const char *mwPlace_getTitle(struct mwPlace *place);
100 
101 
102 int mwPlace_open(struct mwPlace *place);
103 
104 
105 int mwPlace_destroy(struct mwPlace *place, guint32 code);
106 
107 
111 GList *mwPlace_getMembers(struct mwPlace *place);
112 
113 
114 int mwPlace_sendText(struct mwPlace *place, const char *msg);
115 
116 
120 int mwPlace_legacyInvite(struct mwPlace *place,
121  struct mwIdBlock *idb,
122  const char *message);
123 
124 
125 int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib,
126  struct mwOpaque *data);
127 
128 
129 int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib);
130 
131 
132 void mwPlace_setClientData(struct mwPlace *place,
133  gpointer data, GDestroyNotify clean);
134 
135 
136 gpointer mwPlace_getClientData(struct mwPlace *place);
137 
138 
139 void mwPlace_removeClientData(struct mwPlace *place);
140 
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 
147 #endif /* _MW_SRVC_PLACE_H */
148 
int mwPlace_legacyInvite(struct mwPlace *place, struct mwIdBlock *idb, const char *message)
send a legacy invitation for this place to a user.
const char * mwPlace_getName(struct mwPlace *place)
struct mwServicePlace * mwPlace_getService(struct mwPlace *place)
Definition: mw_srvc_place.h:39
void(* peerParted)(struct mwPlace *place, const struct mwIdBlock *peer)
Definition: mw_srvc_place.h:53
int mwPlace_open(struct mwPlace *place)
void mwPlace_removeClientData(struct mwPlace *place)
Definition: mw_srvc_place.h:73
struct mwServicePlace * mwServicePlace_new(struct mwSession *session, struct mwPlaceHandler *handler)
void(* closed)(struct mwPlace *place, guint32 code)
Definition: mw_srvc_place.h:48
void(* opened)(struct mwPlace *place)
Definition: mw_srvc_place.h:47
void(* peerJoined)(struct mwPlace *place, const struct mwIdBlock *peer)
Definition: mw_srvc_place.h:50
Represents a Sametime client session.
Definition: mw_common.h:178
void(* peerSetAttribute)(struct mwPlace *place, const struct mwIdBlock *peer, guint32 attr, struct mwOpaque *o)
Definition: mw_srvc_place.h:56
Common data types and functions for handling those types.
struct mwPlace * mwPlace_new(struct mwServicePlace *srvc, const char *name, const char *title)
mwPlacePeerAttribute
Definition: mw_srvc_place.h:72
struct mwSession * session
session this service is attached to.
Definition: mw_service.h:139
const char * mwPlace_getTitle(struct mwPlace *place)
const GList * mwServicePlace_getPlaces(struct mwServicePlace *srvc)
void(* clear)(struct mwServicePlace *srvc)
Definition: mw_srvc_place.h:68
int mwPlace_destroy(struct mwPlace *place, guint32 code)
Definition: mw_srvc_place.h:46
gpointer mwPlace_getClientData(struct mwPlace *place)
void mwPlace_setClientData(struct mwPlace *place, gpointer data, GDestroyNotify clean)
A length of binary data, not null-terminated.
Definition: mw_common.h:79
void(* message)(struct mwPlace *place, const struct mwIdBlock *who, const char *msg)
Definition: mw_srvc_place.h:64
GList * mwPlace_getMembers(struct mwPlace *place)
returns a GList* of struct mwIdBlock*.
struct mwPlaceHandler * mwServicePlace_getHandler(struct mwServicePlace *srvc)
int mwPlace_sendText(struct mwPlace *place, const char *msg)
int mwPlace_setAttribute(struct mwPlace *place, guint32 attrib, struct mwOpaque *data)
int mwPlace_unsetAttribute(struct mwPlace *place, guint32 attrib)
void(* peerUnsetAttribute)(struct mwPlace *place, const struct mwIdBlock *peer, guint32 attr)
Definition: mw_srvc_place.h:60