Now inbound_cap_ls() can enable extensions when a bouncer uses a namespace for the...
[rofl0r-ixchat.git] / src / common / tree.h
blob96ab6cdb28d1c7d3bb5da657163d77fa483c7b55
1 #ifndef XCHAT_TREE_H
2 #define XCHAT_TREE_H
4 typedef struct _tree tree;
6 typedef int (tree_cmp_func) (const void *keya, const void *keyb, void *data);
7 typedef int (tree_traverse_func) (const void *key, void *data);
9 tree *tree_new (tree_cmp_func *cmp, void *data);
10 void tree_destroy (tree *t);
11 void *tree_find (tree *t, void *key, tree_cmp_func *cmp, void *data, int *pos);
12 int tree_remove (tree *t, void *key, int *pos);
13 void tree_remove_at_pos (tree *t, int pos);
14 void tree_foreach (tree *t, tree_traverse_func *func, void *data);
15 int tree_insert (tree *t, void *key);
16 void tree_append (tree* t, void *key);
17 int tree_size (tree *t);
19 #endif