kcommand.h 550 B

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