aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-27 07:31:00 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-27 23:59:55 +0800
commit667585134e2b248e3d93f2f55cdee86b71e5432f (patch)
treecc746a1eeb3b73ed09d42ca600fa84fc0455e086 /libemail-engine
parentcc2a65368c9e3e023860e9092a4d8bf3f9a18fce (diff)
downloadgsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar.gz
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar.bz2
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar.lz
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar.xz
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.tar.zst
gsoc2013-evolution-667585134e2b248e3d93f2f55cdee86b71e5432f.zip
Remove emu_remove_from_mail_cache().
No longer used.
Diffstat (limited to 'libemail-engine')
-rw-r--r--libemail-engine/e-mail-utils.c47
-rw-r--r--libemail-engine/e-mail-utils.h1
2 files changed, 0 insertions, 48 deletions
diff --git a/libemail-engine/e-mail-utils.c b/libemail-engine/e-mail-utils.c
index c224115b98..74aecf19ec 100644
--- a/libemail-engine/e-mail-utils.c
+++ b/libemail-engine/e-mail-utils.c
@@ -629,53 +629,6 @@ emu_free_photo_info (PhotoInfo *pi)
static ECancellableMutex photos_cache_lock;
static GSList *photos_cache = NULL; /* list of PhotoInfo-s */
-/* list of email addresses (strings) to remove from local cache of photos and
- * contacts, but only if the photo doesn't exist or is an not-found contact */
-void
-emu_remove_from_mail_cache (const GSList *addresses)
-{
- const GSList *a;
- GSList *p;
- CamelInternetAddress *cia;
-
- cia = camel_internet_address_new ();
-
- for (a = addresses; a; a = a->next) {
- const gchar *addr = NULL;
-
- if (!a->data)
- continue;
-
- if (camel_address_decode ((CamelAddress *) cia, a->data) != -1 &&
- camel_internet_address_get (cia, 0, NULL, &addr) && addr) {
- gchar *lowercase_addr = g_utf8_strdown (addr, -1);
-
- if (e_cancellable_mutex_lock (&contact_cache_lock, NULL)) {
- if (g_hash_table_lookup (contact_cache, lowercase_addr) == NOT_FOUND_BOOK)
- g_hash_table_remove (contact_cache, lowercase_addr);
- e_cancellable_mutex_unlock (&contact_cache_lock);
- }
-
- g_free (lowercase_addr);
-
- if (e_cancellable_mutex_lock (&photos_cache_lock, NULL)) {
- for (p = photos_cache; p; p = p->next) {
- PhotoInfo *pi = p->data;
-
- if (pi && !pi->photo && g_ascii_strcasecmp (pi->address, addr) == 0) {
- photos_cache = g_slist_remove (photos_cache, pi);
- emu_free_photo_info (pi);
- break;
- }
- }
- e_cancellable_mutex_unlock (&photos_cache_lock);
- }
- }
- }
-
- g_object_unref (cia);
-}
-
struct FreeMailCacheData
{
GDestroyNotify done_cb;
diff --git a/libemail-engine/e-mail-utils.h b/libemail-engine/e-mail-utils.h
index e42c47566b..20a5ee0512 100644
--- a/libemail-engine/e-mail-utils.h
+++ b/libemail-engine/e-mail-utils.h
@@ -58,7 +58,6 @@ ESource * em_utils_guess_mail_identity_with_recipients
ESource * em_utils_ref_mail_identity_for_store
(ESourceRegistry *registry,
CamelStore *store);
-void emu_remove_from_mail_cache (const GSList *addresses);
void emu_free_mail_cache (GDestroyNotify done_cb,
gpointer user_data);
void em_utils_uids_free (GPtrArray *uids);