2004-02-16 Not Zed <NotZed@Ximian.com> ** See bug #51045. * providers/imap/camel-imap-store.c (fill_fi): similar to mbox version. (get_folder_counts): use fill_fi to try and get folder counts if we're not doing the hard slog. (get_one_folder_offline): use fill_fi to try to get folder counts from open folders or summaries. * providers/local/camel-maildir-store.c (fill_fi): similar to mbox version. (scan_dir): use fill_fi to get the unread count now. * providers/local/camel-mbox-store.c (fill_fi): helper to lookup unread count either from active folder or from summary file, if it's available. (scan_dir, get_folder_info): use helper above to get folder info. * devel-docs/camel-folder-summary.txt: New document describing the format/conventions in the CamelFolderSummary file. * providers/nntp/camel-nntp-summary.c (summary_header_load/save): * providers/imapp/camel-imapp-summary.c (summary_header_load/save): * providers/imap/camel-imap-summary.c (summary_header_load/save): Handle versions, per-class version number (1). * providers/local/camel-mbox-summary.c (summary_header_load/save): Handle versions properly, add a per-class version (1). Write out the folder size as a size_t rather than 32 bit int. * providers/local/camel-local-summary.c (summary_header_load/save): read/write the per-class version number (1). * camel-folder-summary.c (summary_header_load): do version checking differently, allow the version to be bumped without aborting the load. Added unread/deleted/junk counts to base header. (summary_header_save): Save out the new-format header. Version bumped to 13. * camel.c (camel_init): return 0 rather than spit a compiler warning. * camel-file-utils.c (camel_file_util_encode_*_t): macro-ise the type encoder/decoders. Also add size_t encoder/decoder. svn path=/trunk/; revision=24744
66 lines
2.1 KiB
C
66 lines
2.1 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
|
|
/*
|
|
* Authors:
|
|
* Michael Zucchi <notzed@ximian.com>
|
|
* Jeffrey Stedfast <fejj@ximian.com>
|
|
* Dan Winship <danw@ximian.com>
|
|
*
|
|
* Copyright (C) 2000, 2003 Ximian, Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of version 2 of the GNU General Public
|
|
* License as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
* USA
|
|
*/
|
|
|
|
|
|
#ifndef CAMEL_FILE_UTILS_H
|
|
#define CAMEL_FILE_UTILS_H 1
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#pragma }
|
|
#endif /* __cplusplus */
|
|
|
|
#include <glib.h>
|
|
#include <stdio.h>
|
|
#include <sys/types.h>
|
|
#include <time.h>
|
|
|
|
int camel_file_util_encode_fixed_int32 (FILE *out, gint32);
|
|
int camel_file_util_decode_fixed_int32 (FILE *in, gint32 *);
|
|
int camel_file_util_encode_uint32 (FILE *out, guint32);
|
|
int camel_file_util_decode_uint32 (FILE *in, guint32 *);
|
|
int camel_file_util_encode_time_t (FILE *out, time_t);
|
|
int camel_file_util_decode_time_t (FILE *in, time_t *);
|
|
int camel_file_util_encode_off_t (FILE *out, off_t);
|
|
int camel_file_util_decode_off_t (FILE *in, off_t *);
|
|
int camel_file_util_encode_size_t (FILE *out, size_t);
|
|
int camel_file_util_decode_size_t (FILE *in, size_t *);
|
|
int camel_file_util_encode_string (FILE *out, const char *);
|
|
int camel_file_util_decode_string (FILE *in, char **);
|
|
|
|
int camel_mkdir (const char *path, mode_t mode);
|
|
char *camel_file_util_safe_filename (const char *name);
|
|
|
|
ssize_t camel_read (int fd, char *buf, size_t n);
|
|
ssize_t camel_write (int fd, const char *buf, size_t n);
|
|
|
|
char *camel_file_util_savename(const char *filename);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* CAMEL_FILE_UTILS_H */
|