Bug #606181 - Accepting bad SSL certificate applies to any hostname
[platform/upstream/evolution-data-server.git] / camel / camel-imapx-summary.h
1 /*
2  *  Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
3  *
4  *  Authors:
5  *    Michael Zucchi <notzed@ximian.com>
6  *    Dan Winship <danw@ximian.com>
7  *
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.
11  *
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.
16  *
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.
21  */
22
23 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
24 #error "Only <camel/camel.h> can be included directly."
25 #endif
26
27
28 #ifndef CAMEL_IMAPX_SUMMARY_H
29 #define CAMEL_IMAPX_SUMMARY_H
30
31 #include <camel/camel-folder-summary.h>
32 #include <camel/camel-folder.h>
33
34 /* Standard GObject macros */
35 #define CAMEL_TYPE_IMAPX_SUMMARY \
36         (camel_imapx_summary_get_type ())
37 #define CAMEL_IMAPX_SUMMARY(obj) \
38         (G_TYPE_CHECK_INSTANCE_CAST \
39         ((obj), CAMEL_TYPE_IMAPX_SUMMARY, CamelIMAPXSummary))
40 #define CAMEL_IMAPX_SUMMARY_CLASS(cls) \
41         (G_TYPE_CHECK_CLASS_CAST \
42         ((cls), CAMEL_TYPE_IMAPX_SUMMARY, CamelIMAPXSummaryClass))
43 #define CAMEL_IS_IMAPX_SUMMARY(obj) \
44         (G_TYPE_CHECK_INSTANCE_TYPE \
45         ((obj), CAMEL_TYPE_IMAPX_SUMMARY))
46 #define CAMEL_IS_IMAPX_SUMMARY_CLASS(cls) \
47         (G_TYPE_CHECK_CLASS_TYPE \
48         ((cls), CAMEL_TYPE_IMAPX_SUMMARY))
49 #define CAMEL_IMAPX_SUMMARY_GET_CLASS(obj) \
50         (G_TYPE_INSTANCE_GET_CLASS \
51         ((obj), CAMEL_TYPE_IMAPX_SUMMARY, CamelIMAPXSummaryClass))
52
53 #define CAMEL_IMAPX_SERVER_FLAGS \
54         (CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_DELETED | \
55          CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_FLAGGED | \
56          CAMEL_MESSAGE_JUNK | CAMEL_MESSAGE_NOTJUNK | \
57          CAMEL_MESSAGE_SEEN)
58
59 G_BEGIN_DECLS
60
61 typedef struct _CamelIMAPXSummary CamelIMAPXSummary;
62 typedef struct _CamelIMAPXSummaryClass CamelIMAPXSummaryClass;
63
64 typedef struct _CamelIMAPXMessageInfo CamelIMAPXMessageInfo;
65 typedef struct _CamelIMAPXMessageContentInfo CamelIMAPXMessageContentInfo;
66
67 struct _CamelIMAPXMessageContentInfo {
68         CamelMessageContentInfo info;
69 };
70
71 struct _CamelIMAPXMessageInfo {
72         CamelMessageInfoBase info;
73
74         guint32 server_flags;
75         CamelFlag *server_user_flags;
76 };
77
78 struct _CamelIMAPXSummary {
79         CamelFolderSummary parent;
80
81         guint32 version;
82         guint32 uidnext;
83         guint64 validity;
84         guint64 modseq;
85 };
86
87 struct _CamelIMAPXSummaryClass {
88         CamelFolderSummaryClass parent_class;
89 };
90
91 GType           camel_imapx_summary_get_type    (void);
92 CamelFolderSummary *
93                 camel_imapx_summary_new         (CamelFolder *folder);
94 void            camel_imapx_summary_add_offline (CamelFolderSummary *summary,
95                                                  const gchar *uid,
96                                                  CamelMimeMessage *message,
97                                                  const CamelMessageInfo *info);
98 void            camel_imapx_summary_add_offline_uncached
99                                                 (CamelFolderSummary *summary,
100                                                  const gchar *uid,
101                                                  const CamelMessageInfo *info);
102
103 G_END_DECLS
104
105 #endif /* CAMEL_IMAPX_SUMMARY_H */