pidgin/android/android

Parents 7aab64740ac4
Children 534620727c7e
added purple_buddy_icon_get_image to get direct access to the stored image for a buddy.
--- a/libpurple/buddyicon.c Fri Aug 17 02:28:58 2012 +0200
+++ b/libpurple/buddyicon.c Fri Aug 17 03:53:03 2012 +0200
@@ -522,6 +522,12 @@
return NULL;
}
+PurpleStoredImage *
+purple_buddy_icon_get_image(const PurpleBuddyIcon *icon) {
+ return purple_imgstore_ref(icon->img);
+}
+
+
const char *
purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon)
{
--- a/libpurple/buddyicon.h Fri Aug 17 02:28:58 2012 +0200
+++ b/libpurple/buddyicon.h Fri Aug 17 03:53:03 2012 +0200
@@ -145,6 +145,17 @@
gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
/**
+ * Returns the buddy icon's stored image and increases the reference count
+ * of that stored image by one, so you should use purple_imgstore_unref after
+ * using the image.
+ *
+ * @param icon The buddy icon.
+ *
+ * @return A pointer to the icon data.
+ */
+PurpleStoredImage *purple_buddy_icon_get_image(const PurpleBuddyIcon *icon);
+
+/**
* Returns an extension corresponding to the buddy icon's file type.
*
* @param icon The buddy icon.