data tree FEATURE lyd_new_implicit* functions
Separate functionality that was included
only in validation before.
diff --git a/src/validation.h b/src/validation.h
index 4f1c4c1..41a47a5 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -20,6 +20,18 @@
#include "plugins_types.h"
#include "tree_data.h"
+enum lyd_diff_op;
+
+/**
+ * @brief Add new changes into a diff. They are always merged.
+ *
+ * @param[in] node Node/subtree to add.
+ * @param[in] op Operation of the change.
+ * @param[in,out] diff Diff to update.
+ * @return LY_ERR value.
+ */
+LY_ERR lyd_val_diff_add(const struct lyd_node *node, enum lyd_diff_op op, struct lyd_node **diff);
+
/**
* @brief Finish validation of nodes and attributes. Specifically, when (is processed first) and type validation.
*
@@ -65,21 +77,4 @@
LY_ERR lyd_validate_final_r(struct lyd_node *first, const struct lysc_node *sparent, const struct lys_module *mod,
int val_opts, LYD_VALIDATE_OP op);
-/**
- * @brief Check the existence and create any non-existing default siblings, recursively for the created nodes.
- *
- * @param[in] parent Parent of the potential default values, NULL for top-level siblings.
- * @param[in,out] first First sibling.
- * @param[in] sparent Schema parent of the siblings, NULL if schema of @p parent can be used.
- * @param[in] mod Module of the default values, NULL for nested siblings.
- * @param[in] node_types Set to add nodes with unresolved types into.
- * @param[in] node_when Set to add nodes with "when" conditions into.
- * @param[in] val_opts Validation options (@ref datavalidationoptions).
- * @param[in,out] diff Validation diff.
- * @return LY_ERR value.
- */
-LY_ERR lyd_validate_defaults_r(struct lyd_node *parent, struct lyd_node **first, const struct lysc_node *sparent,
- const struct lys_module *mod, struct ly_set *node_types, struct ly_set *node_when,
- int val_opts, struct lyd_node **diff);
-
#endif /* LY_VALIDATION_H_ */