comparison libpurple/protocols/msn/msg.h @ 29373:462cb893521b

Minor header file cleanup. Mostly I wanted to move some enums above some #includes
author Mark Doliner <mark@kingant.net>
date Fri, 05 Feb 2010 22:49:11 +0000
parents a6d84d9de605
children 33b4ae796648
comparison
equal deleted inserted replaced
29372:791606778223 29373:462cb893521b
19 * 19 *
20 * You should have received a copy of the GNU General Public License 20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software 21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 */ 23 */
24 #ifndef _MSN_MSG_H_ 24 #ifndef MSN_MSG_H
25 #define _MSN_MSG_H_ 25 #define MSN_MSG_H
26 26
27 typedef struct _MsnMessage MsnMessage; 27 typedef struct _MsnMessage MsnMessage;
28
29 #include "session.h"
30 #include "user.h"
31
32 #include "command.h"
33 #include "transaction.h"
34
35 typedef void (*MsnMsgCb)(MsnMessage *, void *data);
36
37 #define MSG_BODY_DEM "\r\n\r\n"
38 #define MSG_LINE_DEM "\r\n"
39
40 #define MSG_OIM_BODY_DEM "\n\n"
41 #define MSG_OIM_LINE_DEM "\n"
42 28
43 /* 29 /*
44 typedef enum 30 typedef enum
45 { 31 {
46 MSN_MSG_NORMAL, 32 MSN_MSG_NORMAL,
47 MSN_MSG_SLP_SB, 33 MSN_MSG_SLP_SB,
48 MSN_MSG_SLP_DC 34 MSN_MSG_SLP_DC
49
50 } MsnMsgType; 35 } MsnMsgType;
51 */ 36 */
52 37
53 typedef enum 38 typedef enum
54 { 39 {
56 MSN_MSG_TEXT, 41 MSN_MSG_TEXT,
57 MSN_MSG_TYPING, 42 MSN_MSG_TYPING,
58 MSN_MSG_CAPS, 43 MSN_MSG_CAPS,
59 MSN_MSG_SLP, 44 MSN_MSG_SLP,
60 MSN_MSG_NUDGE 45 MSN_MSG_NUDGE
61
62 } MsnMsgType; 46 } MsnMsgType;
63 47
64 typedef enum 48 typedef enum
65 { 49 {
66 MSN_MSG_ERROR_NONE, /**< No error. */ 50 MSN_MSG_ERROR_NONE, /**< No error. */
67 MSN_MSG_ERROR_TIMEOUT, /**< The message timedout. */ 51 MSN_MSG_ERROR_TIMEOUT, /**< The message timedout. */
68 MSN_MSG_ERROR_NAK, /**< The message could not be sent. */ 52 MSN_MSG_ERROR_NAK, /**< The message could not be sent. */
69 MSN_MSG_ERROR_SB, /**< The error comes from the switchboard. */ 53 MSN_MSG_ERROR_SB, /**< The error comes from the switchboard. */
70 MSN_MSG_ERROR_UNKNOWN /**< An unknown error occurred. */ 54 MSN_MSG_ERROR_UNKNOWN /**< An unknown error occurred. */
71
72 } MsnMsgErrorType; 55 } MsnMsgErrorType;
56
57 #include "command.h"
58 #include "session.h"
59 #include "transaction.h"
60 #include "user.h"
61
62 typedef void (*MsnMsgCb)(MsnMessage *, void *data);
63
64 #define MSG_BODY_DEM "\r\n\r\n"
65 #define MSG_LINE_DEM "\r\n"
66
67 #define MSG_OIM_BODY_DEM "\n\n"
68 #define MSG_OIM_LINE_DEM "\n"
73 69
74 typedef struct 70 typedef struct
75 { 71 {
76 guint32 session_id; 72 guint32 session_id;
77 guint32 id; 73 guint32 id;
80 guint32 length; 76 guint32 length;
81 guint32 flags; 77 guint32 flags;
82 guint32 ack_id; 78 guint32 ack_id;
83 guint32 ack_sub_id; 79 guint32 ack_sub_id;
84 guint64 ack_size; 80 guint64 ack_size;
85
86 } MsnSlpHeader; 81 } MsnSlpHeader;
87 82
88 typedef struct 83 typedef struct
89 { 84 {
90 guint32 value; 85 guint32 value;
91
92 } MsnSlpFooter; 86 } MsnSlpFooter;
93 87
94 /** 88 /**
95 * A message. 89 * A message.
96 */ 90 */
345 339
346 void msn_datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg); 340 void msn_datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
347 341
348 void msn_handwritten_msg(MsnCmdProc *cmdproc, MsnMessage *msg); 342 void msn_handwritten_msg(MsnCmdProc *cmdproc, MsnMessage *msg);
349 343
350 #endif /* _MSN_MSG_H_ */ 344 #endif /* MSN_MSG_H */