aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format-html.c')
-rw-r--r--mail/em-format-html.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index d79fa450bc..745c275d8b 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -3328,3 +3328,16 @@ em_format_html_format_cert_infos (CamelCipherCertInfo *first_cinfo)
return g_string_free (res, FALSE);
}
+
+/* unref returned pointer with g_object_unref(), if not NULL */
+CamelStream *
+em_format_html_get_cached_image (EMFormatHTML *efh, const gchar *image_uri)
+{
+ g_return_val_if_fail (efh != NULL, NULL);
+ g_return_val_if_fail (image_uri != NULL, NULL);
+
+ if (!emfh_http_cache)
+ return NULL;
+
+ return camel_data_cache_get (emfh_http_cache, EMFH_HTTP_CACHE_PATH, image_uri, NULL);
+}