1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 4 * 5 * This library is free software: you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This library is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 */ 18 19 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION) 20 #error "Only <camel/camel.h> can be included directly." 21 #endif 22 23 #ifndef CAMEL_TRIE_H 24 #define CAMEL_TRIE_H 25 26 #include <glib.h> 27 28 G_BEGIN_DECLS 29 30 typedef struct _CamelTrie CamelTrie; 31 32 CamelTrie * camel_trie_new (gboolean icase); 33 void camel_trie_free (CamelTrie *trie); 34 void camel_trie_add (CamelTrie *trie, 35 const gchar *pattern, 36 gint pattern_id); 37 const gchar * camel_trie_search (CamelTrie *trie, 38 const gchar *buffer, 39 gsize buflen, 40 gint *matched_id); 41 42 G_END_DECLS 43 44 #endif /* CAMEL_TRIE_H */ 45