var.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef _clish_var_h
  2. #define _clish_var_h
  3. #include "lub/types.h"
  4. #include "lub/bintree.h"
  5. #include "clish/action.h"
  6. typedef struct clish_var_s clish_var_t;
  7. /*=====================================
  8. * VAR INTERFACE
  9. *===================================== */
  10. /*-----------------
  11. * meta functions
  12. *----------------- */
  13. int clish_var_bt_compare(const void *clientnode, const void *clientkey);
  14. void clish_var_bt_getkey(const void *clientnode, lub_bintree_key_t * key);
  15. size_t clish_var_bt_offset(void);
  16. clish_var_t *clish_var_new(const char *name);
  17. /*-----------------
  18. * methods
  19. *----------------- */
  20. void clish_var_delete(clish_var_t *instance);
  21. void clish_var_dump(const clish_var_t *instance);
  22. void clish_var_xml2c(clish_var_t *instance);
  23. /*-----------------
  24. * attributes
  25. *----------------- */
  26. const char *clish_var__get_name(const clish_var_t *instance);
  27. void clish_var__set_dynamic(clish_var_t *instance, bool_t defval);
  28. bool_t clish_var__get_dynamic(const clish_var_t *instance);
  29. void clish_var__set_value(clish_var_t *instance, const char *value);
  30. char *clish_var__get_value(const clish_var_t *instance);
  31. clish_action_t *clish_var__get_action(const clish_var_t *instance);
  32. void clish_var__set_saved(clish_var_t *instance, const char *value);
  33. char *clish_var__get_saved(const clish_var_t *instance);
  34. #endif /* _clish_var_h */