From 84e075645b9013f6c0f8200ebddee10b1904936a Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 26 Apr 2001 19:44:50 +0000 Subject: 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 --- camel/providers/local/camel-mbox-summary.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'camel/providers/local') 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 #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; -- cgit v1.2.3