From aad2d708c31bc7b238fc4f7027e5c48fcee5f062 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 26 Oct 2004 21:22:17 +0000 Subject: New files implementing a folder-info cache for offline mode (and faster 2004-10-26 Jeffrey Stedfast * providers/imap4/camel-imap4-store-summary.[c,h]: New files implementing a folder-info cache for offline mode (and faster startup I guess). * providers/imap4/camel-imap4-store.c (imap4_build_folder_info): Cache the folder-info for later use in offline mode. * providers/imap4/camel-imap4-utils.c (camel_imap4_get_path_delim): Instead of assigning top = "INBOX", do strcpy (top, "INBOX") so that we can later modify the string. Fixes bug #68814. 2004-10-25 Jeffrey Stedfast * providers/imap4/camel-imap4-engine.c (engine_parse_namespace): Updated to use the public function in camel-imap4-utils.c (camel_imap4_engine_finalize): Same. * providers/imap4/camel-imap4-store.c (imap4_construct): Setup and load the store summary. (camel_imap4_store_finalize): Unref the store summary. (imap4_get_folder): Implemented offline support. (imap4_folder_utf7_name): Pass the summary to get_delim rather than the engine. (imap4_create_folder): Same. (imap4_reconnect): Update the namespaces on the store summary. (connect_to_server): Update the store summary capabilities. * providers/imap4/camel-imap4-utils.c (camel_imap4_get_path_delim): Now takes a store-summary rather than an engine so that it will work in offline mode. (camel_imap4_namespace_clear): Moved here from camel-imap4-engine.c (camel_imap4_namespace_list_copy): New convenience function. (camel_imap4_namespace_list_free): New. * providers/imap4/camel-imap4-folder.c (camel_imap4_folder_new): Check the return value of summary loading in offline mode (if it fails, we can't get the folder). svn path=/trunk/; revision=27730 --- camel/providers/imap4/camel-imap4-utils.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'camel/providers/imap4/camel-imap4-utils.h') diff --git a/camel/providers/imap4/camel-imap4-utils.h b/camel/providers/imap4/camel-imap4-utils.h index c378165357..1bb8b00962 100644 --- a/camel/providers/imap4/camel-imap4-utils.h +++ b/camel/providers/imap4/camel-imap4-utils.h @@ -23,6 +23,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #pragma } @@ -38,11 +40,20 @@ void camel_imap4_flags_diff (flags_diff_t *diff, guint32 old, guint32 new); guint32 camel_imap4_flags_merge (flags_diff_t *diff, guint32 flags); guint32 camel_imap4_merge_flags (guint32 original, guint32 local, guint32 server); + struct _CamelIMAP4Engine; struct _CamelIMAP4Command; +struct _CamelFolderSummary; struct _camel_imap4_token_t; +struct _CamelIMAP4StoreSummary; +struct _CamelIMAP4NamespaceList; +struct _CamelIMAP4Namespace; + +void camel_imap4_namespace_clear (struct _CamelIMAP4Namespace **ns); +struct _CamelIMAP4NamespaceList *camel_imap4_namespace_list_copy (const struct _CamelIMAP4NamespaceList *nsl); +void camel_imap4_namespace_list_free (struct _CamelIMAP4NamespaceList *nsl); -char camel_imap4_get_path_delim (struct _CamelIMAP4Engine *engine, const char *full_name); +char camel_imap4_get_path_delim (struct _CamelIMAP4StoreSummary *s, const char *full_name); int camel_imap4_get_uid_set (struct _CamelIMAP4Engine *engine, struct _CamelFolderSummary *summary, GPtrArray *infos, int cur, size_t linelen, char **set); -- cgit