From 891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 27 May 2008 17:34:44 +0000 Subject: Move avatar cache to ~/.cache and don't mix avatar from different contacts, tokens are not garanteed to be different. svn path=/trunk/; revision=1128 --- libempathy/empathy-contact.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'libempathy/empathy-contact.h') diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index 4abca99bd..fe27a04c8 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -31,8 +31,6 @@ #include #include -#include "empathy-avatar.h" - G_BEGIN_DECLS #define EMPATHY_TYPE_CONTACT (empathy_contact_get_type ()) @@ -54,6 +52,14 @@ struct _EmpathyContactClass { GObjectClass parent_class; }; +typedef struct { + guchar *data; + gsize len; + gchar *format; + gchar *token; + guint refcount; +} EmpathyAvatar; + typedef enum { EMPATHY_CAPABILITIES_NONE = 0, EMPATHY_CAPABILITIES_AUDIO = 1 << 0, @@ -111,6 +117,22 @@ guint empathy_contact_hash (gconstpointer key void empathy_contact_run_until_ready (EmpathyContact *contact, EmpathyContactReady ready, GMainLoop **loop); +void empathy_contact_load_avatar_data (EmpathyContact *contact, + const guchar *data, + const gsize len, + const gchar *format, + const gchar *token); +gboolean empathy_contact_load_avatar_cache (EmpathyContact *contact, + const gchar *token); + +#define EMPATHY_TYPE_AVATAR (empathy_avatar_get_type ()) +GType empathy_avatar_get_type (void) G_GNUC_CONST; +EmpathyAvatar * empathy_avatar_new (guchar *data, + gsize len, + gchar *format, + gchar *token); +EmpathyAvatar * empathy_avatar_ref (EmpathyAvatar *avatar); +void empathy_avatar_unref (EmpathyAvatar *avatar); G_END_DECLS -- cgit v1.2.3