1
0

var.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. /*-----------------
  23. * attributes
  24. *----------------- */
  25. const char *clish_var__get_name(const clish_var_t *instance);
  26. void clish_var__set_dynamic(clish_var_t *instance, bool_t defval);
  27. bool_t clish_var__get_dynamic(const clish_var_t *instance);
  28. void clish_var__set_value(clish_var_t *instance, const char *value);
  29. char *clish_var__get_value(const clish_var_t *instance);
  30. clish_action_t *clish_var__get_action(const clish_var_t *instance);
  31. void clish_var__set_saved(clish_var_t *instance, const char *value);
  32. char *clish_var__get_saved(const clish_var_t *instance);
  33. #endif /* _clish_var_h */