3 * Copyright (C) 2001 Ximian Inc.
5 * Authors: Michael Zucchi <notzed@ximian.com>
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.
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.
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.
22 #ifndef _CAMEL_TEXT_INDEX_H
23 #define _CAMEL_TEXT_INDEX_H
25 #include <camel/camel-exception.h>
26 #include <camel/camel-object.h>
27 #include "camel-index.h"
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 ())
35 typedef struct _CamelTextIndex CamelTextIndex;
36 typedef struct _CamelTextIndexClass CamelTextIndexClass;
38 typedef struct _CamelTextIndexName CamelTextIndexName;
39 typedef struct _CamelTextIndexNameClass CamelTextIndexNameClass;
41 typedef struct _CamelTextIndexCursor CamelTextIndexCursor;
42 typedef struct _CamelTextIndexCursorClass CamelTextIndexCursorClass;
44 typedef struct _CamelTextIndexKeyCursor CamelTextIndexKeyCursor;
45 typedef struct _CamelTextIndexKeyCursorClass CamelTextIndexKeyCursorClass;
47 typedef void (*CamelTextIndexFunc)(CamelTextIndex *idx, const char *word, char *buffer);
49 /* ********************************************************************** */
51 struct _CamelTextIndexCursor {
52 CamelIndexCursor parent;
54 struct _CamelTextIndexCursorPrivate *priv;
57 struct _CamelTextIndexCursorClass {
58 CamelIndexCursorClass parent;
61 CamelType camel_text_index_cursor_get_type(void);
63 /* ********************************************************************** */
65 struct _CamelTextIndexKeyCursor {
66 CamelIndexCursor parent;
68 struct _CamelTextIndexKeyCursorPrivate *priv;
71 struct _CamelTextIndexKeyCursorClass {
72 CamelIndexCursorClass parent;
75 CamelType camel_text_index_key_cursor_get_type(void);
77 /* ********************************************************************** */
79 struct _CamelTextIndexName {
80 CamelIndexName parent;
82 struct _CamelTextIndexNamePrivate *priv;
85 struct _CamelTextIndexNameClass {
86 CamelIndexNameClass parent;
89 CamelType camel_text_index_name_get_type(void);
91 /* ********************************************************************** */
93 struct _CamelTextIndex {
96 struct _CamelTextIndexPrivate *priv;
99 struct _CamelTextIndexClass {
100 CamelIndexClass parent_class;
103 CamelType camel_text_index_get_type (void);
104 CamelTextIndex *camel_text_index_new(const char *path, int flags);
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);
111 void camel_text_index_dump(CamelTextIndex *idx);
112 void camel_text_index_info(CamelTextIndex *idx);
113 void camel_text_index_validate(CamelTextIndex *idx);
117 #endif /* ! _CAMEL_TEXT_INDEX_H */