Tizen 2.1 base
[platform/core/uifw/anthy.git] / anthy / texttrie.h
1 #ifndef _texttrie_h_included_
2 #define _texttrie_h_included_
3
4 struct text_trie;
5
6 /* database manipulation */
7 struct text_trie *anthy_trie_open(const char *fn, int create);
8 void anthy_trie_close(struct text_trie *tt);
9 void anthy_trie_update_mapping(struct text_trie *tt);
10 /**/
11 int anthy_trie_add(struct text_trie *tt, const char *key, const char *body);
12 /* caller should free the result */
13 char *anthy_trie_find(struct text_trie *a, char *key);
14 void anthy_trie_delete(struct text_trie *tt, const char *key);
15 /**/
16 char *anthy_trie_find_next_key(struct text_trie *tt, char *buf, int len);
17 /**/
18 void anthy_trie_find_prefix(struct text_trie *tt, const char *str,
19                             char *buf, int len,
20                             int (*cb)(const char *key, const char *str));
21 /**/
22 void anthy_trie_print_array(struct text_trie *tt);
23
24 #endif