diff src/protocols/msn/servconn.h @ 8646:1e211dde3cae

[gaim-migrate @ 9398] Added a patch by shx to clean up the message-handling code and split the command stuff from it, among a few other things. Also, I fixed a crash in message parsing, which I think may close a couple bug reports. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Tue, 13 Apr 2004 04:08:22 +0000
parents fc27237783ee
children bbd8cdaf0ad5
line wrap: on
line diff
--- a/src/protocols/msn/servconn.h	Tue Apr 13 03:53:37 2004 +0000
+++ b/src/protocols/msn/servconn.h	Tue Apr 13 04:08:22 2004 +0000
@@ -35,21 +35,17 @@
 
 typedef gboolean (*MsnServConnMsgCb)(MsnServConn *servconn, MsnMessage *msg);
 
-#include "session.h"
+typedef void (*MsnPayloadCb)(MsnServConn *servconn, char *payload,
+							 size_t len);
 
-typedef enum
-{
-	MSN_MULTILINE_MSG,
-	MSN_MULTILINE_IPG,
-	MSN_MULTILINE_NOT
-
-} MsnMultilineType;
+#include "session.h"
 
 struct _MsnServConn
 {
 	MsnSession *session;
 
 	gboolean connected;
+	gboolean wasted;
 
 	MsnHttpMethodData *http_data;
 
@@ -62,18 +58,17 @@
 	int fd;
 	int inpa;
 
-	char *rxqueue;
-	int rxlen;
+	char *rx_buf;
+	int rx_len;
+
+	MsnPayloadCb payload_cb;
+	int payload_len;
 
 	GSList *msg_queue;
 
 	GSList *txqueue;
 
-	gboolean parsing_multiline;
-	MsnMultilineType multiline_type;
 	char *msg_passport;
-	char *msg_friendly;
-	int multiline_len;
 
 	GHashTable *commands;
 	GHashTable *msg_types;
@@ -126,7 +121,7 @@
 									const char *content_type,
 									MsnServConnMsgCb cb);
 
-void msn_servconn_parse_data(gpointer data, gint source,
-							 GaimInputCondition cond);
+gboolean msn_servconn_process_message(MsnServConn *servconn,
+									  MsnMessage *msg);
 
 #endif /* _MSN_SERVCONN_H_ */