libyang  2.0.7
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
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 {
92  LYS_IN_YIN = 3
94 
105 LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features,
106  const struct lys_module **module);
107 
120 LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, const struct lys_module **module);
121 
137 LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, const struct lys_module **module);
138 
151 LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, const 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_ */
libyang context handler.
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:242
const char * name
Definition: tree_schema.h:2297
const char * revision
Definition: tree_schema.h:2298
struct ly_ctx * ctx
Definition: tree_schema.h:2296
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.
LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, const struct lys_module **module)
Load a schema into the specified context.
LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features, const 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, const struct lys_module **module)
Read a schema from file descriptor into the specified context.
LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, const 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:89
@ LYS_IN_UNKNOWN
Definition: parser_schema.h:90
@ LYS_IN_YIN
Definition: parser_schema.h:92
@ LYS_IN_YANG
Definition: parser_schema.h:91
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2295
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:25
Parser input structure specifying where the data are read.