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
Plugins: Extensions schema info printer support
Collaboration diagram for Plugins: Extensions schema info printer support:

Typedefs

typedef LY_ERR(* lyplg_ext_sprinter_info_clb )(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
 Callback to print the compiled extension instance's private data in the INFO format. More...
 

Functions

LIBYANG_API_DECL uint16_t * lyplg_ext_print_get_level (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer indentation level. More...
 
LIBYANG_API_DECL uint32_t * lyplg_ext_print_get_options (const struct lyspr_ctx *ctx)
 YANG printer context getter for printer options. More...
 
LIBYANG_API_DECL struct ly_out ** lyplg_ext_print_get_out (const struct lyspr_ctx *ctx)
 YANG printer context getter for output handler. More...
 
LIBYANG_API_DECL void lyplg_ext_print_info_extension_instance (struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext, ly_bool *flag)
 Print substatements of an extension instance in info format (compiled YANG). More...
 

Detailed Description

Implementing extension plugin schema info printer callback.

Typedef Documentation

typedef LY_ERR(* lyplg_ext_sprinter_info_clb)(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)

Callback to print the compiled extension instance's private data in the INFO format.

Parameters
[in]ctxYANG printer context to provide output handler and other information for printing.
[in]extThe compiled extension instance, mainly to access the extensions.
[in,out]flagFlag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed, 1 otherwise.
Returns
LY_SUCCESS when everything was fine, other LY_ERR values in case of failure

Definition at line 680 of file plugins_exts.h.

Function Documentation

LIBYANG_API_DECL uint16_t* lyplg_ext_print_get_level ( const struct lyspr_ctx *  ctx)

YANG printer context getter for printer indentation level.

Parameters
[in]ctxYANG printer context.
Returns
pointer to the printer's indentation level to allow modifying its value.
LIBYANG_API_DECL uint32_t* lyplg_ext_print_get_options ( const struct lyspr_ctx *  ctx)

YANG printer context getter for printer options.

Parameters
[in]ctxYANG printer context.
Returns
pointer to the printer options to allow modifying them with Schema output options values.
LIBYANG_API_DECL struct ly_out** lyplg_ext_print_get_out ( const struct lyspr_ctx *  ctx)

YANG printer context getter for output handler.

Parameters
[in]ctxYANG printer context.
Returns
Output handler where the data are being printed. Note that the address of the handler pointer in the context is returned to allow to modify the handler.
LIBYANG_API_DECL void lyplg_ext_print_info_extension_instance ( struct lyspr_ctx *  ctx,
const struct lysc_ext_instance ext,
ly_bool flag 
)

Print substatements of an extension instance in info format (compiled YANG).

Generic function to access YANG printer functions from the extension plugins (lyplg_ext_sprinter_info_clb).

Parameters
[in]ctxYANG printer context to provide output handler and other information for printing.
[in]extThe compiled extension instance to access the extensions and substatements data.
[in,out]flagFlag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed, 1 otherwise.