Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/data.h @ 30027:fce17268c9ec
jabber: Refactor BoB request code to reside inside data.c
TODO: add hash validation.
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sun, 21 Mar 2010 19:39:40 +0000 |
parents | 8271e42acdcb |
children | 1bde873d1b94 885ceb384678 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/data.h Sat Mar 20 16:20:35 2010 +0000 +++ b/libpurple/protocols/jabber/data.h Sun Mar 21 19:39:40 2010 +0000 @@ -28,6 +28,7 @@ #define JABBER_DATA_MAX_SIZE 8192 + typedef struct { char *cid; char *type; @@ -35,6 +36,10 @@ gpointer data; } JabberData; +typedef void (JabberDataRequestCallback)(JabberData *data, gchar *alt, + gpointer userdata); + + /* creates a JabberData instance from raw data */ JabberData *jabber_data_create_from_data(gconstpointer data, gsize size, const char *type, JabberStream *js); @@ -55,9 +60,9 @@ /* returns an XHTML-IM "img" tag given a data instance */ xmlnode *jabber_data_get_xhtml_im(const JabberData *data, const gchar *alt); -/* returns a data request element (to be included in an iq stanza) for requesting - data */ -xmlnode *jabber_data_get_xml_request(const gchar *cid); +void jabber_data_request(JabberStream *js, const gchar *cid, const gchar *who, + gchar *alt, gboolean ephemeral, JabberDataRequestCallback cb, + gpointer userdata); /* lookup functions */ const JabberData *jabber_data_find_local_by_alt(const gchar *alt);