Mercurial > pidgin
diff libpurple/protocols/jabber/si.c @ 29835:afc9cec164e4
Rename purple_xfer_get_thumbnail_data/size to be more D-Bus friendly.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 25 Apr 2010 21:09:34 +0000 |
parents | f14cbb6a28a7 |
children | f3a573191e43 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c Sun Apr 25 20:58:00 2010 +0000 +++ b/libpurple/protocols/jabber/si.c Sun Apr 25 21:09:34 2010 +0000 @@ -1247,6 +1247,8 @@ JabberIq *iq; xmlnode *si, *file, *feature, *x, *field, *option, *value; char buf[32]; + gconstpointer thumb; + gsize thumb_size; xfer->filename = g_path_get_basename(xfer->local_filename); purple_xfer_prepare_thumbnail(xfer, "jpeg,png"); @@ -1269,12 +1271,11 @@ /* maybe later we'll do hash and date attribs */ /* add thumbnail, if appropriate */ - if (purple_xfer_get_thumbnail_data(xfer)) { + if ((thumb = purple_xfer_get_thumbnail(xfer, &thumb_size))) { const gchar *mimetype = purple_xfer_get_thumbnail_mimetype(xfer); JabberData *thumbnail_data = - jabber_data_create_from_data(purple_xfer_get_thumbnail_data(xfer), - purple_xfer_get_thumbnail_size(xfer), mimetype, TRUE, - jsx->js); + jabber_data_create_from_data(thumb, thumb_size, + mimetype, TRUE, jsx->js); xmlnode *thumbnail = xmlnode_new_child(file, "thumbnail"); xmlnode_set_namespace(thumbnail, NS_THUMBS); xmlnode_set_attrib(thumbnail, "cid",