libyang  5.8.5
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
parser_schema.h
Go to the documentation of this file.
1 
16 #ifndef LY_PARSER_SCHEMA_H_
17 #define LY_PARSER_SCHEMA_H_
18 
19 #include "log.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 struct ly_in;
26 struct lys_module;
27 
95 typedef enum {
99 } LYS_INFORMAT;
100 
111 LIBYANG_API_DECL LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features,
112  struct lys_module **module);
113 
126 LIBYANG_API_DECL LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module);
127 
143 LIBYANG_API_DECL LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module);
144 
157 LIBYANG_API_DECL LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module);
158 
174 LIBYANG_API_DECL LY_ERR lys_search_localfile(const char * const *searchpaths, ly_bool cwd, const char *name, const char *revision,
175  char **localfile, LYS_INFORMAT *format);
176 
182 LIBYANG_API_DECL const char *ly_yang_module_dir(void);
183 
186 #ifdef __cplusplus
187 }
188 #endif
189 
190 #endif /* LY_PARSER_SCHEMA_H_ */
Parser input structure specifying the type of data input.
struct ly_ctx * ctx
Definition: tree_schema.h:2265
LIBYANG_API_DECL const char * ly_yang_module_dir(void)
Get the directory with internal libyang YANG modules.
LIBYANG_API_DECL LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module)
Load a schema into the specified context.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:255
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:29
LIBYANG_API_DECL LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module)
Read a schema from file descriptor into the specified context.
LIBYANG_API_DECL LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module)
Load a schema into the specified context from a file.
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition: parser_schema.h:95
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2264
LIBYANG_API_DECL LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features, struct lys_module **module)
Load a schema into the specified context.
Logger manipulation routines and error definitions.
LIBYANG_API_DECL LY_ERR lys_search_localfile(const char *const *searchpaths, ly_bool cwd, const char *name, const char *revision, char **localfile, LYS_INFORMAT *format)
Search for the schema file in the specified searchpaths.
const char * revision
Definition: tree_schema.h:2267
libyang context handler.
const char * name
Definition: tree_schema.h:2266