Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-text-index.h
1
2 /*
3  *  Copyright (C) 2001 Ximian Inc.
4  *
5  *  Authors: Michael Zucchi <notzed@ximian.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef _CAMEL_TEXT_INDEX_H
23 #define _CAMEL_TEXT_INDEX_H
24
25 #include <camel/camel-exception.h>
26 #include <camel/camel-object.h>
27 #include "camel-index.h"
28
29 #define CAMEL_TEXT_INDEX(obj)         CAMEL_CHECK_CAST (obj, camel_text_index_get_type (), CamelTextIndex)
30 #define CAMEL_TEXT_INDEX_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_text_index_get_type (), CamelTextIndexClass)
31 #define CAMEL_IS_TEXT_INDEX(obj)      CAMEL_CHECK_TYPE (obj, camel_text_index_get_type ())
32
33 G_BEGIN_DECLS
34
35 typedef struct _CamelTextIndex      CamelTextIndex;
36 typedef struct _CamelTextIndexClass CamelTextIndexClass;
37
38 typedef struct _CamelTextIndexName      CamelTextIndexName;
39 typedef struct _CamelTextIndexNameClass CamelTextIndexNameClass;
40
41 typedef struct _CamelTextIndexCursor      CamelTextIndexCursor;
42 typedef struct _CamelTextIndexCursorClass CamelTextIndexCursorClass;
43
44 typedef struct _CamelTextIndexKeyCursor      CamelTextIndexKeyCursor;
45 typedef struct _CamelTextIndexKeyCursorClass CamelTextIndexKeyCursorClass;
46
47 typedef void (*CamelTextIndexFunc)(CamelTextIndex *idx, const char *word, char *buffer);
48
49 /* ********************************************************************** */
50
51 struct _CamelTextIndexCursor {
52         CamelIndexCursor parent;
53
54         struct _CamelTextIndexCursorPrivate *priv;
55 };
56
57 struct _CamelTextIndexCursorClass {
58         CamelIndexCursorClass parent;
59 };
60
61 CamelType camel_text_index_cursor_get_type(void);
62
63 /* ********************************************************************** */
64
65 struct _CamelTextIndexKeyCursor {
66         CamelIndexCursor parent;
67
68         struct _CamelTextIndexKeyCursorPrivate *priv;
69 };
70
71 struct _CamelTextIndexKeyCursorClass {
72         CamelIndexCursorClass parent;
73 };
74
75 CamelType camel_text_index_key_cursor_get_type(void);
76
77 /* ********************************************************************** */
78
79 struct _CamelTextIndexName {
80         CamelIndexName parent;
81
82         struct _CamelTextIndexNamePrivate *priv;
83 };
84
85 struct _CamelTextIndexNameClass {
86         CamelIndexNameClass parent;
87 };
88
89 CamelType camel_text_index_name_get_type(void);
90
91 /* ********************************************************************** */
92
93 struct _CamelTextIndex {
94         CamelIndex parent;
95
96         struct _CamelTextIndexPrivate *priv;
97 };
98
99 struct _CamelTextIndexClass {
100         CamelIndexClass parent_class;
101 };
102
103 CamelType                  camel_text_index_get_type    (void);
104 CamelTextIndex    *camel_text_index_new(const char *path, int flags);
105
106 /* static utility functions */
107 int camel_text_index_check(const char *path);
108 int camel_text_index_rename(const char *old, const char *new);
109 int camel_text_index_remove(const char *old);
110
111 void camel_text_index_dump(CamelTextIndex *idx);
112 void camel_text_index_info(CamelTextIndex *idx);
113 void camel_text_index_validate(CamelTextIndex *idx);
114
115 G_END_DECLS
116
117 #endif /* ! _CAMEL_TEXT_INDEX_H */