Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / imap / camel-imap-search.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-search.h: IMAP folder search */
3
4 /*
5  *  Authors:
6  *    Dan Winship <danw@ximian.com>
7  *
8  *  Copyright 2000 Ximian, Inc. (www.ximian.com)
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of version 2 of the GNU Lesser General Public
12  * License as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this program; if not, write to the
21  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  */
25
26 #ifndef _CAMEL_IMAP_SEARCH_H
27 #define _CAMEL_IMAP_SEARCH_H
28
29 #include <camel/camel-folder-search.h>
30 #include <libedataserver/e-msgport.h>
31 #include <camel/camel-data-cache.h>
32
33 #define CAMEL_IMAP_SEARCH_TYPE         (camel_imap_search_get_type ())
34 #define CAMEL_IMAP_SEARCH(obj)         CAMEL_CHECK_CAST (obj, camel_imap_search_get_type (), CamelImapSearch)
35 #define CAMEL_IMAP_SEARCH_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imap_search_get_type (), CamelImapSearchClass)
36 #define CAMEL_IS_IMAP_SEARCH(obj)      CAMEL_CHECK_TYPE (obj, camel_imap_search_get_type ())
37
38 G_BEGIN_DECLS
39
40 typedef struct _CamelImapSearchClass CamelImapSearchClass;
41
42 struct _CamelImapSearch {
43         CamelFolderSearch parent;
44
45         guint32 lastuid;        /* current 'last uid' for the folder */
46         guint32 validity;       /* validity of the current folder */
47
48         CamelDataCache *cache;  /* disk-cache for searches */
49
50         /* cache of body search matches */
51         unsigned int matches_count;
52         EDList matches;
53         GHashTable *matches_hash;
54 };
55
56 struct _CamelImapSearchClass {
57         CamelFolderSearchClass parent_class;
58
59 };
60
61 CamelType              camel_imap_search_get_type (void);
62 CamelFolderSearch *camel_imap_search_new      (const char *cachedir);
63
64 G_END_DECLS
65
66 #endif /* ! _CAMEL_IMAP_SEARCH_H */