aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-photo-cache.h
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-04-23 08:28:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-04-24 08:52:20 +0800
commit3bf02daa08271ae5201008ee362a045b217c6a7a (patch)
tree9b84d47b39575d7fa423e8a0ff121ebe472ae2ec /e-util/e-photo-cache.h
parent822fcbbd0fa5cfb69d03b689571a20a52c97ae12 (diff)
downloadgsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar.gz
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar.bz2
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar.lz
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar.xz
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.tar.zst
gsoc2013-evolution-3bf02daa08271ae5201008ee362a045b217c6a7a.zip
Reimplement EPhotoCache to use EPhotoSource.
Reimplement EPhotoCache to delegate the actual photo fetching to EPhotoSources. When a photo is requested for a given email address, all available EPhotoSources are dispatched concurrently and a photo input stream is selected from the result set. This also utilizes EDataCapture, which is affixed to the returned GInputStream to capture and cache photo data for an email address. New functions: e_photo_cache_add_photo_source() e_photo_cache_list_photo_sources() e_photo_cache_remove_photo_source() e_photo_cache_add_photo() Renamed functions: e_photo_cache_remove() --> e_photo_cache_remove_photo()
Diffstat (limited to 'e-util/e-photo-cache.h')
-rw-r--r--e-util/e-photo-cache.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/e-util/e-photo-cache.h b/e-util/e-photo-cache.h
index af44e2e3f1..0c310080e7 100644
--- a/e-util/e-photo-cache.h
+++ b/e-util/e-photo-cache.h
@@ -25,6 +25,7 @@
#include <libebook/libebook.h>
#include <e-util/e-client-cache.h>
+#include <e-util/e-photo-source.h>
/* Standard GObject macros */
#define E_TYPE_PHOTO_CACHE \
@@ -69,6 +70,18 @@ struct _EPhotoCacheClass {
GType e_photo_cache_get_type (void) G_GNUC_CONST;
EPhotoCache * e_photo_cache_new (EClientCache *client_cache);
EClientCache * e_photo_cache_ref_client_cache (EPhotoCache *photo_cache);
+void e_photo_cache_add_photo_source (EPhotoCache *photo_cache,
+ EPhotoSource *photo_source);
+GList * e_photo_cache_list_photo_sources
+ (EPhotoCache *photo_cache);
+gboolean e_photo_cache_remove_photo_source
+ (EPhotoCache *photo_cache,
+ EPhotoSource *photo_source);
+void e_photo_cache_add_photo (EPhotoCache *photo_cache,
+ const gchar *email_address,
+ GBytes *bytes);
+gboolean e_photo_cache_remove_photo (EPhotoCache *photo_cache,
+ const gchar *email_address);
gboolean e_photo_cache_get_photo_sync (EPhotoCache *photo_cache,
const gchar *email_address,
GCancellable *cancellable,
@@ -83,8 +96,6 @@ gboolean e_photo_cache_get_photo_finish (EPhotoCache *photo_cache,
GAsyncResult *result,
GInputStream **out_stream,
GError **error);
-gboolean e_photo_cache_remove (EPhotoCache *photo_cache,
- const gchar *email_address);
G_END_DECLS