diff src/protocols/jabber/jabber.h @ 12508:5cfc53ead482

[gaim-migrate @ 14820] patch from Simon Wilkinson to add Cyrus SASL support for jabber Give him credit if it works flawlessly. Blame me if it doesn't, as the patch was against 1.3.1 (yeah, I've been sitting on it for that long), and I had to merge it to HEAD, and clean up a bunch of warnings committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 17 Dec 2005 02:24:05 +0000
parents 828802f2251b
children 33bef17125c2
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.h	Fri Dec 16 21:41:46 2005 +0000
+++ b/src/protocols/jabber/jabber.h	Sat Dec 17 02:24:05 2005 +0000
@@ -30,6 +30,10 @@
 #include "jutil.h"
 #include "xmlnode.h"
 
+#ifdef HAVE_CYRUS_SASL
+#include <sasl/sasl.h>
+#endif
+
 typedef enum {
 	JABBER_CAP_NONE           = 0,
 	JABBER_CAP_XHTML          = 1 << 0,
@@ -68,7 +72,8 @@
 		JABBER_AUTH_UNKNOWN,
 		JABBER_AUTH_DIGEST_MD5,
 		JABBER_AUTH_PLAIN,
-		JABBER_AUTH_IQ_AUTH
+		JABBER_AUTH_IQ_AUTH,
+		JABBER_AUTH_CYRUS
 	} auth_type;
 	char *stream_id;
 	JabberStreamState state;
@@ -102,6 +107,18 @@
 
 	char *avatar_hash;
 	GSList *pending_avatar_requests;
+
+	/* OK, this stays at the end of the struct, so plugins can depend
+	 * on the rest of the stuff being in the right place
+	 */
+#ifdef HAVE_CYRUS_SASL
+	sasl_conn_t *sasl;
+	sasl_callback_t *sasl_cb;
+	int sasl_state;
+	int sasl_maxbuf;
+	GString *sasl_mechs;
+#endif
+
 } JabberStream;
 
 void jabber_process_packet(JabberStream *js, xmlnode *packet);