#include <glib.h>
#include "mw_common.h"
Go to the source code of this file.
Data Structures | |
| struct | mwImHandler |
| IM Service Handler. More... | |
Defines | |
| #define | mwConversation_isClosed(conv) mwConversation_isState((conv), mwConversation_CLOSED) |
| #define | mwConversation_isOpen(conv) mwConversation_isState((conv), mwConversation_OPEN) |
| #define | mwConversation_isPending(conv) mwConversation_isState((conv), mwConversation_PENDING) |
| #define | mwConversation_isState(conv, state) (mwConversation_getState(conv) == (state)) |
| #define | SERVICE_IM 0x00001000 |
| Type identifier for the IM service. | |
Enumerations | |
| enum | mwConversationState { mwConversation_CLOSED, mwConversation_PENDING, mwConversation_OPEN, mwConversation_UNKNOWN } |
| enum | mwImClientType { mwImClient_PLAIN = 0x00000001, mwImClient_NOTESBUDDY = 0x00033453, mwImClient_PRECONF = 0x00000019, mwImClient_UNKNOWN = 0xffffffff } |
| enum | mwImSendType { mwImSend_PLAIN, mwImSend_TYPING, mwImSend_HTML, mwImSend_SUBJECT, mwImSend_MIME } |
| Types of supported messages. More... | |
Functions | |
| void | mwConversation_close (struct mwConversation *conv, guint32 err) |
| close a conversation. | |
| void | mwConversation_free (struct mwConversation *conv) |
| close and destroy the conversation and its backing channel, and call the optional client data cleanup function | |
| enum mwImClientType | mwConversation_getClientType (struct mwConversation *conv) |
| mwServiceIm * | mwConversation_getService (struct mwConversation *conv) |
| mwIdBlock * | mwConversation_getTarget (struct mwConversation *conv) |
| ID for conversation partner. | |
| mwLoginInfo * | mwConversation_getTargetInfo (struct mwConversation *conv) |
| login information for conversation partner. | |
| gboolean | mwConversation_isEncrypted (struct mwConversation *conv) |
| determine whether outgoing messages are being encrypted | |
| void | mwConversation_open (struct mwConversation *conv) |
| attempt to open a conversation. | |
| int | mwConversation_send (struct mwConversation *conv, enum mwImSendType type, gconstpointer send) |
| send a message over an open conversation | |
| void | mwConversation_setEncrypted (struct mwConversation *conv, gboolean useCipher) |
| set whether outgoing messages should be encrypted using the negotiated cipher, if any | |
| gboolean | mwConversation_supports (struct mwConversation *conv, enum mwImSendType type) |
| determine whether a conversation supports the given message type | |
| mwConversation * | mwServiceIm_findConversation (struct mwServiceIm *srvc, struct mwIdBlock *target) |
| reference an existing conversation to target | |
| enum mwImClientType | mwServiceIm_getClientType (struct mwServiceIm *srvc) |
| 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 already exist | |
| mwImHandler * | mwServiceIm_getHandler (struct mwServiceIm *srvc) |
| mwServiceIm * | mwServiceIm_new (struct mwSession *session, struct mwImHandler *handler) |
| void | mwServiceIm_setClientType (struct mwServiceIm *srvc, enum mwImClientType type) |
| Set the default client type for the service. | |
| gboolean | mwServiceIm_supports (struct mwServiceIm *srvc, enum mwImSendType type) |
| determine if the conversations created from this service will support a given send type | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Type identifier for the IM service.
|
|
|
|
|
|
|
|
|
Types of supported messages. When a conversation is created, the least common denominator of features between either side of the conversation (based on what features are available in the IM service itself) becomes the set of supported features for that conversation. At any point, the feature set for the service may change, without affecting any existing conversations. |
|
||||||||||||
|
close a conversation. If the conversation was not already closed, mwServiceImHandler::conversation_closed will be triggered |
|
|
close and destroy the conversation and its backing channel, and call the optional client data cleanup function
|
|
|
|
|
|
|
|
|
ID for conversation partner.
|
|
|
login information for conversation partner. returns NULL if conversation is not OPEN |
|
|
determine whether outgoing messages are being encrypted
|
|
|
attempt to open a conversation. If the conversation was not already open and it is accepted, mwServiceImHandler::conversation_opened will be triggered. Upon failure, mwServiceImHandler::conversation_closed will be triggered |
|
||||||||||||||||
|
send a message over an open conversation
|
|
||||||||||||
|
set whether outgoing messages should be encrypted using the negotiated cipher, if any
|
|
||||||||||||
|
determine whether a conversation supports the given message type
|
|
||||||||||||
|
reference an existing conversation to target
|
|
|
|
|
||||||||||||
|
reference an existing conversation to target, or create a new conversation to target if one does not already exist
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Set the default client type for the service. Newly created conversations will attempt to meet this level of functionality first.
|
|
||||||||||||
|
determine if the conversations created from this service will support a given send type
|
1.3.9.1