Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
12507:5bf6c0c908b2 | 12508:5cfc53ead482 |
---|---|
27 #include "roomlist.h" | 27 #include "roomlist.h" |
28 #include "sslconn.h" | 28 #include "sslconn.h" |
29 | 29 |
30 #include "jutil.h" | 30 #include "jutil.h" |
31 #include "xmlnode.h" | 31 #include "xmlnode.h" |
32 | |
33 #ifdef HAVE_CYRUS_SASL | |
34 #include <sasl/sasl.h> | |
35 #endif | |
32 | 36 |
33 typedef enum { | 37 typedef enum { |
34 JABBER_CAP_NONE = 0, | 38 JABBER_CAP_NONE = 0, |
35 JABBER_CAP_XHTML = 1 << 0, | 39 JABBER_CAP_XHTML = 1 << 0, |
36 JABBER_CAP_COMPOSING = 1 << 1, | 40 JABBER_CAP_COMPOSING = 1 << 1, |
66 } protocol_version; | 70 } protocol_version; |
67 enum { | 71 enum { |
68 JABBER_AUTH_UNKNOWN, | 72 JABBER_AUTH_UNKNOWN, |
69 JABBER_AUTH_DIGEST_MD5, | 73 JABBER_AUTH_DIGEST_MD5, |
70 JABBER_AUTH_PLAIN, | 74 JABBER_AUTH_PLAIN, |
71 JABBER_AUTH_IQ_AUTH | 75 JABBER_AUTH_IQ_AUTH, |
76 JABBER_AUTH_CYRUS | |
72 } auth_type; | 77 } auth_type; |
73 char *stream_id; | 78 char *stream_id; |
74 JabberStreamState state; | 79 JabberStreamState state; |
75 | 80 |
76 /* SASL authentication */ | 81 /* SASL authentication */ |
100 | 105 |
101 gboolean registration; | 106 gboolean registration; |
102 | 107 |
103 char *avatar_hash; | 108 char *avatar_hash; |
104 GSList *pending_avatar_requests; | 109 GSList *pending_avatar_requests; |
110 | |
111 /* OK, this stays at the end of the struct, so plugins can depend | |
112 * on the rest of the stuff being in the right place | |
113 */ | |
114 #ifdef HAVE_CYRUS_SASL | |
115 sasl_conn_t *sasl; | |
116 sasl_callback_t *sasl_cb; | |
117 int sasl_state; | |
118 int sasl_maxbuf; | |
119 GString *sasl_mechs; | |
120 #endif | |
121 | |
105 } JabberStream; | 122 } JabberStream; |
106 | 123 |
107 void jabber_process_packet(JabberStream *js, xmlnode *packet); | 124 void jabber_process_packet(JabberStream *js, xmlnode *packet); |
108 void jabber_send(JabberStream *js, xmlnode *data); | 125 void jabber_send(JabberStream *js, xmlnode *data); |
109 void jabber_send_raw(JabberStream *js, const char *data, int len); | 126 void jabber_send_raw(JabberStream *js, const char *data, int len); |