comparison src/protocols/msn/msg.h @ 6868:ab80de7a74d1

[gaim-migrate @ 7414] Commitinating the current MSNSLP code. It's not working.. I don't know why. No clients will respond to my messages, even though they appear very valid. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 17 Sep 2003 02:10:37 +0000
parents 2adf21e70601
children 43803965ef45
comparison
equal deleted inserted replaced
6867:1c4e4c725e0d 6868:ab80de7a74d1
29 29
30 typedef struct 30 typedef struct
31 { 31 {
32 long session_id; 32 long session_id;
33 long id; 33 long id;
34 long offset; 34 long offset_1;
35 long total_size; 35 long offset_2;
36 long total_size_1;
37 long total_size_2;
36 long length; 38 long length;
37 long flags; 39 long flags;
38 long ack_session_id; 40 long ack_session_id;
39 long ack_unique_id; 41 long ack_unique_id;
40 long ack_length; 42 long ack_length_1;
43 long ack_length_2;
41 44
42 } MsnSlpHeader; 45 } MsnSlpHeader;
43 46
44 typedef struct 47 typedef struct
45 { 48 {
53 struct _MsnMessage 56 struct _MsnMessage
54 { 57 {
55 size_t ref_count; /**< The reference count. */ 58 size_t ref_count; /**< The reference count. */
56 59
57 gboolean msnslp_message; 60 gboolean msnslp_message;
61 gboolean msnslp_ack_message;
58 62
59 MsnUser *sender; 63 MsnUser *sender;
60 MsnUser *receiver; 64 MsnUser *receiver;
61 65
62 unsigned int tid; 66 unsigned int tid;
63 char flag; 67 char flag;
64 68
65 gboolean incoming; 69 gboolean incoming;
66 70
67 size_t size; 71 size_t size;
72
73 gboolean bin_content;
68 74
69 char *content_type; 75 char *content_type;
70 char *charset; 76 char *charset;
71 char *body; 77 char *body;
78 size_t bin_len;
72 79
73 MsnSlpHeader msnslp_header; 80 MsnSlpHeader msnslp_header;
74 MsnSlpFooter msnslp_footer; 81 MsnSlpFooter msnslp_footer;
82
83 MsnMessage *acked_msg;
75 84
76 GHashTable *attr_table; 85 GHashTable *attr_table;
77 GList *attr_list; 86 GList *attr_list;
78 }; 87 };
79 88
92 * @return A new MSNSLP message. 101 * @return A new MSNSLP message.
93 */ 102 */
94 MsnMessage *msn_message_new_msnslp(void); 103 MsnMessage *msn_message_new_msnslp(void);
95 104
96 /** 105 /**
106 * Creates a MSNSLP ack message.
107 *
108 * @param acked_msg The message to acknowledge.
109 *
110 * @return A new MSNSLP ack message.
111 */
112 MsnMessage *msn_message_new_msnslp_ack(MsnMessage *acked_msg);
113
114 /**
97 * Creates a new message based off a string. 115 * Creates a new message based off a string.
98 * 116 *
99 * @param session The MSN session. 117 * @param session The MSN session.
100 * @param str The string. 118 * @param str The string.
101 * 119 *
240 * @param msg The message. 258 * @param msg The message.
241 * 259 *
242 * @return The body of the message. 260 * @return The body of the message.
243 */ 261 */
244 const char *msn_message_get_body(const MsnMessage *msg); 262 const char *msn_message_get_body(const MsnMessage *msg);
263
264 /**
265 * Sets the binary content of the message.
266 *
267 * @param msg The message.
268 * @param data The binary data.
269 * @param len The length of the data.
270 */
271 void msn_message_set_bin_data(MsnMessage *msg, const void *data, size_t len);
272
273 /**
274 * Returns the binary content of the message.
275 *
276 * @param msg The message.
277 * @param len The returned length of the data.
278 *
279 * @return The binary data.
280 */
281 const void *msn_message_get_bin_data(const MsnMessage *msg, size_t *len);
245 282
246 /** 283 /**
247 * Sets the content type in a message. 284 * Sets the content type in a message.
248 * 285 *
249 * @param msg The message. 286 * @param msg The message.