Add optimized indexing capabilities for phone number values.
[platform/upstream/evolution-data-server.git] / camel / camel-imapx-folder.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-folder.h : Class for a IMAP folder */
3
4 /*
5  * Authors: Michael Zucchi <notzed@ximian.com>
6  *
7  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
8  *
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.
12  *
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.
17  *
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.
22  */
23
24 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
25 #error "Only <camel/camel.h> can be included directly."
26 #endif
27
28 #ifndef CAMEL_IMAPX_FOLDER_H
29 #define CAMEL_IMAPX_FOLDER_H
30
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>
35
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))
54
55 G_BEGIN_DECLS
56
57 typedef struct _CamelIMAPXFolder CamelIMAPXFolder;
58 typedef struct _CamelIMAPXFolderClass CamelIMAPXFolderClass;
59 typedef struct _CamelIMAPXFolderPrivate CamelIMAPXFolderPrivate;
60
61 struct _CamelIMAPXFolder {
62         CamelOfflineFolder parent;
63         CamelIMAPXFolderPrivate *priv;
64
65         gchar *raw_name;
66         CamelDataCache *cache;
67         CamelFolderSearch *search;
68
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;
74
75         /* hash table of UIDs to ignore as recent when updating folder */
76         GHashTable *ignore_recent;
77
78         GMutex search_lock;
79         GMutex stream_lock;
80
81         gboolean apply_filters;         /* persistent property */
82 };
83
84 struct _CamelIMAPXFolderClass {
85         CamelOfflineFolderClass parent_class;
86 };
87
88 GType           camel_imapx_folder_get_type     (void);
89 CamelFolder *   camel_imapx_folder_new          (CamelStore *parent,
90                                                  const gchar *path,
91                                                  const gchar *raw,
92                                                  GError **error);
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);
104
105 G_END_DECLS
106
107 #endif /* CAMEL_IMAPX_FOLDER_H */