Loading...
Searching...
No Matches
parser_schema.h
Go to the documentation of this file.
#ifndef LY_PARSER_SCHEMA_H_
#define LY_PARSER_SCHEMA_H_
#include "log.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ly_in;
struct lys_module;
typedef enum {
LYS_IN_UNKNOWN = 0,
LYS_IN_YANG = 1,
LYS_IN_YIN = 3
} LYS_INFORMAT;
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);
LIBYANG_API_DECL LY_ERR lys_parse_mem(struct ly_ctx *ctx, const char *data, LYS_INFORMAT format, struct lys_module **module);
LIBYANG_API_DECL LY_ERR lys_parse_fd(struct ly_ctx *ctx, int fd, LYS_INFORMAT format, struct lys_module **module);
LIBYANG_API_DECL LY_ERR lys_parse_path(struct ly_ctx *ctx, const char *path, LYS_INFORMAT format, struct lys_module **module);
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);
#ifdef __cplusplus
}
#endif
#endif /* LY_PARSER_SCHEMA_H_ */
ly_ctx
libyang context handler.
LY_ERR
LY_ERR
libyang's error codes returned by the libyang functions.
Definition log.h:237
ly_in
Parser input structure specifying the type of data input.
lys_module::name
const char * name
Definition tree_schema.h:2139
lys_module::revision
const char * revision
Definition tree_schema.h:2140
lys_module::ctx
struct ly_ctx * ctx
Definition tree_schema.h:2138
lys_parse
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.
lys_parse_fd
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.
lys_parse_path
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_search_localfile
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.
LYS_INFORMAT
LYS_INFORMAT
Schema input formats accepted by libyang parser functions.
Definition parser_schema.h:91
lys_parse_mem
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.
LYS_IN_UNKNOWN
@ LYS_IN_UNKNOWN
Definition parser_schema.h:92
LYS_IN_YIN
@ LYS_IN_YIN
Definition parser_schema.h:94
LYS_IN_YANG
@ LYS_IN_YANG
Definition parser_schema.h:93
lys_module
Available YANG schema tree structures representing YANG module.
Definition tree_schema.h:2137
log.h
Logger manipulation routines and error definitions.
ly_bool
uint8_t ly_bool
Type to indicate boolean value.
Definition log.h:35