libyang  2.0.194
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
plugins_exts_compile.h
Go to the documentation of this file.
1 
15 #ifndef LY_PLUGINS_EXTS_COMPILE_H_
16 #define LY_PLUGINS_EXTS_COMPILE_H_
17 
18 #include <stdint.h>
19 
20 #include "log.h"
21 #include "tree_schema.h"
22 
23 struct ly_ctx;
24 struct lysc_ctx;
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
45 #define LYS_COMPILE_GROUPING 0x01
50 #define LYS_COMPILE_DISABLED 0x02
53 #define LYS_COMPILE_NO_CONFIG 0x04
54 #define LYS_COMPILE_NO_DISABLED 0x08
56 #define LYS_COMPILE_RPC_INPUT (LYS_IS_INPUT | LYS_COMPILE_NO_CONFIG)
57 #define LYS_COMPILE_RPC_OUTPUT (LYS_IS_OUTPUT | LYS_COMPILE_NO_CONFIG)
58 #define LYS_COMPILE_NOTIFICATION (LYS_IS_NOTIF | LYS_COMPILE_NO_CONFIG)
70 struct lysc_ctx;
71 
77 LIBYANG_API_DECL struct ly_ctx *lysc_ctx_get_ctx(const struct lysc_ctx *ctx);
78 
84 LIBYANG_API_DECL uint32_t *lysc_ctx_get_options(const struct lysc_ctx *ctx);
85 
91 LIBYANG_API_DECL const char *lysc_ctx_get_path(const struct lysc_ctx *ctx);
92 
98 LIBYANG_API_DECL const struct lys_module *lysc_ctx_get_cur_mod(const struct lysc_ctx *ctx);
99 
105 LIBYANG_API_DECL struct lysp_module *lysc_ctx_get_pmod(const struct lysc_ctx *ctx);
106 
122 LIBYANG_API_DECL LY_ERR lys_compile_extension_instance(struct lysc_ctx *ctx, const struct lysp_ext_instance *ext_p,
123  struct lysc_ext_instance *ext);
124 
133 LIBYANG_API_DECL void lysc_update_path(struct lysc_ctx *ctx, struct lys_module *parent_module, const char *name);
134 
141 LIBYANG_API_DECL struct lysc_ext *lysc_ext_dup(struct lysc_ext *orig);
142 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* LY_PLUGINS_EXTS_COMPILE_H_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:244
LIBYANG_API_DECL void lysc_update_path(struct lysc_ctx *ctx, struct lys_module *parent_module, const char *name)
Update path in the compile context, which is used for logging where the compilation failed.
LIBYANG_API_DECL const struct lys_module * lysc_ctx_get_cur_mod(const struct lysc_ctx *ctx)
YANG schema compilation context getter for current module.
LIBYANG_API_DECL const char * lysc_ctx_get_path(const struct lysc_ctx *ctx)
YANG schema compilation context getter for path being currently processed.
LIBYANG_API_DECL struct lysc_ext * lysc_ext_dup(struct lysc_ext *orig)
Duplicate the compiled extension (definition) structure.
LIBYANG_API_DECL struct ly_ctx * lysc_ctx_get_ctx(const struct lysc_ctx *ctx)
YANG schema compilation context getter for libyang context.
LIBYANG_API_DECL struct lysp_module * lysc_ctx_get_pmod(const struct lysc_ctx *ctx)
YANG schema compilation context getter for currently processed module.
LIBYANG_API_DECL LY_ERR lys_compile_extension_instance(struct lysc_ctx *ctx, const struct lysp_ext_instance *ext_p, struct lysc_ext_instance *ext)
Compile substatements of an extension instance.
LIBYANG_API_DECL uint32_t * lysc_ctx_get_options(const struct lysc_ctx *ctx)
YANG schema compilation context getter for compilation options.
struct ly_ctx * ctx
Definition: tree_schema.h:2342
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2341
Compiled YANG extension-stmt.
Definition: tree_schema.h:1403
YANG extension instance.
Definition: tree_schema.h:1429
YANG extension instance.
Definition: tree_schema.h:525
Printable YANG schema tree structure representing YANG module.
Definition: tree_schema.h:1319
Logger manipulation routines and error definitions.
libyang representation of YANG schema trees.