From 345d090ac854ad26d2a19827d56f3d48382a1256 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 14 Jan 2002 09:35:52 +0000 Subject: Rewritten to use a cache for body searches when online. Will need some 2002-01-14 Not Zed * providers/imap/camel-imap-search.c (imap_body_contains): Rewritten to use a cache for body searches when online. Will need some heavy testing but so far seems to be beneficial. * providers/imap/camel-imap-folder.c (imap_search_by_expression, search_by_uids): dont initialise search object here. (camel_imap_folder_new): Setup search object here with pointer to cache dir. 2001-12-01 Not Zed * camel-store-summary.[ch]: New class to store a store's folder list in. Not yet completed. svn path=/trunk/; revision=15314 --- camel/camel-private.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'camel/camel-private.h') diff --git a/camel/camel-private.h b/camel/camel-private.h index b73ef9a36d..7eb12e6ae2 100644 --- a/camel/camel-private.h +++ b/camel/camel-private.h @@ -164,6 +164,23 @@ struct _CamelFolderSummaryPrivate { #define CAMEL_SUMMARY_UNLOCK(f, l) #endif +struct _CamelStoreSummaryPrivate { +#ifdef ENABLE_THREADS + GMutex *summary_lock; /* for the summary hashtable/array */ + GMutex *io_lock; /* load/save lock, for access to saved_count, etc */ + GMutex *alloc_lock; /* for setting up and using allocators */ + GMutex *ref_lock; /* for reffing/unreffing messageinfo's ALWAYS obtain before summary_lock */ +#endif +}; + +#ifdef ENABLE_THREADS +#define CAMEL_STORE_SUMMARY_LOCK(f, l) (g_mutex_lock(((CamelStoreSummary *)f)->priv->l)) +#define CAMEL_STORE_SUMMARY_UNLOCK(f, l) (g_mutex_unlock(((CamelStoreSummary *)f)->priv->l)) +#else +#define CAMEL_STORE_SUMMARY_LOCK(f, l) +#define CAMEL_STORE_SUMMARY_UNLOCK(f, l) +#endif + struct _CamelVeeFolderPrivate { GList *folders; /* lock using subfolder_lock before changing/accessing */ GList *folders_changed; /* for list of folders that have changed between updates */ -- cgit