| 10344:09d0502090b3 | 10345:7d7f8cfa2b4f |
|---|---|
| 30 #include "user.h" | 30 #include "user.h" |
| 31 | 31 |
| 32 #include "command.h" | 32 #include "command.h" |
| 33 #include "transaction.h" | 33 #include "transaction.h" |
| 34 | 34 |
| 35 typedef void (*MsnCb)(void *data); | 35 typedef void (*MsnMsgCb)(MsnMessage *, void *data); |
| 36 | 36 |
| 37 /* | 37 /* |
| 38 typedef enum | 38 typedef enum |
| 39 { | 39 { |
| 40 MSN_MSG_NORMAL, | 40 MSN_MSG_NORMAL, |
| 51 MSN_MSG_TYPING, | 51 MSN_MSG_TYPING, |
| 52 MSN_MSG_CAPS, | 52 MSN_MSG_CAPS, |
| 53 MSN_MSG_SLP | 53 MSN_MSG_SLP |
| 54 | 54 |
| 55 } MsnMsgType; | 55 } MsnMsgType; |
| 56 | |
| 57 typedef enum | |
| 58 { | |
| 59 MSN_MSG_ERROR_NONE, /**< No error. */ | |
| 60 MSN_MSG_ERROR_TIMEOUT, /**< The message timedout. */ | |
| 61 MSN_MSG_ERROR_NAK, /**< The message could not be sent. */ | |
| 62 MSN_MSG_ERROR_SB, /**< The error comes from the switchboard. */ | |
| 63 MSN_MSG_ERROR_UNKNOWN /**< An unknown error occured. */ | |
| 64 | |
| 65 } MsnMsgErrorType; | |
| 56 | 66 |
| 57 typedef struct | 67 typedef struct |
| 58 { | 68 { |
| 59 guint32 session_id; | 69 guint32 session_id; |
| 60 guint32 id; | 70 guint32 id; |
| 100 GList *attr_list; | 110 GList *attr_list; |
| 101 | 111 |
| 102 MsnCommand *cmd; | 112 MsnCommand *cmd; |
| 103 MsnTransaction *trans; | 113 MsnTransaction *trans; |
| 104 | 114 |
| 105 MsnCb ack_cb; | 115 MsnMsgCb ack_cb; /**< The callback to call when we receive an ACK of this |
| 106 void *ack_data; | 116 message. */ |
| 117 MsnMsgCb nak_cb; /**< The callback to call when we receive a NAK of this | |
| 118 message. */ | |
| 119 void *ack_data; /**< The data used by callbacks. */ | |
| 120 | |
| 121 MsnMsgErrorType error; /**< The error of the message. */ | |
| 107 }; | 122 }; |
| 108 | 123 |
| 109 /** | 124 /** |
| 110 * Creates a new, empty message. | 125 * Creates a new, empty message. |
| 111 * | 126 * |