Loading...
Searching...
No Matches
printer_schema.h
Go to the documentation of this file.
#ifndef LY_PRINTER_SCHEMA_H_
#define LY_PRINTER_SCHEMA_H_
#include <stdint.h>
#include <stdio.h>
#include "log.h"
#include "out.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ly_out;
struct lys_module;
struct lysc_node;
struct lysp_submodule;
#define LYS_PRINT_SHRINK LY_PRINT_SHRINK
#define LYS_PRINT_NO_SUBSTMT 0x10
typedef enum {
LYS_OUT_UNKNOWN = 0,
LYS_OUT_YANG = 1,
LYS_OUT_YANG_COMPILED = 2,
LYS_OUT_YIN = 3,
LYS_OUT_TREE
} LYS_OUTFORMAT;
LIBYANG_API_DECL LY_ERR lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format,
size_t line_length, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_submodule(struct ly_out *out, const struct lysp_submodule *submodule, LYS_OUTFORMAT format,
size_t line_length, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format,
uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_clb(ly_write_clb writeclb, void *user_data, const struct lys_module *module,
LYS_OUTFORMAT format, uint32_t options);
LIBYANG_API_DECL LY_ERR lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format,
size_t line_length, uint32_t options);
#ifdef __cplusplus
}
#endif
#endif /* LY_PRINTER_SCHEMA_H_ */
LY_ERR
LY_ERR
libyang's error codes returned by the libyang functions.
Definition log.h:237
ly_write_clb
ssize_t(* ly_write_clb)(void *user_data, const void *buf, size_t count)
Generic write callback for data printed by libyang.
Definition out.h:147
ly_out
Printer output structure specifying the type of data output.
lys_print_mem
LIBYANG_API_DECL LY_ERR lys_print_mem(char **strp, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
Print schema tree in the specified format into a memory block. It is up to caller to free the returne...
lys_print_submodule
LIBYANG_API_DECL LY_ERR lys_print_submodule(struct ly_out *out, const struct lysp_submodule *submodule, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
Schema submodule printer.
lys_print_file
LIBYANG_API_DECL LY_ERR lys_print_file(FILE *f, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
Print schema tree in the specified format into a file stream.
lys_print_clb
LIBYANG_API_DECL LY_ERR lys_print_clb(ly_write_clb writeclb, void *user_data, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
Print schema tree in the specified format using a provided callback.
lys_print_path
LIBYANG_API_DECL LY_ERR lys_print_path(const char *path, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
Print schema tree in the specified format into a file.
LYS_OUTFORMAT
LYS_OUTFORMAT
Schema output formats accepted by libyang printer functions.
Definition printer_schema.h:105
lys_print_node
LIBYANG_API_DECL LY_ERR lys_print_node(struct ly_out *out, const struct lysc_node *node, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
Schema node printer.
lys_print_fd
LIBYANG_API_DECL LY_ERR lys_print_fd(int fd, const struct lys_module *module, LYS_OUTFORMAT format, uint32_t options)
Print schema tree in the specified format into a file descriptor.
lys_print_module
LIBYANG_API_DECL LY_ERR lys_print_module(struct ly_out *out, const struct lys_module *module, LYS_OUTFORMAT format, size_t line_length, uint32_t options)
Schema module printer.
LYS_OUT_YANG
@ LYS_OUT_YANG
Definition printer_schema.h:107
LYS_OUT_TREE
@ LYS_OUT_TREE
Definition printer_schema.h:110
LYS_OUT_UNKNOWN
@ LYS_OUT_UNKNOWN
Definition printer_schema.h:106
LYS_OUT_YIN
@ LYS_OUT_YIN
Definition printer_schema.h:109
LYS_OUT_YANG_COMPILED
@ LYS_OUT_YANG_COMPILED
Definition printer_schema.h:108
lys_module
Available YANG schema tree structures representing YANG module.
Definition tree_schema.h:2137
lysc_node
Compiled YANG data node.
Definition tree_schema.h:1421
lysp_submodule
Definition tree_schema.h:1126
log.h
Logger manipulation routines and error definitions.
out.h
libyang output structures and functions