2 * Copyright (C) 2000 Ximian Inc.
4 * Authors: Michael Zucchi <notzed@ximian.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU Lesser General Public
8 * License as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef _CAMEL_MBOX_SUMMARY_H
22 #define _CAMEL_MBOX_SUMMARY_H
24 #include "camel-local-summary.h"
26 /* Enable the use of elm/pine style "Status" & "X-Status" headers */
29 #define CAMEL_MBOX_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_mbox_summary_get_type (), CamelMboxSummary)
30 #define CAMEL_MBOX_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_mbox_summary_get_type (), CamelMboxSummaryClass)
31 #define CAMEL_IS_MBOX_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_mbox_summary_get_type ())
35 typedef struct _CamelMboxSummary CamelMboxSummary;
36 typedef struct _CamelMboxSummaryClass CamelMboxSummaryClass;
38 typedef struct _CamelMboxMessageContentInfo {
39 CamelMessageContentInfo info;
40 } CamelMboxMessageContentInfo;
42 typedef struct _CamelMboxMessageInfo {
43 CamelLocalMessageInfo info;
46 } CamelMboxMessageInfo;
48 struct _CamelMboxSummary {
49 CamelLocalSummary parent;
51 CamelFolderChangeInfo *changes; /* used to build change sets */
54 size_t folder_size; /* size of the mbox file, last sync */
56 unsigned int xstatus:1; /* do we store/honour xstatus/status headers */
59 struct _CamelMboxSummaryClass {
60 CamelLocalSummaryClass parent_class;
63 int (*sync_quick)(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
64 /* sync requires copy */
65 int (*sync_full)(CamelMboxSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex);
68 CamelType camel_mbox_summary_get_type (void);
69 CamelMboxSummary *camel_mbox_summary_new (struct _CamelFolder *, const char *filename, const char *mbox_name, CamelIndex *index);
71 /* do we honour/use xstatus headers, etc */
72 void camel_mbox_summary_xstatus(CamelMboxSummary *mbs, int state);
74 /* build a new mbox from an existing mbox storing summary information */
75 int camel_mbox_summary_sync_mbox(CamelMboxSummary *cls, guint32 flags, CamelFolderChangeInfo *changeinfo, int fd, int fdout, CamelException *ex);
79 #endif /* ! _CAMEL_MBOX_SUMMARY_H */