plugins exts REFACTOR info printer function names adjusted
diff --git a/src/plugins_exts.h b/src/plugins_exts.h
index dd2a369..b9f00e5 100644
--- a/src/plugins_exts.h
+++ b/src/plugins_exts.h
@@ -672,7 +672,7 @@
LIBYANG_API_DECL struct lysc_ext *lysc_ext_dup(struct lysc_ext *orig);
/*
- * printer
+ * sprinter info
*/
/**
@@ -684,7 +684,7 @@
* 1 otherwise.
* @return LY_SUCCESS when everything was fine, other LY_ERR values in case of failure
*/
-typedef LY_ERR (*lyplg_ext_schema_printer_clb)(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag);
+typedef LY_ERR (*lyplg_ext_sprinter_info_clb)(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag);
/**
* @brief YANG printer context getter for output handler.
@@ -712,16 +712,16 @@
LIBYANG_API_DECL uint16_t *lyplg_ext_print_get_level(const struct lyspr_ctx *ctx);
/**
- * @brief Print substatements of an extension instance
+ * @brief Print substatements of an extension instance in info format (compiled YANG).
*
- * Generic function to access YANG printer functions from the extension plugins (::lyplg_ext_schema_printer_clb).
+ * Generic function to access YANG printer functions from the extension plugins (::lyplg_ext_sprinter_info_clb).
*
* @param[in] ctx YANG printer context to provide output handler and other information for printing.
* @param[in] ext The compiled extension instance to access the extensions and substatements data.
* @param[in,out] flag Flag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed,
* 1 otherwise.
*/
-LIBYANG_API_DECL void lyplg_ext_print_extension_instance(struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext,
+LIBYANG_API_DECL void lyplg_ext_print_info_extension_instance(struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext,
ly_bool *flag);
/*
@@ -838,8 +838,8 @@
of the plugins for external tools) */
lyplg_ext_parse_clb parse; /**< callback to parse the extension instance substatements */
lyplg_ext_compile_clb compile; /**< callback to compile extension instance from the parsed data */
- lyplg_ext_schema_printer_clb sprinter; /**< callback to print the compiled content (info format) of the extension
- instance */
+ lyplg_ext_sprinter_info_clb printer_info; /**< callback to print the compiled content (info format) of the extension
+ instance */
lyplg_ext_data_node_clb node; /**< callback to validate most relevant data instance for the extension
instance */
diff --git a/src/plugins_exts/metadata.c b/src/plugins_exts/metadata.c
index fc49e2c..a2cbc83 100644
--- a/src/plugins_exts/metadata.c
+++ b/src/plugins_exts/metadata.c
@@ -172,12 +172,12 @@
/**
* @brief INFO printer
*
- * Implementation of ::lyplg_ext_schema_printer_clb set as ::lyext_plugin::sprinter
+ * Implementation of ::lyplg_ext_sprinter_info_clb set as ::lyext_plugin::printer_info
*/
static LY_ERR
-annotation_sprinter(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
+annotation_printer_info(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
{
- lyplg_ext_print_extension_instance(ctx, ext, flag);
+ lyplg_ext_print_info_extension_instance(ctx, ext, flag);
return LY_SUCCESS;
}
@@ -230,7 +230,7 @@
.plugin.id = "ly2 metadata v1",
.plugin.parse = annotation_parse,
.plugin.compile = annotation_compile,
- .plugin.sprinter = annotation_sprinter,
+ .plugin.printer_info = annotation_printer_info,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
diff --git a/src/plugins_exts/nacm.c b/src/plugins_exts/nacm.c
index 7323cd2..59a7c05 100644
--- a/src/plugins_exts/nacm.c
+++ b/src/plugins_exts/nacm.c
@@ -162,7 +162,7 @@
.plugin.id = "ly2 NACM v1",
.plugin.parse = nacm_parse,
.plugin.compile = nacm_compile,
- .plugin.sprinter = NULL,
+ .plugin.printer_info = NULL,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
@@ -176,7 +176,7 @@
.plugin.id = "ly2 NACM v1",
.plugin.parse = nacm_parse,
.plugin.compile = nacm_compile,
- .plugin.sprinter = NULL,
+ .plugin.printer_info = NULL,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
@@ -190,7 +190,7 @@
.plugin.id = "ly2 NACM v1",
.plugin.parse = nacm_parse,
.plugin.compile = nacm_compile,
- .plugin.sprinter = NULL,
+ .plugin.printer_info = NULL,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
@@ -204,7 +204,7 @@
.plugin.id = "ly2 NACM v1",
.plugin.parse = nacm_parse,
.plugin.compile = nacm_compile,
- .plugin.sprinter = NULL,
+ .plugin.printer_info = NULL,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
diff --git a/src/plugins_exts/schema_mount.c b/src/plugins_exts/schema_mount.c
index 04679aa..3bc16f9 100644
--- a/src/plugins_exts/schema_mount.c
+++ b/src/plugins_exts/schema_mount.c
@@ -967,7 +967,7 @@
.plugin.id = "ly2 schema mount v1",
.plugin.parse = schema_mount_parse,
.plugin.compile = schema_mount_compile,
- .plugin.sprinter = NULL,
+ .plugin.printer_info = NULL,
.plugin.node = NULL,
.plugin.snode = schema_mount_snode,
.plugin.validate = schema_mount_validate,
diff --git a/src/plugins_exts/structure.c b/src/plugins_exts/structure.c
index 3a0bf8a..c09698c 100644
--- a/src/plugins_exts/structure.c
+++ b/src/plugins_exts/structure.c
@@ -266,12 +266,12 @@
/**
* @brief INFO printer
*
- * Implementation of ::lyplg_ext_schema_printer_clb set as ::lyext_plugin::sprinter
+ * Implementation of ::lyplg_ext_sprinter_info_clb set as ::lyext_plugin::printer_info
*/
static LY_ERR
-structure_sprinter(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
+structure_printer_info(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
{
- lyplg_ext_print_extension_instance(ctx, ext, flag);
+ lyplg_ext_print_info_extension_instance(ctx, ext, flag);
return LY_SUCCESS;
}
@@ -520,7 +520,7 @@
.plugin.id = "ly2 structure v1",
.plugin.parse = structure_parse,
.plugin.compile = structure_compile,
- .plugin.sprinter = structure_sprinter,
+ .plugin.printer_info = structure_printer_info,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
@@ -535,7 +535,7 @@
.plugin.id = "ly2 structure v1",
.plugin.parse = structure_aug_parse,
.plugin.compile = structure_aug_compile,
- .plugin.sprinter = structure_sprinter,
+ .plugin.printer_info = structure_printer_info,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
diff --git a/src/plugins_exts/yangdata.c b/src/plugins_exts/yangdata.c
index 32229d7..7a2585a 100644
--- a/src/plugins_exts/yangdata.c
+++ b/src/plugins_exts/yangdata.c
@@ -167,12 +167,12 @@
/**
* @brief INFO printer
*
- * Implementation of ::lyplg_ext_schema_printer_clb set as ::lyext_plugin::sprinter
+ * Implementation of ::lyplg_ext_sprinter_info_clb set as ::lyext_plugin::printer_info
*/
static LY_ERR
-yangdata_schema_printer(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
+yangdata_printer_info(struct lyspr_ctx *ctx, struct lysc_ext_instance *ext, ly_bool *flag)
{
- lyplg_ext_print_extension_instance(ctx, ext, flag);
+ lyplg_ext_print_info_extension_instance(ctx, ext, flag);
return LY_SUCCESS;
}
@@ -214,7 +214,7 @@
.plugin.id = "ly2 yang-data v1",
.plugin.parse = yangdata_parse,
.plugin.compile = yangdata_compile,
- .plugin.sprinter = yangdata_schema_printer,
+ .plugin.printer_info = yangdata_printer_info,
.plugin.node = NULL,
.plugin.snode = NULL,
.plugin.validate = NULL,
diff --git a/src/printer_yang.c b/src/printer_yang.c
index 4cab943..fd2853e 100644
--- a/src/printer_yang.c
+++ b/src/printer_yang.c
@@ -316,8 +316,8 @@
inner_flag = 0;
yprc_extension_instances(pctx, LY_STMT_EXTENSION_INSTANCE, 0, exts[u].exts, &inner_flag);
- if (exts[u].def->plugin && exts[u].def->plugin->sprinter) {
- exts[u].def->plugin->sprinter(&pctx->printer_ctx, &exts[u], &inner_flag);
+ if (exts[u].def->plugin && exts[u].def->plugin->printer_info) {
+ exts[u].def->plugin->printer_info(&pctx->printer_ctx, &exts[u], &inner_flag);
}
LEVEL--;
@@ -2448,7 +2448,7 @@
}
LIBYANG_API_DEF void
-lyplg_ext_print_extension_instance(struct lyspr_ctx *ctx_generic, const struct lysc_ext_instance *ext, ly_bool *flag)
+lyplg_ext_print_info_extension_instance(struct lyspr_ctx *ctx_generic, const struct lysc_ext_instance *ext, ly_bool *flag)
{
struct lys_ypr_ctx *pctx = (struct lys_ypr_ctx *)ctx_generic;
LY_ARRAY_COUNT_TYPE u, v;