libyang  2.0.7
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 lyd_node;
25 struct lysc_ctx;
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
46 #define LYS_COMPILE_GROUPING 0x01
51 #define LYS_COMPILE_DISABLED 0x02
54 #define LYS_COMPILE_NO_CONFIG 0x04
55 #define LYS_COMPILE_NO_DISABLED 0x08
57 #define LYS_COMPILE_RPC_INPUT (LYS_IS_INPUT | LYS_COMPILE_NO_CONFIG)
58 #define LYS_COMPILE_RPC_OUTPUT (LYS_IS_OUTPUT | LYS_COMPILE_NO_CONFIG)
59 #define LYS_COMPILE_NOTIFICATION (LYS_IS_NOTIF | LYS_COMPILE_NO_CONFIG)
71 struct lysc_ctx;
72 
78 struct ly_ctx *lysc_ctx_get_ctx(const struct lysc_ctx *ctx);
79 
85 uint32_t *lysc_ctx_get_options(const struct lysc_ctx *ctx);
86 
92 const char *lysc_ctx_get_path(const struct lysc_ctx *ctx);
93 
109 LY_ERR lys_compile_extension_instance(struct lysc_ctx *ctx, const struct lysp_ext_instance *ext_p, struct lysc_ext_instance *ext);
110 
119 void lysc_update_path(struct lysc_ctx *ctx, struct lys_module *parent_module, const char *name);
120 
127 struct lysc_ext *lysc_ext_dup(struct lysc_ext *orig);
128 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* LY_PLUGINS_EXTS_COMPILE_H_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:242
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.
struct lysc_ext * lysc_ext_dup(struct lysc_ext *orig)
Duplicate the compiled extension (definition) structure.
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.
struct ly_ctx * lysc_ctx_get_ctx(const struct lysc_ctx *ctx)
YANG schema compilation context getter for libyang context.
uint32_t * lysc_ctx_get_options(const struct lysc_ctx *ctx)
YANG schema compilation context getter for compilation options.
const char * lysc_ctx_get_path(const struct lysc_ctx *ctx)
YANG schema compilation context getter for path being currently processed.
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2295
Compiled YANG extension-stmt.
Definition: tree_schema.h:1399
YANG extension instance.
Definition: tree_schema.h:1425
YANG extension instance.
Definition: tree_schema.h:523
Logger manipulation routines and error definitions.
Generic structure for a data node.
Definition: tree_data.h:754
libyang representation of YANG schema trees.