comparison libpurple/protocols/jabber/jabber.h @ 31449:1c660ba17ba1

propagate from branch 'im.pidgin.pidgin' (head 6f879669a6513a5c40335bbaefe842389a92b39e) to branch 'im.pidgin.cpw.qulogic.cairo' (head 4ab0199887f74442673fd46dcbb662bc7f070bc4)
author Marcus Lundblad <ml@update.uu.se>
date Sun, 21 Nov 2010 20:30:12 +0000
parents 53dcfcc71953
children 08dcd2d4f0b7
comparison
equal deleted inserted replaced
31448:9a705087d64e 31449:1c660ba17ba1
78 #include <sasl/sasl.h> 78 #include <sasl/sasl.h>
79 #endif 79 #endif
80 80
81 #define CAPS0115_NODE "http://pidgin.im/" 81 #define CAPS0115_NODE "http://pidgin.im/"
82 82
83 #define JABBER_DEFAULT_REQUIRE_TLS TRUE 83 #define JABBER_DEFAULT_REQUIRE_TLS "require_starttls"
84 #define JABBER_DEFAULT_FT_PROXIES "proxy.eu.jabber.org" 84 #define JABBER_DEFAULT_FT_PROXIES "proxy.eu.jabber.org"
85 85
86 /* Index into attention_types list */ 86 /* Index into attention_types list */
87 #define JABBER_BUZZ 0 87 #define JABBER_BUZZ 0
88 88
204 char *serverFQDN; 204 char *serverFQDN;
205 205
206 #ifdef HAVE_CYRUS_SASL 206 #ifdef HAVE_CYRUS_SASL
207 sasl_conn_t *sasl; 207 sasl_conn_t *sasl;
208 sasl_callback_t *sasl_cb; 208 sasl_callback_t *sasl_cb;
209 sasl_secret_t *sasl_secret;
209 const char *current_mech; 210 const char *current_mech;
210 int auth_fail_count; 211 int auth_fail_count;
211 212
212 int sasl_state; 213 int sasl_state;
213 int sasl_maxbuf; 214 int sasl_maxbuf;
273 274
274 /* maybe this should only be present when USE_VV? */ 275 /* maybe this should only be present when USE_VV? */
275 gchar *stun_ip; 276 gchar *stun_ip;
276 int stun_port; 277 int stun_port;
277 PurpleDnsQueryData *stun_query; 278 PurpleDnsQueryData *stun_query;
278 /* later add stuff to handle TURN relays... */ 279
280 /* stuff for Google's relay handling */
281 gchar *google_relay_token;
282 gchar *google_relay_host;
283 GList *google_relay_requests; /* the HTTP requests to get */
284 /* relay info */
279 }; 285 };
280 286
281 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace); 287 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace);
282 288
283 typedef struct _JabberFeature 289 typedef struct _JabberFeature
330 * @param reason where to store the disconnection reason, or @c NULL if you 336 * @param reason where to store the disconnection reason, or @c NULL if you
331 * don't care or you don't intend to close the connection. 337 * don't care or you don't intend to close the connection.
332 */ 338 */
333 char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason); 339 char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason);
334 340
335 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */ 341 /**
342 * Add a feature to the list of features advertised via disco#info. If you
343 * call this while accounts are connected, Bad Things(TM) will happen because
344 * the Entity Caps hash will be out-of-date (which should be fixed :/)
345 *
346 * @param namespace The namespace of the feature
347 * @param cb A callback determining whether or not this feature
348 * will advertised; may be NULL.
349 */
350 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb);
336 void jabber_remove_feature(const gchar *namespace); 351 void jabber_remove_feature(const gchar *namespace);
337 352
338 /** Adds an identity to this jabber library instance. For list of valid values visit the 353 /** Adds an identity to this jabber library instance. For list of valid values
339 * website of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ). 354 * visit the website of the XMPP Registrar
355 * (http://www.xmpp.org/registrar/disco-categories.html#client).
356 *
357 * Like with jabber_add_feature, if you call this while accounts are connected,
358 * Bad Things will happen.
359 *
340 * @param category the category of the identity. 360 * @param category the category of the identity.
341 * @param type the type of the identity. 361 * @param type the type of the identity.
342 * @param language the language localization of the name. Can be NULL. 362 * @param language the language localization of the name. Can be NULL.
343 * @param name the name of the identity. 363 * @param name the name of the identity.
344 */ 364 */