mw_channel.h   mw_channel.h 
skipping to change at line 101 skipping to change at line 101
struct mwChannel; struct mwChannel;
/** @struct mwChannelSet /** @struct mwChannelSet
Collection of channels */ Collection of channels */
struct mwChannelSet; struct mwChannelSet;
/** special ID indicating the master channel */ /** special ID indicating the master channel */
#define MW_MASTER_CHANNEL_ID 0x00000000 #define MW_MASTER_CHANNEL_ID 0x00000000
/** non-zero if a channel id appears to be that of an outgoing channel */ /** non-zero if a channel id appears to be that of an outgoing channel */
#define MW_CHAN_ID_IS_OUTGOING(id) \ #define mwChannel_idIsOutgoing(id) \
(! (0x80000000 & (id))) (! (0x80000000 & (id)))
/** non-zero if a channel id appears to be that of an incoming channel */ /** non-zero if a channel id appears to be that of an incoming channel */
#define MW_CHAN_ID_IS_INCOMING(id) \ #define mwChannel_idIsIncoming(id) \
(! MW_CHAN_ID_IS_OUTGOING(id)) (! mwChannel_idIsOutgoing(id))
/** non-zero if a channel appears to be an outgoing channel */ /** non-zero if a channel appears to be an outgoing channel */
#define MW_CHAN_IS_OUTGOING(chan) \ #define mwChannel_isOutgoing(chan) \
MW_CHAN_ID_IS_OUTGOING((chan)->id) mwChannel_idIsOutgoing(mwChannel_getId(chan))
/** non-zero if a channel appears to be an incoming channel */ /** non-zero if a channel appears to be an incoming channel */
#define MW_CHAN_IS_INCOMING(chan) \ #define mwChannel_isIncoming(chan) \
MW_CHAN_ID_IS_INCOMING((chan)->id) mwChannel_idIsIncoming(mwChannel_getId(chan))
/** channel status */ /** channel status */
enum mwChannelState { enum mwChannelState {
mwChannel_NEW, /**< channel is newly allocated, in the pool */ mwChannel_NEW, /**< channel is newly allocated, in the pool */
mwChannel_INIT, /**< channel is being prepared, out of the pool */ mwChannel_INIT, /**< channel is being prepared, out of the pool */
mwChannel_WAIT, /**< channel is waiting for accept */ mwChannel_WAIT, /**< channel is waiting for accept */
mwChannel_OPEN, /**< channel is accepted and open */ mwChannel_OPEN, /**< channel is accepted and open */
mwChannel_DESTROY, /**< channel is being destroyed */ mwChannel_DESTROY, /**< channel is being destroyed */
mwChannel_ERROR, /**< channel is being destroyed due to error */ mwChannel_ERROR, /**< channel is being destroyed due to error */
mwChannel_UNKNOWN, /**< unknown state, or error determining state */ mwChannel_UNKNOWN, /**< unknown state, or error determining state */
}; };
#define MW_CHANNEL_IS_STATE(chan, state) \ #define mwChannel_isState(chan, state) \
(mwChannel_getState(chan) == (state)) (mwChannel_getState(chan) == (state))
/** channel statistic fields. /** channel statistic fields.
@see mwChannel_getStatistic */ @see mwChannel_getStatistic */
enum mwChannelStatField { enum mwChannelStatField {
mwChannelStat_MSG_SENT, /**< total send-on-chan messages sent */ mwChannelStat_MSG_SENT, /**< total send-on-chan messages sent */
mwChannelStat_MSG_RECV, /**< total send-on-chan messages received */ mwChannelStat_MSG_RECV, /**< total send-on-chan messages received */
mwChannelStat_U_BYTES_SENT, /**< total bytes sent, pre-encryption */ mwChannelStat_U_BYTES_SENT, /**< total bytes sent, pre-encryption */
mwChannelStat_U_BYTES_RECV, /**< total bytes received, post-decryption * / mwChannelStat_U_BYTES_RECV, /**< total bytes received, post-decryption * /
mwChannelStat_OPENED_AT, /**< time when channel was opened */ mwChannelStat_OPENED_AT, /**< time when channel was opened */
skipping to change at line 149 skipping to change at line 149
}; };
/** Allocate and initialize a channel set for a session */ /** Allocate and initialize a channel set for a session */
struct mwChannelSet *mwChannelSet_new(struct mwSession *); struct mwChannelSet *mwChannelSet_new(struct mwSession *);
/** Clear and deallocate a channel set. Closes, clears, and frees all /** Clear and deallocate a channel set. Closes, clears, and frees all
contained channels. */ contained channels. */
void mwChannelSet_free(struct mwChannelSet *); void mwChannelSet_free(struct mwChannelSet *);
/** Create an incoming channel with the given channel id. Channel's state /** Create an incoming channel with the given channel id. Channel's state
will be set to WAIT */ will be set to WAIT. Primarily for use in mw_session */
struct mwChannel *mwChannel_newIncoming(struct mwChannelSet *, guint32 id); struct mwChannel *mwChannel_newIncoming(struct mwChannelSet *, guint32 id);
/** Create an outgoing channel. Its channel ID will be generated by /** Create an outgoing channel. Its channel ID will be generated by
the owning channel set. Channel's state will be set to INIT */ the owning channel set. Channel's state will be set to INIT */
struct mwChannel *mwChannel_newOutgoing(struct mwChannelSet *); struct mwChannel *mwChannel_newOutgoing(struct mwChannelSet *);
/** Obtain a reference to a channel by its id. /** Obtain a reference to a channel by its id.
@returns the channel matching chan, or NULL */ @returns the channel matching chan, or NULL */
struct mwChannel *mwChannel_find(struct mwChannelSet *cs, guint32 chan); struct mwChannel *mwChannel_find(struct mwChannelSet *cs, guint32 chan);
skipping to change at line 186 skipping to change at line 186
void mwChannel_setService(struct mwChannel *chan, struct mwService *srvc); void mwChannel_setService(struct mwChannel *chan, struct mwService *srvc);
/** get service-specific data. This is for use by service /** get service-specific data. This is for use by service
implementations to easily associate information with the implementations to easily associate information with the
channel */ channel */
gpointer mwChannel_getServiceData(struct mwChannel *chan); gpointer mwChannel_getServiceData(struct mwChannel *chan);
/** set service-specific data. This is for use by service /** set service-specific data. This is for use by service
implementations to easily associate information with the implementations to easily associate information with the
channel */ channel */
void mwChannel_setServiceData(struct mwChannel *chan, gpointer data); void mwChannel_setServiceData(struct mwChannel *chan,
gpointer data, GDestroyNotify clean);
void mwChannel_removeServiceData(struct mwChannel *chan);
guint32 mwChannel_getProtoType(struct mwChannel *chan); guint32 mwChannel_getProtoType(struct mwChannel *chan);
void mwChannel_setProtoType(struct mwChannel *chan, guint32 proto_type); void mwChannel_setProtoType(struct mwChannel *chan, guint32 proto_type);
guint32 mwChannel_getProtoVer(struct mwChannel *chan); guint32 mwChannel_getProtoVer(struct mwChannel *chan);
void mwChannel_setProtoVer(struct mwChannel *chan, guint32 proto_ver); void mwChannel_setProtoVer(struct mwChannel *chan, guint32 proto_ver);
guint32 mwChannel_getOptions(struct mwChannel *chan); guint32 mwChannel_getOptions(struct mwChannel *chan);
 End of changes. 7 change blocks. 
