category_table.h 906 B

1234567891011121314151617181920212223242526272829
  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. #ifndef __zlog_category_table_h
  9. #define __zlog_category_table_h
  10. #include "zc_defs.h"
  11. #include "category.h"
  12. zc_hashtable_t *zlog_category_table_new(void);
  13. void zlog_category_table_del(zc_hashtable_t * categories);
  14. void zlog_category_table_profile(zc_hashtable_t * categories, int flag);
  15. /* if none, create new and return */
  16. zlog_category_t *zlog_category_table_fetch_category(
  17. zc_hashtable_t * categories,
  18. const char *category_name, zc_arraylist_t * rules);
  19. int zlog_category_table_update_rules(zc_hashtable_t * categories, zc_arraylist_t * new_rules);
  20. void zlog_category_table_commit_rules(zc_hashtable_t * categories);
  21. void zlog_category_table_rollback_rules(zc_hashtable_t * categories);
  22. #endif