icommand.h 705 B

12345678910111213141516171819202122232425262728293031
  1. /** @file icommand.h
  2. *
  3. * @brief Klish scheme's "command" entry
  4. */
  5. #ifndef _klish_icommand_h
  6. #define _klish_icommand_h
  7. #include <klish/iparam.h>
  8. #include <klish/iaction.h>
  9. #include <klish/kcommand.h>
  10. typedef struct icommand_s {
  11. char *name;
  12. char *help;
  13. iparam_t * (*params)[];
  14. iaction_t * (*actions)[];
  15. } icommand_t;
  16. C_DECL_BEGIN
  17. bool_t icommand_parse(const icommand_t *info, kcommand_t *command,
  18. faux_error_t *error);
  19. bool_t icommand_parse_nested(const icommand_t *icommand, kcommand_t *kcommand,
  20. faux_error_t *error);
  21. kcommand_t *icommand_load(icommand_t *icommand, faux_error_t *error);
  22. char *icommand_deploy(const kcommand_t *kcommand, int level);
  23. C_DECL_END
  24. #endif // _klish_icommand_h