2 * Copyright (C) 2000 Ximian Inc.
4 * Authors: Not Zed <notzed@lostzed.mmc.com.au>
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_MAILDIR_SUMMARY_H
22 #define _CAMEL_MAILDIR_SUMMARY_H
24 #include "camel-local-summary.h"
25 #include <camel/camel-folder.h>
26 #include <camel/camel-exception.h>
27 #include <camel/camel-index.h>
29 #define CAMEL_MAILDIR_SUMMARY(obj) CAMEL_CHECK_CAST (obj, camel_maildir_summary_get_type (), CamelMaildirSummary)
30 #define CAMEL_MAILDIR_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_maildir_summary_get_type (), CamelMaildirSummaryClass)
31 #define CAMEL_IS_MAILDIR_SUMMARY(obj) CAMEL_CHECK_TYPE (obj, camel_maildir_summary_get_type ())
35 typedef struct _CamelMaildirSummary CamelMaildirSummary;
36 typedef struct _CamelMaildirSummaryClass CamelMaildirSummaryClass;
38 typedef struct _CamelMaildirMessageContentInfo {
39 CamelMessageContentInfo info;
40 } CamelMaildirMessageContentInfo;
43 CAMEL_MAILDIR_INFO_FILENAME = CAMEL_MESSAGE_INFO_LAST,
44 CAMEL_MAILDIR_INFO_LAST,
47 typedef struct _CamelMaildirMessageInfo {
48 CamelLocalMessageInfo info;
50 char *filename; /* maildir has this annoying status shit on the end of the filename, use this to get the real message id */
51 } CamelMaildirMessageInfo;
53 struct _CamelMaildirSummary {
54 CamelLocalSummary parent;
55 struct _CamelMaildirSummaryPrivate *priv;
58 struct _CamelMaildirSummaryClass {
59 CamelLocalSummaryClass parent_class;
66 CamelType camel_maildir_summary_get_type (void);
67 CamelMaildirSummary *camel_maildir_summary_new (struct _CamelFolder *folder, const char *filename, const char *maildirdir, CamelIndex *index);
69 /* convert some info->flags to/from the messageinfo */
70 char *camel_maildir_summary_info_to_name(const CamelMaildirMessageInfo *info);
71 int camel_maildir_summary_name_to_info(CamelMaildirMessageInfo *info, const char *name);
73 /* TODO: could proably use get_string stuff */
74 #define camel_maildir_info_filename(x) (((CamelMaildirMessageInfo *)x)->filename)
75 #define camel_maildir_info_set_filename(x, s) (g_free(((CamelMaildirMessageInfo *)x)->filename),((CamelMaildirMessageInfo *)x)->filename = s)
79 #endif /* ! _CAMEL_MAILDIR_SUMMARY_H */