2 * Copyright (C) 2000 Ximian Inc.
5 * Michael Zucchi <notzed@ximian.com>
6 * Dan Winship <danw@ximian.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of version 2 of the GNU Lesser General Public
10 * License as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
23 #ifndef _CAMEL_IMAP_SUMMARY_H
24 #define _CAMEL_IMAP_SUMMARY_H
26 #include "camel-imap-types.h"
27 #include <camel/camel-folder-summary.h>
28 #include <camel/camel-exception.h>
30 #define CAMEL_IMAP_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_imap_summary_get_type (), CamelImapSummary)
31 #define CAMEL_IMAP_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_summary_get_type (), CamelImapSummaryClass)
32 #define CAMEL_IS_IMAP_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_imap_summary_get_type ())
34 #define CAMEL_IMAP_SERVER_FLAGS (CAMEL_MESSAGE_ANSWERED | \
35 CAMEL_MESSAGE_DELETED | \
36 CAMEL_MESSAGE_DRAFT | \
37 CAMEL_MESSAGE_FLAGGED | \
43 CAMEL_IMAP_MESSAGE_RECENT = 1<<17,
45 /* We store the label in flags too, to ease processing.
46 TODO: Move this to camel-folder-summary, BUT don't use
47 1 bit per label, instead use a bitfield of 3 bits */
49 CAMEL_IMAP_MESSAGE_LABEL1 = 1<<18,
50 CAMEL_IMAP_MESSAGE_LABEL2 = 1<<19,
51 CAMEL_IMAP_MESSAGE_LABEL3 = 1<<20,
52 CAMEL_IMAP_MESSAGE_LABEL4 = 1<<21,
53 CAMEL_IMAP_MESSAGE_LABEL5 = 1<<22,
54 CAMEL_IMAP_MESSAGE_LABEL_MASK = 31<<18
57 typedef struct _CamelImapSummaryClass CamelImapSummaryClass;
59 typedef struct _CamelImapMessageContentInfo {
60 CamelMessageContentInfo info;
62 } CamelImapMessageContentInfo;
64 typedef struct _CamelImapMessageInfo {
65 CamelMessageInfoBase info;
68 } CamelImapMessageInfo;
70 struct _CamelImapSummary {
71 CamelFolderSummary parent;
77 struct _CamelImapSummaryClass {
78 CamelFolderSummaryClass parent_class;
82 CamelType camel_imap_summary_get_type (void);
83 CamelFolderSummary *camel_imap_summary_new (struct _CamelFolder *folder, const char *filename);
85 void camel_imap_summary_add_offline (CamelFolderSummary *summary,
87 CamelMimeMessage *message,
88 const CamelMessageInfo *info);
90 void camel_imap_summary_add_offline_uncached (CamelFolderSummary *summary,
92 const CamelMessageInfo *info);
96 #endif /* ! _CAMEL_IMAP_SUMMARY_H */