10 lines changed or deleted 13 lines changed or added


 mw_common.h   mw_common.h 
skipping to change at line 93 skipping to change at line 93
If you are using Meanwhile in your client code and would like to If you are using Meanwhile in your client code and would like to
differentiate yourself, please email siege at preoccupied dot net differentiate yourself, please email siege at preoccupied dot net
with all the relevant information you can think of. I intend to be with all the relevant information you can think of. I intend to be
pretty liberal with 'em. pretty liberal with 'em.
*/ */
enum mwLoginType { enum mwLoginType {
mwLogin_LIB = 0x1000, /**< official Lotus binary library */ mwLogin_LIB = 0x1000, /**< official Lotus binary library */
mwLogin_JAVA_WEB = 0x1001, /**< official Lotus Java applet */ mwLogin_JAVA_WEB = 0x1001, /**< official Lotus Java applet */
mwLogin_BINARY = 0x1002, /**< official Lotus binary application * / mwLogin_BINARY = 0x1002, /**< official Lotus binary application * /
mwLogin_JAVA_APP = 0x1003, /**< official Lotus Java application */ mwLogin_JAVA_APP = 0x1003, /**< official Lotus Java application */
mwLogin_NOTES_6_5 = 0x1200,
mwLogin_NOTES_7_0 = 0x1210, /* now we're getting crazy */
mwLogin_ICT = 0x1300, mwLogin_NOTES_6_5 = 0x1200,
mwLogin_NOTESBUDDY = 0x1400, /**< 0xff00 mask */ mwLogin_NOTES_7_0 = 0x1210,
mwLogin_SANITY = 0x1600, mwLogin_ICT = 0x1300,
mwLogin_ST_PERL = 0x1625, mwLogin_NOTESBUDDY = 0x1400, /**< 0xff00 mask? */
mwLogin_PMR_ALERT = 0x1650, mwLogin_NOTESBUDDY_4_15 = 0x1405,
mwLogin_TRILLIAN = 0x16aa, /**< http://sf.net/st-plugin/ */ mwLogin_SANITY = 0x1600,
mwLogin_TRILLIAN_IBM = 0x16bb, mwLogin_ST_PERL = 0x1625,
mwLogin_MEANWHILE = 0x1700, /**< Meanwhile library */ mwLogin_PMR_ALERT = 0x1650,
mwLogin_TRILLIAN = 0x16aa, /**< http://sf.net/st-plugin/ */
mwLogin_TRILLIAN_IBM = 0x16bb,
mwLogin_MEANWHILE = 0x1700, /**< Meanwhile library */
/* these aren't ready for use yet, DO NOT USE WHILE THIS COMMENT /* these aren't ready for use yet, DO NOT USE WHILE THIS COMMENT
EXISTS HERE, it will only cause you trouble */ EXISTS HERE, it will only cause you trouble */
mwLogin_MW_PYTHON = 0x1701, /**< Meanwhile Python */ mwLogin_MW_PYTHON = 0x1701, /**< Meanwhile Python */
mwLogin_MW_GAIM = 0x1702, /**< gaim-meanwhile */ mwLogin_MW_GAIM = 0x1702, /**< gaim-meanwhile */
mwLogin_MW_ADIUM = 0x1703, /**< adium-meanwhile */ mwLogin_MW_ADIUM = 0x1703, /**< adium-meanwhile */
mwLogin_MW_KOPETE = 0x1704, /**< kopete-meanwhile */ mwLogin_MW_KOPETE = 0x1704, /**< kopete-meanwhile */
}; };
/* 8.2 Common Structures */ /* 8.2 Common Structures */
skipping to change at line 239 skipping to change at line 242
/** skip len bytes in the get buffer. If len is greater than the count /** skip len bytes in the get buffer. If len is greater than the count
of bytes remaining in the buffer, the buffer's error flag will NOT of bytes remaining in the buffer, the buffer's error flag will NOT
be set. be set.
@returns count of bytes successfully skipped */ @returns count of bytes successfully skipped */
gsize mwGetBuffer_advance(struct mwGetBuffer *b, gsize len); gsize mwGetBuffer_advance(struct mwGetBuffer *b, gsize len);
/** allocate a new buffer backed by the given data. Calling /** allocate a new buffer backed by the given data. Calling
mwGetBuffer_free will not result in the underlying data being mwGetBuffer_free will not result in the underlying data being
freed */ freed */
struct mwGetBuffer *mwGetBuffer_wrap(struct mwOpaque *data); struct mwGetBuffer *mwGetBuffer_wrap(const struct mwOpaque *data);
/** destroy the buffer */ /** destroy the buffer */
void mwGetBuffer_free(struct mwGetBuffer *b); void mwGetBuffer_free(struct mwGetBuffer *b);
/** reset the buffer to the very beginning. Also clears the buffer's /** reset the buffer to the very beginning. Also clears the buffer's
error flag. */ error flag. */
void mwGetBuffer_reset(struct mwGetBuffer *b); void mwGetBuffer_reset(struct mwGetBuffer *b);
/** count of remaining available bytes */ /** count of remaining available bytes */
gsize mwGetBuffer_remaining(struct mwGetBuffer *b); gsize mwGetBuffer_remaining(struct mwGetBuffer *b);
skipping to change at line 288 skipping to change at line 291
void gboolean_put(struct mwPutBuffer *b, gboolean val); void gboolean_put(struct mwPutBuffer *b, gboolean val);
void gboolean_get(struct mwGetBuffer *b, gboolean *val); void gboolean_get(struct mwGetBuffer *b, gboolean *val);
gboolean gboolean_peek(struct mwGetBuffer *b); gboolean gboolean_peek(struct mwGetBuffer *b);
void mwString_put(struct mwPutBuffer *b, const char *str); void mwString_put(struct mwPutBuffer *b, const char *str);
void mwString_get(struct mwGetBuffer *b, char **str); void mwString_get(struct mwGetBuffer *b, char **str);
void mwOpaque_put(struct mwPutBuffer *b, struct mwOpaque *o); void mwOpaque_put(struct mwPutBuffer *b, const struct mwOpaque *o);
void mwOpaque_get(struct mwGetBuffer *b, struct mwOpaque *o); void mwOpaque_get(struct mwGetBuffer *b, struct mwOpaque *o);
void mwOpaque_clear(struct mwOpaque *o); void mwOpaque_clear(struct mwOpaque *o);
void mwOpaque_free(struct mwOpaque *o); void mwOpaque_free(struct mwOpaque *o);
void mwOpaque_clone(struct mwOpaque *to, struct mwOpaque *from); void mwOpaque_clone(struct mwOpaque *to, const struct mwOpaque *from);
/*@}*/ /*@}*/
/** @name Complex Data Type Marshalling */ /** @name Complex Data Type Marshalling */
/*@{*/ /*@{*/
void mwLoginInfo_put(struct mwPutBuffer *b, struct mwLoginInfo *info); void mwLoginInfo_put(struct mwPutBuffer *b, const struct mwLoginInfo *info) ;
void mwLoginInfo_get(struct mwGetBuffer *b, struct mwLoginInfo *info); void mwLoginInfo_get(struct mwGetBuffer *b, struct mwLoginInfo *info);
void mwLoginInfo_clear(struct mwLoginInfo *info); void mwLoginInfo_clear(struct mwLoginInfo *info);
void mwLoginInfo_clone(struct mwLoginInfo *to, struct mwLoginInfo *from); void mwLoginInfo_clone(struct mwLoginInfo *to, const struct mwLoginInfo *fr om);
void mwUserItem_put(struct mwPutBuffer *b, struct mwUserItem *user); void mwUserItem_put(struct mwPutBuffer *b, const struct mwUserItem *user);
void mwUserItem_get(struct mwGetBuffer *b, struct mwUserItem *user); void mwUserItem_get(struct mwGetBuffer *b, struct mwUserItem *user);
void mwUserItem_clear(struct mwUserItem *user); void mwUserItem_clear(struct mwUserItem *user);
void mwPrivacyInfo_put(struct mwPutBuffer *b, struct mwPrivacyInfo *info); void mwPrivacyInfo_put(struct mwPutBuffer *b,
const struct mwPrivacyInfo *info);
void mwPrivacyInfo_get(struct mwGetBuffer *b, struct mwPrivacyInfo *info); void mwPrivacyInfo_get(struct mwGetBuffer *b, struct mwPrivacyInfo *info);
void mwPrivacyInfo_clear(struct mwPrivacyInfo *info); void mwPrivacyInfo_clear(struct mwPrivacyInfo *info);
void mwUserStatus_put(struct mwPutBuffer *b, struct mwUserStatus *stat); void mwUserStatus_put(struct mwPutBuffer *b,
const struct mwUserStatus *stat);
void mwUserStatus_get(struct mwGetBuffer *b, struct mwUserStatus *stat); void mwUserStatus_get(struct mwGetBuffer *b, struct mwUserStatus *stat);
void mwUserStatus_clear(struct mwUserStatus *stat); void mwUserStatus_clear(struct mwUserStatus *stat);
void mwUserStatus_clone(struct mwUserStatus *to, struct mwUserStatus *from) void mwUserStatus_clone(struct mwUserStatus *to,
; const struct mwUserStatus *from);
void mwIdBlock_put(struct mwPutBuffer *b, struct mwIdBlock *id); void mwIdBlock_put(struct mwPutBuffer *b, const struct mwIdBlock *id);
void mwIdBlock_get(struct mwGetBuffer *b, struct mwIdBlock *id); void mwIdBlock_get(struct mwGetBuffer *b, struct mwIdBlock *id);
void mwIdBlock_clear(struct mwIdBlock *id); void mwIdBlock_clear(struct mwIdBlock *id);
void mwIdBlock_clone(struct mwIdBlock *to, struct mwIdBlock *from); void mwIdBlock_clone(struct mwIdBlock *to,
const struct mwIdBlock *from);
guint mwIdBlock_hash(struct mwIdBlock *idb); guint mwIdBlock_hash(const struct mwIdBlock *idb);
gboolean mwIdBlock_equal(struct mwIdBlock *a, struct mwIdBlock *b); gboolean mwIdBlock_equal(const struct mwIdBlock *a,
const struct mwIdBlock *b);
void mwAwareIdBlock_put(struct mwPutBuffer *b, struct mwAwareIdBlock *idb); void mwAwareIdBlock_put(struct mwPutBuffer *b,
const struct mwAwareIdBlock *idb);
void mwAwareIdBlock_get(struct mwGetBuffer *b, struct mwAwareIdBlock *idb); void mwAwareIdBlock_get(struct mwGetBuffer *b, struct mwAwareIdBlock *idb);
void mwAwareIdBlock_clear(struct mwAwareIdBlock *idb); void mwAwareIdBlock_clear(struct mwAwareIdBlock *idb);
void mwAwareIdBlock_clone(struct mwAwareIdBlock *to, void mwAwareIdBlock_clone(struct mwAwareIdBlock *to,
struct mwAwareIdBlock *from); const struct mwAwareIdBlock *from);
guint mwAwareIdBlock_hash(struct mwAwareIdBlock *a); guint mwAwareIdBlock_hash(const struct mwAwareIdBlock *a);
gboolean mwAwareIdBlock_equal(struct mwAwareIdBlock *a, gboolean mwAwareIdBlock_equal(const struct mwAwareIdBlock *a,
struct mwAwareIdBlock *b); const struct mwAwareIdBlock *b);
void mwAwareSnapshot_get(struct mwGetBuffer *b, void mwAwareSnapshot_get(struct mwGetBuffer *b,
struct mwAwareSnapshot *idb); struct mwAwareSnapshot *idb);
void mwAwareSnapshot_clear(struct mwAwareSnapshot *idb); void mwAwareSnapshot_clear(struct mwAwareSnapshot *idb);
void mwAwareSnapshot_clone(struct mwAwareSnapshot *to, void mwAwareSnapshot_clone(struct mwAwareSnapshot *to,
struct mwAwareSnapshot *from); const struct mwAwareSnapshot *from);
void mwEncryptItem_put(struct mwPutBuffer *b, struct mwEncryptItem *item); void mwEncryptItem_put(struct mwPutBuffer *b,
const struct mwEncryptItem *item);
void mwEncryptItem_get(struct mwGetBuffer *b, struct mwEncryptItem *item); void mwEncryptItem_get(struct mwGetBuffer *b, struct mwEncryptItem *item);
void mwEncryptItem_clear(struct mwEncryptItem *item); void mwEncryptItem_clear(struct mwEncryptItem *item);
/*@}*/ /*@}*/
#endif #endif
 End of changes. 20 change blocks. 
