123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef _pline_h
- #define _pline_h
- #include <sysrepo.h>
- #include <sysrepo/xpath.h>
- typedef struct {
- char *xpath;
- char *value;
- bool_t active;
- } pexpr_t;
- typedef enum {
- PCOMPL_NODE = 0,
- PCOMPL_TYPE = 1,
- } pcompl_type_e;
- typedef struct {
- pcompl_type_e type;
- const struct lysc_node *node;
- char *xpath;
- } pcompl_t;
- typedef struct pline_s {
- faux_list_t *exprs;
- faux_list_t *compls;
- } pline_t;
- C_DECL_BEGIN
- pline_t *pline_new(void);
- void pline_free(pline_t *pline);
- pline_t *pline_parse(const struct ly_ctx *ctx, faux_argv_t *argv, uint32_t flags);
- pexpr_t *pline_current_expr(pline_t *pline);
- void pline_debug(pline_t *pline);
- void pline_print_completions(const pline_t *pline,
- sr_session_ctx_t *sess, bool_t help);
- C_DECL_END
- #endif
|