diff libpurple/protocols/jabber/jabber.h @ 25716:ba362a67278c

propagate from branch 'im.pidgin.pidgin' (head 2747d5e0324ca6b81e83bbb8b75e1efebcbbad6e) to branch 'im.pidgin.soc.2008.xmpp' (head 72d6870ed2c62423a05ed89822db25d9916ecf2b)
author Tobias Markmann <tfar@soc.pidgin.im>
date Sun, 03 Aug 2008 23:16:24 +0000
parents 224169be5830 3176d5a0b9dd
children 907ca9a36fe0
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.h	Sun Aug 03 05:13:29 2008 +0000
+++ b/libpurple/protocols/jabber/jabber.h	Sun Aug 03 23:16:24 2008 +0000
@@ -59,12 +59,13 @@
 #include "jutil.h"
 #include "xmlnode.h"
 #include "buddy.h"
+#include "bosh.h"
 
 #ifdef HAVE_CYRUS_SASL
 #include <sasl/sasl.h>
 #endif
 
-#define CAPS0115_NODE "http://pidgin.im/caps"
+#define CAPS0115_NODE "http://pidgin.im/"
 
 /* Index into attention_types list */
 #define JABBER_BUZZ 0
@@ -201,21 +202,31 @@
 	
 	/* A purple timeout tag for the keepalive */
 	int keepalive_timeout;
-
+	
 	PurpleSrvResponse *srv_rec;
 	guint srv_rec_idx;
 	guint max_srv_rec_idx;
+
+	/* BOSH stuff*/
+    PurpleBOSHConnection bosh;
 };
 
-typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *shortname, const gchar *namespace);
+typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace);
 
 typedef struct _JabberFeature
 {
-	gchar *shortname;
 	gchar *namespace;
 	JabberFeatureEnabled *is_enabled;
 } JabberFeature;
 
+typedef struct _JabberIdentity
+{
+	gchar *category;
+	gchar *type;
+	gchar *name;
+	gchar *lang;
+} JabberIdentity;
+
 typedef struct _JabberBytestreamsStreamhost {
 	char *jid;
 	char *host;
@@ -225,6 +236,9 @@
 
 /* what kind of additional features as returned from disco#info are supported? */
 extern GList *jabber_features;
+extern GList *jabber_identities;
+
+extern GHashTable *jabber_contact_info; /* char * -> JabberCapsKey */
 
 void jabber_process_packet(JabberStream *js, xmlnode **packet);
 void jabber_send(JabberStream *js, xmlnode *data);
@@ -246,8 +260,16 @@
  */
 char *jabber_parse_error(JabberStream *js, xmlnode *packet, PurpleConnectionError *reason);
 
-void jabber_add_feature(const gchar *shortname, const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
-void jabber_remove_feature(const gchar *shortname);
+void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
+void jabber_remove_feature(const gchar *namespace);
+
+/** Adds an identitiy to this jabber library instance. For list of valid values vistit the 
+ *	webiste of the XMPP Registrar ( http://www.xmpp.org/registrar/disco-categories.html#client ).
+ *  @param category the category of the identity.
+ *	@param type the type of the identity.
+ *	@param name the name of the identity.
+ */
+void jabber_add_identity(const gchar *category, const gchar *type, const gchar *name); 
 
 /** PRPL functions */
 const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b);