31 lines changed or deleted 40 lines changed or added


 mw_error.h   mw_error.h 
skipping to change at line 75 skipping to change at line 75
ERR_ALREADY_INITIALIZED = 0x80000013, ERR_ALREADY_INITIALIZED = 0x80000013,
ERR_NOT_OWNER = 0x80000014, ERR_NOT_OWNER = 0x80000014,
ERR_TOKEN_INVALID = 0x80000015, ERR_TOKEN_INVALID = 0x80000015,
ERR_TOKEN_EXPIRED = 0x80000016, ERR_TOKEN_EXPIRED = 0x80000016,
ERR_TOKEN_IP_MISMATCH = 0x80000017, ERR_TOKEN_IP_MISMATCH = 0x80000017,
ERR_PORT_IN_USE = 0x80000018, ERR_PORT_IN_USE = 0x80000018,
ERR_NETWORK_DEAD = 0x80000019, ERR_NETWORK_DEAD = 0x80000019,
ERR_NO_MASTER_CHANNEL = 0x8000001a, ERR_NO_MASTER_CHANNEL = 0x8000001a,
ERR_ALREADY_SUBSCRIBED = 0x8000001b, ERR_ALREADY_SUBSCRIBED = 0x8000001b,
ERR_NOT_SUBSCRIBED = 0x8000001c, ERR_NOT_SUBSCRIBED = 0x8000001c,
ERR_ENCRYPT_NO_SUPPROT = 0x8000001d, ERR_ENCRYPT_NO_SUPPORT = 0x8000001d,
ERR_ENCRYPT_UNINITIALIZED = 0x8000001e, ERR_ENCRYPT_UNINITIALIZED = 0x8000001e,
ERR_ENCRYPT_UNACCEPTABLE = 0x8000001f, ERR_ENCRYPT_UNACCEPTABLE = 0x8000001f,
ERR_ENCRYPT_INVALID = 0x80000020, ERR_ENCRYPT_INVALID = 0x80000020,
ERR_NO_COMMON_ENCRYPT = 0x80000021, ERR_NO_COMMON_ENCRYPT = 0x80000021,
ERR_CHANNEL_DESTROYED = 0x80000022, ERR_CHANNEL_DESTROYED = 0x80000022,
ERR_CHANNEL_REDIRECTED = 0x80000023 ERR_CHANNEL_REDIRECTED = 0x80000023
}; };
/* 8.3.1.2 Connection/disconnection errors */ /* 8.3.1.2 Connection/disconnection errors */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 mw_message.h   mw_message.h 
skipping to change at line 38 skipping to change at line 38
mwMsgAdmin) into a pointer to a mwMessage */ mwMsgAdmin) into a pointer to a mwMessage */
#define MW_MESSAGE(msg) (&msg->head) #define MW_MESSAGE(msg) (&msg->head)
/** Indicates the type of a message. */ /** Indicates the type of a message. */
enum mwMessageType { enum mwMessageType {
mwMessage_HANDSHAKE = 0x0000, /**< mwMsgHandshake */ mwMessage_HANDSHAKE = 0x0000, /**< mwMsgHandshake */
mwMessage_HANDSHAKE_ACK = 0x8000, /**< mwMsgHandshakeAck */ mwMessage_HANDSHAKE_ACK = 0x8000, /**< mwMsgHandshakeAck */
mwMessage_LOGIN = 0x0001, /**< mwMsgLogin */ mwMessage_LOGIN = 0x0001, /**< mwMsgLogin */
mwMessage_LOGIN_ACK = 0x8001, /**< mwMsgLoginAck */ mwMessage_LOGIN_ACK = 0x8001, /**< mwMsgLoginAck */
mwMessage_LOGIN_REDIRECT = 0x0018, /**< mwMsgLoginRedirect */ mwMessage_LOGIN_REDIRECT = 0x0018, /**< mwMsgLoginRedirect */
mwMessage_LOGIN_CONTINUE = 0x0016, /**< mwMsgLoginContinue */
#if 0
/* is this message really 0x19 ? */
mwMessage_LOGIN_CONTINUE = 0x0019, /**< mwMsgLoginContinue */
#endif
mwMessage_CHANNEL_CREATE = 0x0002, /**< mwMsgChannelCreate */ mwMessage_CHANNEL_CREATE = 0x0002, /**< mwMsgChannelCreate */
mwMessage_CHANNEL_DESTROY = 0x0003, /**< mwMsgChannelDestroy */ mwMessage_CHANNEL_DESTROY = 0x0003, /**< mwMsgChannelDestroy */
mwMessage_CHANNEL_SEND = 0x0004, /**< mwMsgChannelSend */ mwMessage_CHANNEL_SEND = 0x0004, /**< mwMsgChannelSend */
mwMessage_CHANNEL_ACCEPT = 0x0006, /**< mwMsgChannelAccept */ mwMessage_CHANNEL_ACCEPT = 0x0006, /**< mwMsgChannelAccept */
mwMessage_SET_USER_STATUS = 0x0009, /**< mwMsgSetUserStatus */ mwMessage_SET_USER_STATUS = 0x0009, /**< mwMsgSetUserStatus */
mwMessage_SET_PRIVACY_LIST = 0x0010, /**< mwMsgSetPrivacyList */ mwMessage_SET_PRIVACY_LIST = 0x0010, /**< mwMsgSetPrivacyList */
mwMessage_SENSE_SERVICE = 0x0011, /**< mwMsgSenseService */ mwMessage_SENSE_SERVICE = 0x0011, /**< mwMsgSenseService */
mwMessage_ADMIN = 0x0019, /**< mwMsgAdmin */ mwMessage_ADMIN = 0x0019, /**< mwMsgAdmin */
skipping to change at line 132 skipping to change at line 128
/* 8.4.1.4 LoginAck */ /* 8.4.1.4 LoginAck */
struct mwMsgLoginAck { struct mwMsgLoginAck {
struct mwMessage head; struct mwMessage head;
struct mwLoginInfo login; struct mwLoginInfo login;
struct mwPrivacyInfo privacy; struct mwPrivacyInfo privacy;
struct mwUserStatus status; struct mwUserStatus status;
}; };
/* 8.4.1.5 LoginCont */
struct mwMsgLoginContinue {
struct mwMessage head;
};
/* 8.4.1.6 AuthPassed */ /* 8.4.1.6 AuthPassed */
struct mwMsgLoginRedirect { struct mwMsgLoginRedirect {
struct mwMessage head; struct mwMessage head;
char *host; char *host;
char *server_id; char *server_id;
}; };
/* 8.4.1.7 CreateCnl */ /* 8.4.1.7 CreateCnl */
 End of changes. 2 change blocks. 
5 lines changed or deleted 7 lines changed or added


