diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-27 03:44:50 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-27 03:44:50 +0800 |
commit | 84e075645b9013f6c0f8200ebddee10b1904936a (patch) | |
tree | 74f643de637d9d67844a018ac34354a6872184a0 /camel/providers/imap/camel-imap-store.c | |
parent | 8605f534604aea28d0ebe6385f0f04c7df2a34c7 (diff) | |
download | gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar.gz gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar.bz2 gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar.lz gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar.xz gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.tar.zst gsoc2013-evolution-84e075645b9013f6c0f8200ebddee10b1904936a.zip |
New file, with the int, string, time_t, and off_t encode/decode routines
* camel-file-utils.c: New file, with the int, string, time_t, and
off_t encode/decode routines from camel-folder-summary.c moved
here and renamed, for the enjoyment of non-CamelFolderSummary
subclasses.
* Makefile.am (libcamel_la_SOURCES): Add camel-file-utils.c
(libcamelinclude_HEADERS): and camel-file-utils.h
* camel-folder-summary.c: Remove functions that were moved to
camel-file-utils.c, update uses of them for the new names.
(camel_folder_summary_{en,de}code_token are still here.)
* providers/local/camel-mbox-summary.c: Use camel_file_util_*
names
* providers/imap/camel-imap-summary.c: Use camel_file_util_* names
* providers/imap/camel-imap-store.c (imap_store_setup_online,
imap_store_setup_offline): Use camel_file_util_* names, which
makes much more sense since this isn't folder summary stuff.
svn path=/trunk/; revision=9590
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 37eb99623c..38f585d6e7 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -38,6 +38,7 @@ #include "camel-imap-folder.h" #include "camel-imap-utils.h" #include "camel-imap-command.h" +#include "camel-file-utils.h" #include "camel-folder.h" #include "camel-exception.h" #include "camel-session.h" @@ -568,8 +569,8 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex) g_free (path); /* Write header and capabilities */ - camel_folder_summary_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION); - camel_folder_summary_encode_uint32 (storeinfo, store->capabilities); + camel_file_util_encode_uint32 (storeinfo, IMAP_STOREINFO_VERSION); + camel_file_util_encode_uint32 (storeinfo, store->capabilities); /* Get namespace and hierarchy separator */ if ((store->capabilities & IMAP_CAPABILITY_NAMESPACE) && @@ -636,8 +637,8 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex) } /* Write namespace/separator out */ - camel_folder_summary_encode_string (storeinfo, store->namespace); - camel_folder_summary_encode_uint32 (storeinfo, store->dir_sep); + camel_file_util_encode_string (storeinfo, store->namespace); + camel_file_util_encode_uint32 (storeinfo, store->dir_sep); if (CAMEL_STORE (store)->flags & CAMEL_STORE_SUBSCRIPTIONS) { /* Get subscribed folders */ @@ -659,7 +660,7 @@ imap_store_setup_online (CamelImapStore *store, CamelException *ex) } g_hash_table_insert (store->subscribed_folders, name, GINT_TO_POINTER (1)); - camel_folder_summary_encode_string (storeinfo, result); + camel_file_util_encode_string (storeinfo, result); } camel_imap_response_free (response); } @@ -680,20 +681,20 @@ imap_store_setup_offline (CamelImapStore *store, CamelException *ex) g_free (path); tmp = 0; if (storeinfo) - camel_folder_summary_decode_uint32 (storeinfo, &tmp); + camel_file_util_decode_uint32 (storeinfo, &tmp); if (tmp != IMAP_STOREINFO_VERSION) { /* This must set ex and return FALSE if we're here... */ return camel_imap_store_check_online (store, ex); } - camel_folder_summary_decode_uint32 (storeinfo, &store->capabilities); - camel_folder_summary_decode_string (storeinfo, &store->namespace); - camel_folder_summary_decode_uint32 (storeinfo, &tmp); + camel_file_util_decode_uint32 (storeinfo, &store->capabilities); + camel_file_util_decode_string (storeinfo, &store->namespace); + camel_file_util_decode_uint32 (storeinfo, &tmp); store->dir_sep = tmp; /* Get subscribed folders */ store->subscribed_folders = g_hash_table_new (g_str_hash, g_str_equal); - while (camel_folder_summary_decode_string (storeinfo, &buf) == 0) { + while (camel_file_util_decode_string (storeinfo, &buf) == 0) { if (!imap_parse_list_response (buf, NULL, NULL, &name)) { g_free (buf); continue; |