Loading...
Searching...
No Matches
Plugins: Extensions schema info printer support
Plugins: Extensions
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.

## Functions

LIBYANG_API_DECL uint16_t * | lyplg_ext_print_get_level (const struct lyspr_ctx *ctx)
| YANG printer context getter for printer indentation level.
LIBYANG_API_DECL uint32_t * | lyplg_ext_print_get_options (const struct lyspr_ctx *ctx)
| YANG printer context getter for printer options.
LIBYANG_API_DECL struct ly_out ** | lyplg_ext_print_get_out (const struct lyspr_ctx *ctx)
| YANG printer context getter for output 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).

## Detailed Description

Implementing extension plugin schema info printer callback.

## Typedef Documentation

## lyplg_ext_sprinter_info_clb

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] | ctx | YANG printer context to provide output handler and other information for printing.
  [in] | ext | The compiled extension instance, mainly to access the extensions.
  [in,out] | flag | Flag 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 675 of file plugins_exts.h.

## Function Documentation

## lyplg_ext_print_get_level()

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] | ctx | YANG printer context.

Returns
  pointer to the printer's indentation level to allow modifying its value.

## lyplg_ext_print_get_options()

LIBYANG_API_DECL uint32_t * lyplg_ext_print_get_options | ( | const struct lyspr_ctx * | ctx | ) |

YANG printer context getter for printer options.

Parameters

  [in] | ctx | YANG printer context.

Returns
  pointer to the printer options to allow modifying them with Schema output options values.

## lyplg_ext_print_get_out()

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] | ctx | YANG 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.

## lyplg_ext_print_info_extension_instance()

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] | ctx | YANG printer context to provide output handler and other information for printing.
  [in] | ext | The compiled extension instance to access the extensions and substatements data.
  [in,out] | flag | Flag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed, 1 otherwise.