aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-folder.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-16 04:50:59 +0800
committerDan Winship <danw@src.gnome.org>2001-03-16 04:50:59 +0800
commit1f9d06c2aac1805bbd3922991d8332b44f16ad3e (patch)
tree0b363d1cb7795c0c20f4f734541b70291d09c213 /camel/providers/imap/camel-imap-folder.h
parent892997d8c0f0cc6105ca8b0a8a369b97aab45dcb (diff)
downloadgsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar.gz
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar.bz2
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar.lz
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar.xz
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.tar.zst
gsoc2013-evolution-1f9d06c2aac1805bbd3922991d8332b44f16ad3e.zip
First batch of disconnected IMAP-related stuff. This adds local
caching of message parts, but NOT any actual disconnected support. (But it should speed up IMAP use.) * providers/imap/camel-imap-message-cache.c: New class for caching message data to disk, and removing it when it's no longer relevant. Will eventually also support merging message parts together to save on files. Or maybe using a db instead of files? * providers/imap/camel-imap-private.h: Add a cache_lock to CamelImapFolderPrivate. This lock must be recursive, so make both locks EMutexes rather than GMutex. * providers/imap/camel-imap-folder.c (parse_fetch_response): "The only FETCH response parser you need!" Replaces the various almost-correct bits of code formerly scattered throughout this file with a single fully-correct function that can handle any FETCH response at any time, so we don't get confused by seeing a flags update when we were only expecting a message body, etc. (camel_imap_folder_fetch_data): FETCH a message body part either from the cache or the server (camel_imap_folder_changed): Remove expunged messages from the message cache. (camel_imap_folder_new): Change to take a directory instead of a summary file name. Create a CamelImapMessageCache for the folder. (imap_finalize): Unref the message cache. (camel_imap_folder_selected, imap_rescan, get_content, get_message, imap_get_message, imap_update_summary): Redone a bunch to use parse_fetch_data, CamelImapMessageCache, etc. * providers/imap/camel-imap-store.c (get_folder): Pass directory name to camel_imap_folder_new, not summary filename. Use e_path_to_physical to generate a path with /subfolders/ inserted between directory components. * providers/imap/camel-imap-wrapper.c (camel_imap_wrapper_new): Call camel_imap_folder_fetch_data (with cache_only TRUE) and if the data is cached, return an online datawrapper rather than an offline one. (write_to_stream): Use camel_imap_folder_fetch_data (with cache_only FALSE) here too * providers/imap/camel-imap-utils.c (imap_skip_list): Renamed from skip_list and made non-static. svn path=/trunk/; revision=8743
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.h')
-rw-r--r--camel/providers/imap/camel-imap-folder.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-folder.h b/camel/providers/imap/camel-imap-folder.h
index a943189f5a..6d969bf752 100644
--- a/camel/providers/imap/camel-imap-folder.h
+++ b/camel/providers/imap/camel-imap-folder.h
@@ -48,6 +48,7 @@ struct _CamelImapFolder {
struct _CamelImapFolderPrivate *priv;
CamelFolderSearch *search;
+ CamelImapMessageCache *cache;
};
@@ -63,7 +64,7 @@ typedef struct {
CamelFolder *camel_imap_folder_new (CamelStore *parent,
const char *folder_name,
const char *short_name,
- const char *summary_file,
+ const char *folder_dir,
CamelException *ex);
void camel_imap_folder_selected (CamelFolder *folder,
@@ -73,6 +74,12 @@ void camel_imap_folder_selected (CamelFolder *folder,
void camel_imap_folder_changed (CamelFolder *folder, int exists,
GArray *expunged, CamelException *ex);
+CamelStream *camel_imap_folder_fetch_data (CamelImapFolder *imap_folder,
+ const char *uid,
+ const char *section_text,
+ gboolean cache_only,
+ CamelException *ex);
+
/* Standard Camel function */
CamelType camel_imap_folder_get_type (void);