1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-search.h: IMAP folder search */
6 * Dan Winship <danw@ximian.com>
8 * Copyright 2000 Ximian, Inc. (www.ximian.com)
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.
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.
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.
26 #ifndef _CAMEL_IMAP_SEARCH_H
27 #define _CAMEL_IMAP_SEARCH_H
29 #include <camel/camel-folder-search.h>
30 #include <libedataserver/e-msgport.h>
31 #include <camel/camel-data-cache.h>
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 ())
40 typedef struct _CamelImapSearchClass CamelImapSearchClass;
42 struct _CamelImapSearch {
43 CamelFolderSearch parent;
45 guint32 lastuid; /* current 'last uid' for the folder */
46 guint32 validity; /* validity of the current folder */
48 CamelDataCache *cache; /* disk-cache for searches */
50 /* cache of body search matches */
51 unsigned int matches_count;
53 GHashTable *matches_hash;
56 struct _CamelImapSearchClass {
57 CamelFolderSearchClass parent_class;
61 CamelType camel_imap_search_get_type (void);
62 CamelFolderSearch *camel_imap_search_new (const char *cachedir);
66 #endif /* ! _CAMEL_IMAP_SEARCH_H */