aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-27 03:44:50 +0800
committerDan Winship <danw@src.gnome.org>2001-04-27 03:44:50 +0800
commit84e075645b9013f6c0f8200ebddee10b1904936a (patch)
tree74f643de637d9d67844a018ac34354a6872184a0 /camel/providers/local
parent8605f534604aea28d0ebe6385f0f04c7df2a34c7 (diff)
downloadgsoc2013-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/local')
-rw-r--r--camel/providers/local/camel-mbox-summary.c9
1 files changed, 5 insertions, 4 deletions
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;