1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-folder.h : Class for a IMAP folder */
5 * Authors: Michael Zucchi <notzed@ximian.com>
7 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU Lesser General Public
11 * License as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
25 #error "Only <camel/camel.h> can be included directly."
28 #ifndef CAMEL_IMAPX_FOLDER_H
29 #define CAMEL_IMAPX_FOLDER_H
31 #include <camel/camel-offline-folder.h>
32 #include <camel/camel-data-cache.h>
33 #include <camel/camel-folder-search.h>
34 #include <camel/camel-store.h>
36 /* Standard GObject macros */
37 #define CAMEL_TYPE_IMAPX_FOLDER \
38 (camel_imapx_folder_get_type ())
39 #define CAMEL_IMAPX_FOLDER(obj) \
40 (G_TYPE_CHECK_INSTANCE_CAST \
41 ((obj), CAMEL_TYPE_IMAPX_FOLDER, CamelIMAPXFolder))
42 #define CAMEL_IMAPX_FOLDER_CLASS(cls) \
43 (G_TYPE_CHECK_CLASS_CAST \
44 ((cls), CAMEL_TYPE_IMAPX_FOLDER, CamelIMAPXFolderClass))
45 #define CAMEL_IS_IMAPX_FOLDER(obj) \
46 (G_TYPE_CHECK_INSTANCE_TYPE \
47 ((obj), CAMEL_TYPE_IMAPX_FOLDER))
48 #define CAMEL_IS_IMAPX_FOLDER_CLASS(cls) \
49 (G_TYPE_CHECK_CLASS_TYPE \
50 ((cls), CAMEL_TYPE_IMAPX_FOLDER))
51 #define CAMEL_IMAPX_FOLDER_GET_CLASS(obj) \
52 (G_TYPE_INSTANCE_GET_CLASS \
53 ((obj), CAMEL_TYPE_IMAPX_FOLDER, CamelIMAPXFolderClass))
57 typedef struct _CamelIMAPXFolder CamelIMAPXFolder;
58 typedef struct _CamelIMAPXFolderClass CamelIMAPXFolderClass;
59 typedef struct _CamelIMAPXFolderPrivate CamelIMAPXFolderPrivate;
61 struct _CamelIMAPXFolder {
62 CamelOfflineFolder parent;
63 CamelIMAPXFolderPrivate *priv;
66 CamelDataCache *cache;
67 CamelFolderSearch *search;
69 guint32 exists_on_server;
70 guint32 unread_on_server;
71 guint64 modseq_on_server;
72 guint64 uidvalidity_on_server;
73 guint32 uidnext_on_server;
75 /* hash table of UIDs to ignore as recent when updating folder */
76 GHashTable *ignore_recent;
81 gboolean apply_filters; /* persistent property */
84 struct _CamelIMAPXFolderClass {
85 CamelOfflineFolderClass parent_class;
88 GType camel_imapx_folder_get_type (void);
89 CamelFolder * camel_imapx_folder_new (CamelStore *parent,
93 gchar ** camel_imapx_folder_dup_quota_root_names
94 (CamelIMAPXFolder *folder);
95 void camel_imapx_folder_set_quota_root_names
96 (CamelIMAPXFolder *folder,
97 const gchar **quota_root_names);
98 void camel_imapx_folder_add_move_to_real_junk
99 (CamelIMAPXFolder *folder,
100 const gchar *message_uid);
101 void camel_imapx_folder_add_move_to_real_trash
102 (CamelIMAPXFolder *folder,
103 const gchar *message_uid);
107 #endif /* CAMEL_IMAPX_FOLDER_H */