 mw_session.h   mw_session.h 
skipping to change at line 26 skipping to change at line 26
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _MW_SESSION_H #ifndef _MW_SESSION_H
#define _MW_SESSION_H #define _MW_SESSION_H
#include "mw_common.h" #include "mw_common.h"
struct mwCipher;
struct mwMessage;
/** @file mw_session.h /** @file mw_session.h
... ...
*/ */
#ifndef PROTOCOL_VERSION_MAJOR /** default protocol major version */
/** protocol versioning. */ #define MW_PROTOCOL_VERSION_MAJOR 0x001e
#define PROTOCOL_VERSION_MAJOR 0x001e
#endif
#ifndef PROTOCOL_VERSION_MINOR /** default protocol minor version */
/** protocol versioning. */ #define MW_PROTOCOL_VERSION_MINOR 0x001d
#define PROTOCOL_VERSION_MINOR 0x001d
#endif
/** @section Session Properties /** @section Session Properties
... ...
*/ */
/*@{*/ /*@{*/
/** char *, session user ID */ /** char *, session user ID */
#define PROPERTY_SESSION_USER_ID "session.auth.user" #define mwSession_AUTH_USER_ID "session.auth.user"
/** char *, plaintext password */ /** char *, plaintext password */
#define PROPERTY_SESSION_PASSWORD "session.auth.password" #define mwSession_AUTH_PASSWORD "session.auth.password"
/** struct mwOpaque *, authentication token */ /** struct mwOpaque *, authentication token */
#define PROPERTY_SESSION_TOKEN "session.auth.token" #define mwSession_AUTH_TOKEN "session.auth.token"
/** guint16, major version of client protocol */ /** guint16, major version of client protocol */
#define PROPERTY_CLIENT_VER_MAJOR "client.version.major" #define mwSession_CLIENT_VER_MAJOR "client.version.major"
/** guint16, minor version of client protocol */ /** guint16, minor version of client protocol */
#define PROPERTY_CLIENT_VER_MINOR "client.version.minor" #define mwSession_CLIENT_VER_MINOR "client.version.minor"
/** guint16, client type identifier */ /** guint16, client type identifier */
#define PROPERTY_CLIENT_TYPE_ID "client.id" #define mwSession_CLIENT_TYPE_ID "client.id"
/** guint16, major version of server protocol */ /** guint16, major version of server protocol */
#define PROPERTY_SERVER_VER_MAJOR "server.version.major" #define mwSession_SERVER_VER_MAJOR "server.version.major"
/** guint16, minor version of server protocol */ /** guint16, minor version of server protocol */
#define PROPERTY_SERVER_VER_MINOR "server.version.minor" #define mwSession_SERVER_VER_MINOR "server.version.minor"
/*@}*/ /*@}*/
/* place-holders */
struct mwChannelSet;
struct mwCipher;
struct mwService;
struct mwMessage;
/** @file session.h /** @file session.h
A client session with a Sametime server is encapsulated in the A client session with a Sametime server is encapsulated in the
mwSession structure. The session controls channels, provides mwSession structure. The session controls channels, provides
encryption ciphers, and manages services using messages over the encryption ciphers, and manages services using messages over the
Master channel. Master channel.
A session does not directly communicate with a socket or stream, A session does not directly communicate with a socket or stream,
instead the session is initialized from client code with an instead the session is initialized from client code with an
instance of a mwSessionHandler structure. This session handler instance of a mwSessionHandler structure. This session handler
skipping to change at line 109 skipping to change at line 102
mwSession_STARTING, /**< session is starting */ mwSession_STARTING, /**< session is starting */
mwSession_HANDSHAKE, /**< session has sent handshake */ mwSession_HANDSHAKE, /**< session has sent handshake */
mwSession_HANDSHAKE_ACK, /**< session has received handshake ack */ mwSession_HANDSHAKE_ACK, /**< session has received handshake ack */
mwSession_LOGIN, /**< session has sent login */ mwSession_LOGIN, /**< session has sent login */
mwSession_LOGIN_REDIR, /**< session has been redirected */ mwSession_LOGIN_REDIR, /**< session has been redirected */
mwSession_LOGIN_ACK, /**< session has received login ack */ mwSession_LOGIN_ACK, /**< session has received login ack */
mwSession_STARTED, /**< session is active */ mwSession_STARTED, /**< session is active */
mwSession_STOPPING, /**< session is shutting down */ mwSession_STOPPING, /**< session is shutting down */
mwSession_STOPPED, /**< session is stopped */ mwSession_STOPPED, /**< session is stopped */
mwSession_UNKNOWN, /**< indicates an error determining state */ mwSession_UNKNOWN, /**< indicates an error determining state */
mwSession_LOGIN_CONT, /**< session has sent a login continue */
}; };
#define SESSION_IS_STATE(session, state) \ #define mwSession_isState(session, state) \
(mwSession_getState((session)) == (state)) (mwSession_getState((session)) == (state))
#define SESSION_IS_STARTING(s) \ #define mwSession_isStarting(s) \
(SESSION_IS_STATE((s), mwSession_STARTING) || \ (mwSession_isState((s), mwSession_STARTING) || \
SESSION_IS_STATE((s), mwSession_HANDSHAKE) || \ mwSession_isState((s), mwSession_HANDSHAKE) || \
SESSION_IS_STATE((s), mwSession_HANDSHAKE_ACK) || \ mwSession_isState((s), mwSession_HANDSHAKE_ACK) || \
SESSION_IS_STATE((s), mwSession_LOGIN) || \ mwSession_isState((s), mwSession_LOGIN) || \
SESSION_IS_STATE((s), mwSession_LOGIN_ACK)) mwSession_isState((s), mwSession_LOGIN_ACK) || \
mwSession_isState((s), mwSession_LOGIN_REDIR) || \
mwSession_isState((s), mwSession_LOGIN_CONT))
#define SESSION_IS_STARTED(s) \ #define mwSession_isStarted(s) \
(SESSION_IS_STATE((s), mwSession_STARTED)) (mwSession_isState((s), mwSession_STARTED))
#define SESSION_IS_STOPPING(s) \ #define mwSession_isStopping(s) \
(SESSION_IS_STATE((s), mwSession_STOPPING)) (mwSession_isState((s), mwSession_STOPPING))
#define SESSION_IS_STOPPED(s) \ #define mwSession_isStopped(s) \
(SESSION_IS_STATE((s), mwSession_STOPPED)) (mwSession_isState((s), mwSession_STOPPED))
/** @struct mwSession /** @struct mwSession
Represents a Sametime client session */ Represents a Sametime client session */
struct mwSession; struct mwSession;
/** session handler. Structure which interfaces a session with client /** session handler. Structure which interfaces a session with client
code to provide I/O and event handling */ code to provide I/O and event handling */
struct mwSessionHandler { struct mwSessionHandler {
/** write data to the server connection. Required. Should return /** write data to the server connection. Required. Should return
zero for success, non-zero for error */ zero for success, non-zero for error */
int (*io_write)(struct mwSession *, const char *buf, gsize len); int (*io_write)(struct mwSession *, const char *buf, gsize len);
/** close the server connection. Required */ /** close the server connection. Required */
void (*io_close)(struct mwSession *); void (*io_close)(struct mwSession *);
/** triggered by mwSession_free */ /** triggered by mwSession_free. Optional. Put cleanup code here */
void (*clear)(struct mwSession *); void (*clear)(struct mwSession *);
/** Called when the session has changed status. /** Called when the session has changed status.
Uses of the info param: Uses of the info param:
- <code>STOPPING</code> error code causing the session to shut down - <code>STOPPING</code> error code causing the session to shut down
@todo change info to a gpointer
@param s the session @param s the session
@param state the session's state @param state the session's state
@param info additional state info. */ @param info additional state info. */
void (*on_stateChange)(struct mwSession *s, void (*on_stateChange)(struct mwSession *s,
enum mwSessionState state, guint32 info); enum mwSessionState state, guint32 info);
/** called when privacy information has been sent or received */ /** called when privacy information has been sent or received
@see mwSession_getPrivacyInfo
*/
void (*on_setPrivacyInfo)(struct mwSession *); void (*on_setPrivacyInfo)(struct mwSession *);
/** called when user status has changed */ /** called when user status has changed
@see mwSession_getUserStatus */
void (*on_setUserStatus)(struct mwSession *); void (*on_setUserStatus)(struct mwSession *);
/** called when an admin messages has been received */ /** called when an admin messages has been received */
void (*on_admin)(struct mwSession *, const char *text); void (*on_admin)(struct mwSession *, const char *text);
/** called when a login redirect message is received */ /** called when a login redirect message is received
@todo remove in favour of on_stateChange, passing host as a
gpointer in info */
void (*on_loginRedirect)(struct mwSession *, const char *host); void (*on_loginRedirect)(struct mwSession *, const char *host);
}; };
/** allocate a new session */ /** allocate a new session */
struct mwSession *mwSession_new(struct mwSessionHandler *); struct mwSession *mwSession_new(struct mwSessionHandler *);
/** stop, clear, free a session. Does not free contained ciphers or /** stop, clear, free a session. Does not free contained ciphers or
services, these must be taken care of explicitly. */ services, these must be taken care of explicitly. */
void mwSession_free(struct mwSession *); void mwSession_free(struct mwSession *);
skipping to change at line 203 skipping to change at line 209
/** primarily used by services to have messages serialized and sent /** primarily used by services to have messages serialized and sent
@param s session to send message over @param s session to send message over
@param msg message to serialize and send @param msg message to serialize and send
@returns 0 for success */ @returns 0 for success */
int mwSession_send(struct mwSession *s, struct mwMessage *msg); int mwSession_send(struct mwSession *s, struct mwMessage *msg);
/** sends the keepalive byte */ /** sends the keepalive byte */
int mwSession_sendKeepalive(struct mwSession *s); int mwSession_sendKeepalive(struct mwSession *s);
/** respond to a login redirect message by forcing the login sequence
to continue through the immediate server. */
int mwSession_forceLogin(struct mwSession *s);
/** set the internal privacy information, and inform the server as /** set the internal privacy information, and inform the server as
necessary. Triggers the on_setPrivacyInfo call-back. Not yet necessary. Triggers the on_setPrivacyInfo call-back. Not yet
implemented */ implemented */
int mwSession_setPrivacyInfo(struct mwSession *, struct mwPrivacyInfo *); int mwSession_setPrivacyInfo(struct mwSession *, struct mwPrivacyInfo *);
struct mwPrivacyInfo *mwSession_getPrivacyInfo(struct mwSession *); struct mwPrivacyInfo *mwSession_getPrivacyInfo(struct mwSession *);
/** reference the login information for the session */ /** reference the login information for the session */
struct mwLoginInfo *mwSession_getLoginInfo(struct mwSession *); struct mwLoginInfo *mwSession_getLoginInfo(struct mwSession *);
 End of changes. 24 change blocks. 
