private.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * private.h
  3. */
  4. #ifndef _pligin_sysrepo_private_h
  5. #define _plugin_sysrepo_private_h
  6. #include <faux/faux.h>
  7. #include <klish/kcontext_base.h>
  8. #include "pline.h"
  9. // Repository to edit with srp commands
  10. #define SRP_REPO_EDIT SR_DS_CANDIDATE
  11. // Defaut parse options
  12. #define SRP_DEFAULT_PARSE_OPTS ( \
  13. PPARSE_MULTI_KEYS_W_STMT | \
  14. PPARSE_JUNIPER_SHOW \
  15. )
  16. C_DECL_BEGIN
  17. // Types
  18. int srp_PLINE_SET(kcontext_t *context);
  19. int srp_PLINE_DEL(kcontext_t *context);
  20. int srp_PLINE_EDIT(kcontext_t *context);
  21. int srp_PLINE_INSERT_FROM(kcontext_t *context);
  22. int srp_PLINE_INSERT_TO(kcontext_t *context);
  23. // Completion/Help/Prompt
  24. int srp_compl(kcontext_t *context);
  25. int srp_help(kcontext_t *context);
  26. int srp_compl_insert_to(kcontext_t *context);
  27. int srp_help_insert_to(kcontext_t *context);
  28. int srp_prompt_edit_path(kcontext_t *context);
  29. // Operations
  30. int srp_set(kcontext_t *context);
  31. int srp_del(kcontext_t *context);
  32. int srp_edit(kcontext_t *context);
  33. int srp_top(kcontext_t *context);
  34. int srp_up(kcontext_t *context);
  35. int srp_insert(kcontext_t *context);
  36. int srp_commit(kcontext_t *context);
  37. int srp_rollback(kcontext_t *context);
  38. int srp_show(kcontext_t *context);
  39. int srp_show_running(kcontext_t *context);
  40. int srp_deactivate(kcontext_t *context);
  41. // Private
  42. bool_t show_xpath(sr_session_ctx_t *sess, const char *xpath, uint32_t flags);
  43. C_DECL_END
  44. #endif // _plugin_sysrepo_private_h