libyang  2.2.8
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 #include "log.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 struct ly_in;
25 struct lys_module;
26 
91 typedef enum {
95 } LYS_INFORMAT;
96 
107 LIBYANG_API_DECL LY_ERR lys_parse(struct ly_ctx *ctx, struct ly_in *in, LYS_INFORMAT format, const char **features,
108  struct lys_module **module);
109 
122 LIBYANG_API_DECL LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module);
123 
139 LIBYANG_API_DECL LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module);
140 
153 LIBYANG_API_DECL LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module);
154 
170 LIBYANG_API_DECL LY_ERR lys_search_localfile(const char * const *searchpaths, ly_bool cwd, const char *name, const char *revision,
171  char **localfile, LYS_INFORMAT *format);
172 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 #endif /* LY_PARSER_SCHEMA_H_ */
struct ly_ctx * ctx
Definition: tree_schema.h:2132
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.
uint8_t ly_bool
Type to indicate boolean value.
Definition: log.h:28
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.
Parser input structure specifying where the data are read.
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition: parser_schema.h:91
Available YANG schema tree structures representing YANG module.
Definition: tree_schema.h:2131
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:2134
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:240
libyang context handler.
const char * name
Definition: tree_schema.h:2133