39 lines changed or deleted 49 lines changed or added


 mw_srvc_aware.h   mw_srvc_aware.h 
skipping to change at line 26 skipping to change at line 26
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _MW_SRVC_AWARE_H #ifndef _MW_SRVC_AWARE_H
#define _MW_SRVC_AWARE_H #define _MW_SRVC_AWARE_H
#include "mw_common.h" #include "mw_common.h"
/** @file mw_srvc_aware.h
The aware service...
*/
/** Type identifier for the aware service */ /** Type identifier for the aware service */
#define SERVICE_AWARE 0x00000011 #define SERVICE_AWARE 0x00000011
/** @struct mwServiceAware /** @struct mwServiceAware
Instance of an Aware Service. The members of this structure are Instance of an Aware Service. The members of this structure are
not made available. Accessing the parts of an aware service should not made available. Accessing the parts of an aware service should
be performed through the appropriate functions. Note that be performed through the appropriate functions. Note that
instances of this structure can be safely cast to a mwService. instances of this structure can be safely cast to a mwService.
*/ */
skipping to change at line 48 skipping to change at line 53
/** @struct mwAwareList /** @struct mwAwareList
Instance of an Aware List. The members of this structure are not Instance of an Aware List. The members of this structure are not
made available. Access to the parts of an aware list should be made available. Access to the parts of an aware list should be
handled through the appropriate functions. handled through the appropriate functions.
*/ */
struct mwAwareList; struct mwAwareList;
/** @struct mwAwareAttribute /** @struct mwAwareAttribute
Key/Value pair indicating an identity's attribute. Key/Opaque pair indicating an identity's attribute.
*/ */
struct mwAwareAttribute; struct mwAwareAttribute;
/** Predefined keys appropriate for a mwAwareAttribute /** Predefined keys appropriate for a mwAwareAttribute
*/ */
enum mwAwareAttributeKeys { enum mwAwareAttributeKeys {
mwAttribute_AV_PREFS_SET = 0x01, /**< A/V prefs specified, gboolean */ mwAttribute_AV_PREFS_SET = 0x01, /**< A/V prefs specified, gboolean */
mwAttribute_MICROPHONE = 0x02, /**< has a microphone, gboolean */ mwAttribute_MICROPHONE = 0x02, /**< has a microphone, gboolean */
mwAttribute_SPEAKERS = 0x03, /**< has speakers, gboolean */ mwAttribute_SPEAKERS = 0x03, /**< has speakers, gboolean */
mwAttribute_VIDEO_CAMERA = 0x04, /**< has a video camera, gboolean */ mwAttribute_VIDEO_CAMERA = 0x04, /**< has a video camera, gboolean */
skipping to change at line 101 skipping to change at line 106
struct mwAwareIdBlock *id, struct mwAwareIdBlock *id,
struct mwAwareAttribute *attrib); struct mwAwareAttribute *attrib);
struct mwAwareListHandler { struct mwAwareListHandler {
/** handle aware updates */ /** handle aware updates */
mwAwareSnapshotHandler on_aware; mwAwareSnapshotHandler on_aware;
/** handle attribute updates */ /** handle attribute updates */
mwAwareIdAttributeHandler on_attrib; mwAwareIdAttributeHandler on_attrib;
/** optiona. Called from mwAwareList_free */ /** optional. Called from mwAwareList_free */
void (*clear)(struct mwAwareList *list); void (*clear)(struct mwAwareList *list);
}; };
struct mwServiceAware * struct mwServiceAware *
mwServiceAware_new(struct mwSession *session, mwServiceAware_new(struct mwSession *session,
struct mwAwareHandler *handler); struct mwAwareHandler *handler);
/** Set an attribute value for this session */
int mwServiceAware_setAttribute(struct mwServiceAware *srvc, int mwServiceAware_setAttribute(struct mwServiceAware *srvc,
struct mwAwareAttribute *attrib); guint32 key, struct mwOpaque *opaque);
int mwServiceAware_deleteAttribute(struct mwServiceAware *srvc, int mwServiceAware_setAttributeBoolean(struct mwServiceAware *srvc,
guint32 key); guint32 key, gboolean val);
struct mwAwareAttribute * int mwServiceAware_setAttributeInteger(struct mwServiceAware *srvc,
mwAwareAttribute_newBoolean(guint32 key, gboolean val); guint32 key, guint32 val);
struct mwAwareAttribute * int mwServiceAware_setAttributeString(struct mwServiceAware *srvc,
mwAwareAttribute_newInteger(guint32 key, guint32 val); guint32 key, const char *str);
struct mwAwareAttribute * /** Unset an attribute for this session */
mwAwareAttribute_newString(guint32 key, const char *str); int mwServiceAware_unsetAttribute(struct mwServiceAware *srvc,
guint32 key);
guint32 mwAwareAttribute_getKey(struct mwAwareAttribute *attrib); guint32 mwAwareAttribute_getKey(const struct mwAwareAttribute *attrib);
gboolean mwAwareAttribute_asBoolean(struct mwAwareAttribute *attrib); gboolean mwAwareAttribute_asBoolean(const struct mwAwareAttribute *attrib);
guint32 mwAwareAttribute_asInteger(struct mwAwareAttribute *attrib); guint32 mwAwareAttribute_asInteger(const struct mwAwareAttribute *attrib);
char *mwAwareAttribute_asString(struct mwAwareAttribute *attrib); /** Copy of attribute string, must be g_free'd. If the attribute's
content cannot be loaded as a string, returns NULL */
char *mwAwareAttribute_asString(const struct mwAwareAttribute *attrib);
void mwAwareAttribute_free(struct mwAwareAttribute *attrib); /** Direct access to an attribute's underlying opaque */
const struct mwOpaque *
mwAwareAttribute_asOpaque(const struct mwAwareAttribute *attrib);
/** Allocate and initialize an aware list */ /** Allocate and initialize an aware list */
struct mwAwareList * struct mwAwareList *
mwAwareList_new(struct mwServiceAware *srvc, mwAwareList_new(struct mwServiceAware *srvc,
struct mwAwareListHandler *handler); struct mwAwareListHandler *handler);
/** Clean and free an aware list */ /** Clean and free an aware list */
void mwAwareList_free(struct mwAwareList *list); void mwAwareList_free(struct mwAwareList *list);
struct mwAwareListHandler *mwAwareList_getHandler(struct mwAwareList *list) ; struct mwAwareListHandler *mwAwareList_getHandler(struct mwAwareList *list) ;
skipping to change at line 158 skipping to change at line 169
*/ */
int mwAwareList_addAware(struct mwAwareList *list, GList *id_list); int mwAwareList_addAware(struct mwAwareList *list, GList *id_list);
/** Remove a collection of user IDs from an aware list. /** Remove a collection of user IDs from an aware list.
@param list mwAwareList to remove user ID from @param list mwAwareList to remove user ID from
@param id_list mwAwareIdBlock list of user IDs to remove @param id_list mwAwareIdBlock list of user IDs to remove
@return 0 for success, non-zero to indicate an error. @return 0 for success, non-zero to indicate an error.
*/ */
int mwAwareList_removeAware(struct mwAwareList *list, GList *id_list); int mwAwareList_removeAware(struct mwAwareList *list, GList *id_list);
int mwAwareList_removeAllAware(struct mwAwareList *list);
/** watch an NULL terminated array of keys */
int mwAwareList_watchAttributeArray(struct mwAwareList *list,
guint32 *keys);
/** watch a NULL terminated list of keys */
int mwAwareList_watchAttributes(struct mwAwareList *list,
guint32 key, ...);
/** stop watching a NULL terminated array of keys */
int mwAwareList_unwatchAttributeArray(struct mwAwareList *list,
guint32 *keys);
/** stop watching a NULL terminated list of keys */
int mwAwareList_unwatchAttributes(struct mwAwareList *list,
guint32 key, ...);
/** remove all watched attributes */
int mwAwareList_unwatchAllAttributes(struct mwAwareList *list);
guint32 *mwAwareList_getWatchedAttributes(struct mwAwareList *list);
void mwAwareList_setClientData(struct mwAwareList *list, void mwAwareList_setClientData(struct mwAwareList *list,
gpointer data, GDestroyNotify cleanup); gpointer data, GDestroyNotify cleanup);
void mwAwareList_removeClientData(struct mwAwareList *list); void mwAwareList_removeClientData(struct mwAwareList *list);
gpointer mwAwareList_getClientData(struct mwAwareList *list); gpointer mwAwareList_getClientData(struct mwAwareList *list);
/** trigger a got_aware event constructed from the passed user and /** trigger a got_aware event constructed from the passed user and
status information. Useful for adding false users and having the status information. Useful for adding false users and having the
getText function work for them */ getText function work for them */
void mwServiceAware_setStatus(struct mwServiceAware *srvc, void mwServiceAware_setStatus(struct mwServiceAware *srvc,
struct mwAwareIdBlock *user, struct mwAwareIdBlock *user,
struct mwUserStatus *stat); struct mwUserStatus *stat);
/** look up the status description for a user */ /** look up the status description for a user */
const char *mwServiceAware_getText(struct mwServiceAware *srvc, const char *mwServiceAware_getText(struct mwServiceAware *srvc,
struct mwAwareIdBlock *user); struct mwAwareIdBlock *user);
/** look up the last known copy of an attribute for a user by the
attribute's key */
const struct mwAwareAttribute *
mwServiceAware_getAttribute(struct mwServiceAware *srvc,
struct mwAwareIdBlock *user,
guint32 key);
#endif #endif
 End of changes. 16 change blocks. 
