From 8e7d0e31cb1a6ac4c0b5f58522ac6b468b872f9d Mon Sep 17 00:00:00 2001 From: 6 Date: Fri, 7 Sep 2001 01:19:47 +0000 Subject: Thread function to perform filtering. (filter_free): Free the filter 2001-09-06 * providers/imap/camel-imap-folder.c (filter_proc): Thread function to perform filtering. (filter_free): Free the filter object. (camel_imap_folder_changed): If we have threads enabled, then queue up a request to perform filtering. For bug #4422. * providers/imap/camel-imap-store.c (camel_imap_msg_new): Create a new 'imap msg'. (camel_imap_msg_queue): Queue an 'imap msg'. (async_received): Handle receiving of imap msg in async thread. (async_destroy): Handle destroying of imap msg. (camel_imap_store_finalize): Destroy thread when done. (camel_imap_store_init): Setup thread. * providers/imap/camel-imap-store.h: Added an ethread to the store, for async processing. svn path=/trunk/; revision=12666 --- camel/providers/imap/camel-imap-store.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'camel/providers/imap/camel-imap-store.h') diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h index c467d6066b..458c1aa525 100644 --- a/camel/providers/imap/camel-imap-store.h +++ b/camel/providers/imap/camel-imap-store.h @@ -35,6 +35,25 @@ extern "C" { #include "camel-imap-types.h" #include "camel-disco-store.h" +#ifdef ENABLE_THREADS +#include "e-util/e-msgport.h" + +typedef struct _CamelImapMsg CamelImapMsg; + +struct _CamelImapMsg { + EMsg msg; + + void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m); + void (*free)(CamelImapStore *store, struct _CamelImapMsg *m); +}; + +CamelImapMsg *camel_imap_msg_new(void (*receive)(CamelImapStore *store, struct _CamelImapMsg *m), + void (*free)(CamelImapStore *store, struct _CamelImapMsg *m), + size_t size); +void camel_imap_msg_queue(CamelImapStore *store, CamelImapMsg *msg); + +#endif + #define CAMEL_IMAP_STORE_TYPE (camel_imap_store_get_type ()) #define CAMEL_IMAP_STORE(obj) (CAMEL_CHECK_CAST((obj), CAMEL_IMAP_STORE_TYPE, CamelImapStore)) #define CAMEL_IMAP_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAP_STORE_TYPE, CamelImapStoreClass)) @@ -73,6 +92,9 @@ struct _CamelImapStore { guint32 capabilities, parameters; char *namespace, dir_sep, *base_url, *storage_path; GHashTable *authtypes, *subscribed_folders; +#ifdef ENABLE_THREADS + EThread *async_thread; +#endif }; -- cgit v1.2.3