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 --- python/pyempathy/pyempathy.defs | 91 ++++++++++++++++++++----------------- python/pyempathy/pyempathy.override | 1 - python/update-binding.sh | 1 - 3 files changed, 50 insertions(+), 43 deletions(-) (limited to 'python') diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs index 45e347175..2c3e8d20b 100644 --- a/python/pyempathy/pyempathy.defs +++ b/python/pyempathy/pyempathy.defs @@ -217,47 +217,6 @@ ) -;; From empathy-avatar.h - -(define-function empathy_avatar_get_type - (c-name "empathy_avatar_get_type") - (return-type "GType") -) - -(define-function empathy_avatar_new - (c-name "empathy_avatar_new") - (is-constructor-of "EmpathyAvatar") - (return-type "EmpathyAvatar*") - (parameters - '("const-guchar*" "avatar") - '("const-gsize" "len") - '("const-gchar*" "format") - '("const-gchar*" "token") - ) -) - -(define-function empathy_avatar_new_from_cache - (c-name "empathy_avatar_new_from_cache") - (return-type "EmpathyAvatar*") - (parameters - '("const-gchar*" "token") - ) -) - -(define-method ref - (of-object "EmpathyAvatar") - (c-name "empathy_avatar_ref") - (return-type "EmpathyAvatar*") -) - -(define-method unref - (of-object "EmpathyAvatar") - (c-name "empathy_avatar_unref") - (return-type "none") -) - - - ;; From empathy-time.h (define-function empathy_time_get_current @@ -1099,6 +1058,56 @@ ) ) +(define-method load_avatar_data + (of-object "EmpathyContact") + (c-name "empathy_contact_load_avatar_data") + (return-type "none") + (parameters + '("const-guchar*" "data") + '("const-gsize" "len") + '("const-gchar*" "format") + '("const-gchar*" "token") + ) +) + +(define-method load_avatar_cache + (of-object "EmpathyContact") + (c-name "empathy_contact_load_avatar_cache") + (return-type "gboolean") + (parameters + '("const-gchar*" "token") + ) +) + +(define-function empathy_avatar_get_type + (c-name "empathy_avatar_get_type") + (return-type "GType") +) + +(define-function empathy_avatar_new + (c-name "empathy_avatar_new") + (is-constructor-of "EmpathyAvatar") + (return-type "EmpathyAvatar*") + (parameters + '("guchar*" "data") + '("gsize" "len") + '("gchar*" "format") + '("gchar*" "token") + ) +) + +(define-method ref + (of-object "EmpathyAvatar") + (c-name "empathy_avatar_ref") + (return-type "EmpathyAvatar*") +) + +(define-method unref + (of-object "EmpathyAvatar") + (c-name "empathy_avatar_unref") + (return-type "none") +) + ;; From empathy-contact-groups.h diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override index 0b44a265d..169f375ad 100644 --- a/python/pyempathy/pyempathy.override +++ b/python/pyempathy/pyempathy.override @@ -2,7 +2,6 @@ headers #include #include -#include "empathy-avatar.h" #include "empathy-chatroom.h" #include "empathy-chatroom-manager.h" #include "empathy-contact.h" diff --git a/python/update-binding.sh b/python/update-binding.sh index d07c4d6e0..fbc5b4c79 100755 --- a/python/update-binding.sh +++ b/python/update-binding.sh @@ -4,7 +4,6 @@ # Update the list of headers from Makefile.am cd ../libempathy python /usr/share/pygtk/2.0/codegen/h2def.py \ - empathy-avatar.h \ empathy-time.h \ empathy-status-presets.h \ empathy-debug.h \ -- cgit v1.2.3