16 lines changed or deleted 57 lines changed or added


 mw_srvc_im.h   mw_srvc_im.h 
skipping to change at line 28 skipping to change at line 28
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef _MW_SRVC_IM_H #ifndef _MW_SRVC_IM_H
#define _MW_SRVC_IM_H #define _MW_SRVC_IM_H
#include <glib.h> #include <glib.h>
#include "mw_common.h" #include "mw_common.h"
/** @file srvc_im.h /** @file srvc_im.h
The IM service provides one-on-one communication between
users. Messages sent over conversations may relay different types
of information, in a variety of formats. The basic feature-set
provides plain-text chat with typing notification. More complex
features may be negotiated transparently by setting the IM Client
Type for a conversation, or for the service as a whole.
*/ */
/** Type identifier for the IM service */ /** Type identifier for the IM service */
#define SERVICE_IM 0x00001000 #define SERVICE_IM 0x00001000
/** @struct mwServiceIm /** @struct mwServiceIm
An instance of the IM service. This service provides simple An instance of the IM service. This service provides simple
instant messaging functionality */ instant messaging functionality */
struct mwServiceIm; struct mwServiceIm;
skipping to change at line 69 skipping to change at line 76
@relates mwServiceIm_setSupported @relates mwServiceIm_setSupported
@relates mwConversation_supports @relates mwConversation_supports
@relates mwConversation_send @relates mwConversation_send
@relates mwServiceImHandler::conversation_recv @relates mwServiceImHandler::conversation_recv
*/ */
enum mwImSendType { enum mwImSendType {
mwImSend_PLAIN, /**< char *, plain-text message */ mwImSend_PLAIN, /**< char *, plain-text message */
mwImSend_TYPING, /**< gboolean, typing status */ mwImSend_TYPING, /**< gboolean, typing status */
mwImSend_HTML, /**< char *, HTML formatted message (NOTESBUDDY) */ mwImSend_HTML, /**< char *, HTML formatted message (NOTESBUDDY) */
mwImSend_SUBJECT, /**< char *, conversation subject (NOTESBUDDY) */ mwImSend_SUBJECT, /**< char *, conversation subject (NOTESBUDDY) */
mwImSend_MIME, /**< mwOpaque *, MIME-encoded message (NOTESBUDDY) */ mwImSend_MIME, /**< char *, MIME-encoded message (NOTESBUDDY) */
}; };
/** @relates mwConversation_getState /** @relates mwConversation_getState */
@relates MW_CONVO_IS_CLOSED
@relates MW_CONVO_IS_PENDING
@relates MW_CONVO_IS_OPEN */
enum mwConversationState { enum mwConversationState {
mwConversation_CLOSED, /**< conversation is not open */ mwConversation_CLOSED, /**< conversation is not open */
mwConversation_PENDING, /**< conversation is opening */ mwConversation_PENDING, /**< conversation is opening */
mwConversation_OPEN, /**< conversation is open */ mwConversation_OPEN, /**< conversation is open */
mwConversation_UNKNOWN, /**< unknown state */ mwConversation_UNKNOWN, /**< unknown state */
}; };
#define MW_CONVO_IS_STATE(conv, state) \ #define mwConversation_isState(conv, state) \
(mwConversation_getState(conv) == (state)) (mwConversation_getState(conv) == (state))
#define MW_CONVO_IS_CLOSED(conv) \ #define mwConversation_isClosed(conv) \
MW_CONVO_IS_STATE((conv), mwConversation_CLOSED) mwConversation_isState((conv), mwConversation_CLOSED)
#define MW_CONVO_IS_PENDING(conv) \ #define mwConversation_isPending(conv) \
MW_CONVO_IS_STATE((conv), mwConversation_PENDING) mwConversation_isState((conv), mwConversation_PENDING)
#define MW_CONVO_IS_OPEN(conv) \ #define mwConversation_isOpen(conv) \
MW_CONVO_IS_STATE((conv), mwConversation_OPEN) mwConversation_isState((conv), mwConversation_OPEN)
/** IM Service Handler. Provides functions for events triggered from an /** IM Service Handler. Provides functions for events triggered from an
IM service instance. */ IM service instance. */
struct mwImHandler { struct mwImHandler {
/** A conversation has been successfully opened */ /** A conversation has been successfully opened */
void (*conversation_opened)(struct mwConversation *conv); void (*conversation_opened)(struct mwConversation *conv);
/** A conversation has been closed */ /** A conversation has been closed */
void (*conversation_closed)(struct mwConversation *conv, guint32 err); void (*conversation_closed)(struct mwConversation *conv, guint32 err);
skipping to change at line 163 skipping to change at line 167
void mwConversation_close(struct mwConversation *conv, guint32 err); void mwConversation_close(struct mwConversation *conv, guint32 err);
/** determine whether a conversation supports the given message type */ /** determine whether a conversation supports the given message type */
gboolean mwConversation_supports(struct mwConversation *conv, gboolean mwConversation_supports(struct mwConversation *conv,
enum mwImSendType type); enum mwImSendType type);
enum mwImClientType mwConversation_getClientType(struct mwConversation *con v); enum mwImClientType mwConversation_getClientType(struct mwConversation *con v);
/** get the state of a conversation /** get the state of a conversation
@relates MW_CONVO_IS_OPEN @relates mwConversation_isOpen
@relates MW_CONVO_IS_CLOSED @relates mwConversation_isClosed
@relates MW_CONVO_IS_PENDING @relates mwConversation_isPending
*/ */
enum mwConversationState mwConversation_getState(struct mwConversation *con v); enum mwConversationState mwConversation_getState(struct mwConversation *con v);
/** send a message over an open conversation */ /** send a message over an open conversation */
int mwConversation_send(struct mwConversation *conv, int mwConversation_send(struct mwConversation *conv,
enum mwImSendType type, gconstpointer send); enum mwImSendType type, gconstpointer send);
/** @returns owning service for a conversation */ /** @returns owning service for a conversation */
struct mwServiceIm *mwConversation_getService(struct mwConversation *conv); struct mwServiceIm *mwConversation_getService(struct mwConversation *conv);
skipping to change at line 192 skipping to change at line 196
/** set whether outgoing messages should be encrypted using the /** set whether outgoing messages should be encrypted using the
negotiated cipher, if any */ negotiated cipher, if any */
void mwConversation_setEncrypted(struct mwConversation *conv, void mwConversation_setEncrypted(struct mwConversation *conv,
gboolean useCipher); gboolean useCipher);
/** determine whether outgoing messages are being encrypted */ /** determine whether outgoing messages are being encrypted */
gboolean mwConversation_isEncrypted(struct mwConversation *conv); gboolean mwConversation_isEncrypted(struct mwConversation *conv);
/** Associates client data with a conversation. If there is existing data, /** Associates client data with a conversation. If there is existing data,
it will not have its cleanup function called. */ it will not have its cleanup function called.
@relates mwConversation_getClientData
@relates mwConversation_removeClientData
*/
void mwConversation_setClientData(struct mwConversation *conv, void mwConversation_setClientData(struct mwConversation *conv,
gpointer data, GDestroyNotify clean); gpointer data, GDestroyNotify clean);
/** Reference associated client data */ /** Reference associated client data
@relates mwConversation_setClientData
@relates mwConversation_removeClientData
*/
gpointer mwConversation_getClientData(struct mwConversation *conv); gpointer mwConversation_getClientData(struct mwConversation *conv);
/** Remove any associated client data, calling the optional cleanup
function if one was provided
@relates mwConversation_setClientData
@relates mwConversation_getClientData
*/
void mwConversation_removeClientData(struct mwConversation *conv); void mwConversation_removeClientData(struct mwConversation *conv);
/** close and destroy the conversation and its backing channel, and /** close and destroy the conversation and its backing channel, and
call the optional client data cleanup function */ call the optional client data cleanup function */
void mwConversation_free(struct mwConversation *conv); void mwConversation_free(struct mwConversation *conv);
#endif #endif
 End of changes. 11 change blocks. 
17 lines changed or deleted 35 lines changed or added


