kcommand.h 647 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 icommand_s {
  10. char *name;
  11. char *help;
  12. iparam_t * (*params)[];
  13. } icommand_t;
  14. C_DECL_BEGIN
  15. kcommand_t *kcommand_new(icommand_t info);
  16. kcommand_t *kcommand_new_static(icommand_t info);
  17. void kcommand_free(kcommand_t *command);
  18. const char *kcommand_name(const kcommand_t *command);
  19. const char *kcommand_help(const kcommand_t *command);
  20. bool_t kcommand_add_param(kcommand_t *command, kparam_t *param);
  21. C_DECL_END
  22. #endif // _klish_kcommand_h