libyang  2.0.112
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 
15 #ifndef LY_PARSER_SCHEMA_H_
16 #define LY_PARSER_SCHEMA_H_
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct ly_in;
23 struct lys_module;
24 
89 typedef enum {
93 } LYS_INFORMAT;
94 
105 LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features,
106  struct lys_module **module);
107 
120 LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module);
121 
137 LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module);
138 
151 LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module);
152 
168 LY_ERR lys_search_localfile(const char * const *searchpaths, ly_bool cwd, const char *name, const char *revision,
169  char **localfile, LYS_INFORMAT *format);
170 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* LY_PARSER_SCHEMA_H_ */
struct ly_ctx * ctx
Definition: tree_schema.h:2343
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:25
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.
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.
Parser input structure specifying where the data are read.
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 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.
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition: parser_schema.h:89
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2342
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.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:245
const char * revision
Definition: tree_schema.h:2345
libyang context handler.
const char * name
Definition: tree_schema.h:2344