diff options
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 21 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-summary.c | 11 | ||||
-rw-r--r-- | camel/providers/local/camel-mbox-summary.c | 9 |
3 files changed, 21 insertions, 20 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; diff --git a/camel/providers/imap/camel-imap-summary.c b/camel/providers/imap/camel-imap-summary.c index ca7a2ab737..cd7444559e 100644 --- a/camel/providers/imap/camel-imap-summary.c +++ b/camel/providers/imap/camel-imap-summary.c @@ -30,7 +30,7 @@ #include <stdlib.h> #include "camel-imap-summary.h" -#include <camel/camel-mime-message.h> +#include "camel-file-utils.h" #define CAMEL_IMAP_SUMMARY_VERSION (0x300) @@ -110,7 +110,6 @@ camel_imap_summary_new (const char *filename) { CamelFolderSummary *summary = CAMEL_FOLDER_SUMMARY ( camel_object_new (camel_imap_summary_get_type ())); - CamelImapSummary *imap_summary = (CamelImapSummary *)summary; camel_folder_summary_set_build_content (summary, TRUE); camel_folder_summary_set_filename (summary, filename); @@ -132,7 +131,7 @@ summary_header_load (CamelFolderSummary *s, FILE *in) if (camel_imap_summary_parent->summary_header_load (s, in) == -1) return -1; - return camel_folder_summary_decode_uint32 (in, &ims->validity); + return camel_file_util_decode_uint32 (in, &ims->validity); } static int @@ -143,7 +142,7 @@ summary_header_save (CamelFolderSummary *s, FILE *out) if (camel_imap_summary_parent->summary_header_save (s, out) == -1) return -1; - return camel_folder_summary_encode_uint32 (out, ims->validity); + return camel_file_util_encode_uint32 (out, ims->validity); } @@ -157,7 +156,7 @@ message_info_load (CamelFolderSummary *s, FILE *in) if (info) { iinfo = (CamelImapMessageInfo *)info; - if (camel_folder_summary_decode_uint32 (in, &iinfo->server_flags) == -1) + if (camel_file_util_decode_uint32 (in, &iinfo->server_flags) == -1) goto error; } @@ -175,7 +174,7 @@ message_info_save (CamelFolderSummary *s, FILE *out, CamelMessageInfo *info) if (camel_imap_summary_parent->message_info_save (s, out, info) == -1) return -1; - return camel_folder_summary_encode_uint32 (out, iinfo->server_flags); + return camel_file_util_encode_uint32 (out, iinfo->server_flags); } diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c index 5f3691834f..3f0dd100dd 100644 --- a/camel/providers/local/camel-mbox-summary.c +++ b/camel/providers/local/camel-mbox-summary.c @@ -36,6 +36,7 @@ #include <stdlib.h> #include "camel-mbox-summary.h" +#include "camel/camel-file-utils.h" #include "camel/camel-mime-message.h" #include "camel/camel-operation.h" @@ -152,7 +153,7 @@ summary_header_load(CamelFolderSummary *s, FILE *in) if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_load(s, in) == -1) return -1; - return camel_folder_summary_decode_uint32(in, &mbs->folder_size); + return camel_file_util_decode_uint32(in, &mbs->folder_size); } static int @@ -163,7 +164,7 @@ summary_header_save(CamelFolderSummary *s, FILE *out) if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->summary_header_save(s, out) == -1) return -1; - return camel_folder_summary_encode_uint32(out, mbs->folder_size); + return camel_file_util_encode_uint32(out, mbs->folder_size); } static CamelMessageInfo * @@ -207,7 +208,7 @@ message_info_load(CamelFolderSummary *s, FILE *in) if (mi) { CamelMboxMessageInfo *mbi = (CamelMboxMessageInfo *)mi; - if (camel_folder_summary_decode_off_t(in, &mbi->frompos) == -1) + if (camel_file_util_decode_off_t(in, &mbi->frompos) == -1) goto error; } @@ -225,7 +226,7 @@ message_info_save(CamelFolderSummary *s, FILE *out, CamelMessageInfo *mi) io(printf("saving mbox message info\n")); if (((CamelFolderSummaryClass *)camel_mbox_summary_parent)->message_info_save(s, out, mi) == -1 - || camel_folder_summary_encode_off_t(out, mbi->frompos) == -1) + || camel_file_util_encode_off_t(out, mbi->frompos) == -1) return -1; return 0; |