1 /*
2  * This file is part of the zlog Library.
3  *
4  * Copyright (C) 2011 by Hardy Simpson <HardySimpson1984@gmail.com>
5  *
6  * Licensed under the LGPL v2.1, see the file COPYING in base directory.
7  */
8 
9 #ifndef __zlog_category_table_h
10 #define __zlog_category_table_h
11 
12 #include "zc_defs.h"
13 #include "category.h"
14 
15 zc_hashtable_t *zlog_category_table_new(void);
16 void zlog_category_table_del(zc_hashtable_t * categories);
17 void zlog_category_table_profile(zc_hashtable_t * categories, int flag);
18 
19 /* if none, create new and return */
20 zlog_category_t *zlog_category_table_fetch_category(
21 			zc_hashtable_t * categories,
22 		 	const char *category_name, zc_arraylist_t * rules);
23 
24 int zlog_category_table_update_rules(zc_hashtable_t * categories, zc_arraylist_t * new_rules);
25 void zlog_category_table_commit_rules(zc_hashtable_t * categories);
26 void zlog_category_table_rollback_rules(zc_hashtable_t * categories);
27 
28 #endif
29