46 #define mwService_IM 0x00001000
104 #define mwConversation_isState(conv, state) \
105 (mwConversation_getState(conv) == (state))
107 #define mwConversation_isClosed(conv) \
108 mwConversation_isState((conv), mwConversation_CLOSED)
110 #define mwConversation_isPending(conv) \
111 mwConversation_isState((conv), mwConversation_PENDING)
113 #define mwConversation_isOpen(conv) \
114 mwConversation_isState((conv), mwConversation_OPEN)
136 const char *title,
const char *name);
246 gpointer data, GDestroyNotify clean);
Definition: mw_common.h:123
unknown state
Definition: mw_srvc_im.h:100
struct mwLoginInfo * mwConversation_getTargetInfo(struct mwConversation *conv)
login information for conversation partner.
void mwConversation_setClientData(struct mwConversation *conv, gpointer data, GDestroyNotify clean)
Associates client data with a conversation.
void mwConversation_free(struct mwConversation *conv)
close and destroy the conversation and its backing channel, and call the optional client data cleanup...
void mwConversation_setEncrypted(struct mwConversation *conv, gboolean useCipher)
set whether outgoing messages should be encrypted using the negotiated cipher, if any ...
conversation is not open
Definition: mw_srvc_im.h:97
char *, YYYY:MM:DD:HH:mm:SS format (NOTESBUDDY)
Definition: mw_srvc_im.h:90
An instance of the IM service.
gboolean mwServiceIm_supports(struct mwServiceIm *srvc, enum mwImSendType type)
determine if the conversations created from this service will support a given send type ...
struct mwConversation * mwServiceIm_findConversation(struct mwServiceIm *srvc, struct mwIdBlock *target)
reference an existing conversation to target
char *, HTML formatted message (NOTESBUDDY)
Definition: mw_srvc_im.h:87
mwImClientType
Definition: mw_srvc_im.h:62
void(* clear)(struct mwServiceIm *srvc)
optional.
Definition: mw_srvc_im.h:139
enum mwImClientType mwServiceIm_getClientType(struct mwServiceIm *srvc)
conversation is opening
Definition: mw_srvc_im.h:98
char *, plain-text message
Definition: mw_srvc_im.h:85
Represents a Sametime client session.
mwImSendType
Types of supported messages.
Definition: mw_srvc_im.h:84
Definition: mw_common.h:178
struct mwServiceIm * mwServiceIm_new(struct mwSession *session, struct mwImHandler *handler)
Common data types and functions for handling those types.
adds html, subject, mime
Definition: mw_srvc_im.h:64
char *, conversation subject (NOTESBUDDY)
Definition: mw_srvc_im.h:88
trouble determining type
Definition: mw_srvc_im.h:66
struct mwSession * session
session this service is attached to.
Definition: mw_service.h:139
conversation is open
Definition: mw_srvc_im.h:99
void mwConversation_removeClientData(struct mwConversation *conv)
Remove any associated client data, calling the optional cleanup function if one was provided...
gpointer mwConversation_getClientData(struct mwConversation *conv)
Reference associated client data.
struct mwImHandler * mwServiceIm_getHandler(struct mwServiceIm *srvc)
gboolean, typing status
Definition: mw_srvc_im.h:86
void(* conversation_recv)(struct mwConversation *conv, enum mwImSendType type, gconstpointer msg)
A message has been received on a conversation.
Definition: mw_srvc_im.h:129
void mwServiceIm_setClientType(struct mwServiceIm *srvc, enum mwImClientType type)
Set the default client type for the service.
void(* conversation_opened)(struct mwConversation *conv)
A conversation has been successfully opened.
Definition: mw_srvc_im.h:123
gboolean mwConversation_supports(struct mwConversation *conv, enum mwImSendType type)
determine whether a conversation supports the given message type
struct mwIdBlock * mwConversation_getTarget(struct mwConversation *conv)
ID for conversation partner.
enum mwImClientType mwConversation_getClientType(struct mwConversation *conv)
IM Service Handler.
Definition: mw_srvc_im.h:120
void(* place_invite)(struct mwConversation *conv, const char *message, const char *title, const char *name)
Handle a Place invitation.
Definition: mw_srvc_im.h:134
char *, MIME-encoded message (NOTESBUDDY)
Definition: mw_srvc_im.h:89
void mwConversation_open(struct mwConversation *conv)
attempt to open a conversation.
struct mwServiceIm * mwConversation_getService(struct mwConversation *conv)
void mwConversation_close(struct mwConversation *conv, guint32 err)
close a conversation.
enum mwConversationState mwConversation_getState(struct mwConversation *conv)
get the state of a conversation
A conversation between the local service and a single other user.
Definition: mw_srvc_im.h:53
gboolean mwConversation_isEncrypted(struct mwConversation *conv)
determine whether outgoing messages are being encrypted
text, typing
Definition: mw_srvc_im.h:63
struct mwConversation * mwServiceIm_getConversation(struct mwServiceIm *srvc, struct mwIdBlock *target)
reference an existing conversation to target, or create a new conversation to target if one does not ...
pre-conference, legacy
Definition: mw_srvc_im.h:65
int mwConversation_send(struct mwConversation *conv, enum mwImSendType type, gconstpointer send)
send a message over an open conversation
void(* conversation_closed)(struct mwConversation *conv, guint32 err)
A conversation has been closed.
Definition: mw_srvc_im.h:126
mwConversationState
Definition: mw_srvc_im.h:96