libyang  2.0.7
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
printer_data.h
Go to the documentation of this file.
1 
15 #ifndef LY_PRINTER_DATA_H_
16 #define LY_PRINTER_DATA_H_
17 
18 #include <stdint.h>
19 #include <stdio.h>
20 
21 #include "log.h"
22 #include "out.h"
23 #include "tree_data.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 struct ly_out;
30 
77 #define LYD_PRINT_WITHSIBLINGS 0x01
79 #define LYD_PRINT_SHRINK LY_PRINT_SHRINK
80 #define LYD_PRINT_KEEPEMPTYCONT 0x04
81 #define LYD_PRINT_WD_MASK 0xF0
82 #define LYD_PRINT_WD_EXPLICIT 0x00
86 #define LYD_PRINT_WD_TRIM 0x10
88 #define LYD_PRINT_WD_ALL 0x20
90 #define LYD_PRINT_WD_ALL_TAG 0x40
95 #define LYD_PRINT_WD_IMPL_TAG 0x80
112 LY_ERR lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
113 
123 LY_ERR lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
124 
134 LY_ERR lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
135 
145 LY_ERR lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
146 
156 LY_ERR lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
157 
167 LY_ERR lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
168 
179 LY_ERR lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, uint32_t options);
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* LY_PRINTER_DATA_H_ */
LYD_FORMAT
Data input/output formats supported by libyang parser and printer functions.
Definition: tree_data.h:504
LY_ERR
libyang's error codes returned by the libyang functions.
Definition: log.h:242
Logger manipulation routines and error definitions.
Printer output structure specifying where the data are printed.
libyang output structures and functions
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:133
LY_ERR lyd_print_fd(int fd, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print data tree in the specified format.
LY_ERR lyd_print_all(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print the whole data tree of the root, including all the siblings.
LY_ERR lyd_print_file(FILE *f, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print data tree in the specified format.
LY_ERR lyd_print_clb(ly_write_clb writeclb, void *user_data, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print data tree in the specified format.
LY_ERR lyd_print_tree(struct ly_out *out, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print the selected data subtree.
LY_ERR lyd_print_mem(char **strp, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print data tree in the specified format.
LY_ERR lyd_print_path(const char *path, const struct lyd_node *root, LYD_FORMAT format, uint32_t options)
Print data tree in the specified format.
libyang representation of YANG data trees.
Generic structure for a data node.
Definition: tree_data.h:754