kcommand.h 643 B

1234567891011121314151617181920212223242526272829303132
  1. /** @file kcommand.h
  2. *
  3. * @brief Klish scheme's "command" entry
  4. */
  5. #ifndef _klish_kcommand_h
  6. #define _klish_kcommand_h
  7. #include <klish/kparam.h>
  8. typedef struct kcommand_s kcommand_t;
  9. typedef struct kcommand_info_s {
  10. char *name;
  11. char *help;
  12. } kcommand_info_t;
  13. C_DECL_BEGIN
  14. kcommand_t *kcommand_new(kcommand_info_t info);
  15. kcommand_t *kcommand_new_static(kcommand_info_t info);
  16. void kcommand_free(kcommand_t *command);
  17. const char *kcommand_name(const kcommand_t *command);
  18. const char *kcommand_help(const kcommand_t *command);
  19. bool_t kcommand_add_param(kcommand_t *command, kparam_t *param);
  20. C_DECL_END
  21. #endif // _klish_kcommand_h