 mw_st_list.h   mw_st_list.h 
skipping to change at line 33 skipping to change at line 33
#include <glib.h> #include <glib.h>
#include <glib/glist.h> #include <glib/glist.h>
#include "mw_common.h" #include "mw_common.h"
#define ST_LIST_MAJOR 3 #define ST_LIST_MAJOR 3
#define ST_LIST_MINOR 1 #define ST_LIST_MINOR 1
#define ST_LIST_MICRO 3 #define ST_LIST_MICRO 3
enum mwSametimeGroupType { enum mwSametimeGroupType {
mwSametimeGroup_NORMAL, /**< a normal group of users */ mwSametimeGroup_NORMAL = 1, /**< a normal group of users */
mwSametimeGroup_DYNAMIC, /**< a server-side group */ mwSametimeGroup_DYNAMIC = 2, /**< a server-side group */
mwSametimeGroup_UNKNOWN, /**< error determining group type */ mwSametimeGroup_UNKNOWN = 0, /**< error determining group type */
}; };
enum mwSametimeUserType { enum mwSametimeUserType {
mwSametimeUser_NORMAL, /**< user on same community */ mwSametimeUser_NORMAL = 1, /**< user on same community */
mwSametimeUser_EXTERNAL, /**< external user */ mwSametimeUser_EXTERNAL = 2, /**< external user */
mwSametimeUser_UNKNOWN, /**< error determining user type */ mwSametimeUser_UNKNOWN = 0, /**< error determining user type */
}; };
/** @struct mwSametimeList /** @struct mwSametimeList
Represents a group-based buddy list. */ Represents a group-based buddy list. */
struct mwSametimeList; struct mwSametimeList;
/** @struct mwSametimeGroup /** @struct mwSametimeGroup
Represents a group in a buddy list */ Represents a group in a buddy list */
 End of changes. 2 change blocks. 
6 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/