@@ -262,7 +262,7 @@ LIBYANG_API_DECL LY_ERR lyplg_type_check_value_size(const char *type_name, LY_VA
262262 * @param[in] hints Bitmap of [value hints](@ref lydvalhints) of all the allowed value types provided by parsers
263263 * to ::lyplg_type_store_clb.
264264 * @param[in] value Lexical representation of the value to be stored.
265- * @param[in] value_len Length (number of bytes) of the given \ p value.
265+ * @param[in] value_len Length (number of bytes) of the given @ p value.
266266 * @param[in] type Expected base type of the @p value by the caller.
267267 * @param[out] base Pointer to store the numeric base for parsing numeric values using strtol()/strtoll() function.
268268 * Returned (and required) only for numeric @p type values.
@@ -275,6 +275,8 @@ LIBYANG_API_DECL LY_ERR lyplg_type_check_hints(uint32_t hints, const char *value
275275/**
276276 * @brief Check that the value of a type is allowed based on its status.
277277 *
278+ * Performs the check only if @p format is ::LY_VALUE_SCHEMA.
279+ *
278280 * @param[in] ctx_node Context node (which references the value).
279281 * @param[in] val_flags Flags fo the value.
280282 * @param[in] format Format of the value.
@@ -289,6 +291,8 @@ LIBYANG_API_DECL LY_ERR lyplg_type_check_status(const struct lysc_node *ctx_node
289291/**
290292 * @brief Check that the lypath instance-identifier value is allowed based on the status of the nodes.
291293 *
294+ * Performs the check only if @p format is ::LY_VALUE_SCHEMA.
295+ *
292296 * @param[in] ctx_node Context node (which references the value).
293297 * @param[in] path Path of the instance-identifier.
294298 * @param[in] format Format of the value.
@@ -412,7 +416,8 @@ LIBYANG_API_DECL void lyplg_type_prefix_data_free(LY_VALUE_FORMAT format, void *
412416 * @param[in] format Input format of the value.
413417 * @param[in] prefix_data Format-specific data for resolving any prefixes (see ly_resolve_prefix()).
414418 * @param[in] ctx_node The @p value schema context node.
415- * @param[in,out] unres Global unres structure for newly implemented modules.
419+ * @param[in,out] unres Global unres structure for newly implemented modules. Used only if @p options include
420+ * ::LYPLG_TYPE_STORE_IMPLEMENT.
416421 * @param[out] path Pointer to store the created structure representing the schema path from the @p value.
417422 * @param[out] err Pointer to store the error information provided in case of failure.
418423 * @return LY_SUCCESS on success,
@@ -449,38 +454,28 @@ LIBYANG_API_DECL void lyplg_type_lypath_free(struct ly_path *path);
449454 * @brief Store a union value with a specific member type index, keeping that member resolved (pinned),
450455 * so it is not re-resolved to the first matching member during later validation.
451456 *
452- * Equivalent to storing the value through the member type plugin and then the union type plugin with
453- * the value in the LYB format, except the caller does not need to handle the binary LYB format at all.
454- * Meaning of the parameters follows ::lyplg_type_store_clb unless stated otherwise.
455- *
456- * Suitable for datastore plugins that persist the resolved member type index of union values and need
457- * to restore the values resolved as exactly the same member (e.g. when several member types share the
458- * same base type). The resulting value is identical to a value stored from the LYB format.
457+ * The union value is effectively stored in LYB format.
459458 *
460- * @param[in] ctx libyang context .
461- * @param[in] type Union schema type, MUST be a union (basetype ::LY_TYPE_UNION) .
462- * @param[in] type_idx Index of the union member type to use (into ::lysc_type_union::types) .
463- * @param[in] value Value to store, is always consumed .
459+ * @param[in] ctx Context to use .
460+ * @param[in] type Union type to use .
461+ * @param[in] type_idx Index of the union member type to use.
462+ * @param[in] value Value to store as the specific type at @p type_idx .
464463 * @param[in] value_size_bits Size of @p value in bits.
465- * @param[in] options [Type plugin store options](@ref plugintypestoreopts), may be updated by the member store.
466- * @param[in] format Input format of @p value, even ::LY_VALUE_LYB of the member type value itself (the
467- * 1-byte member index prefix is handled internally and must not be included).
464+ * @param[in] options [Type plugin store options](@ref plugintypestoreopts).
465+ * @param[in] format Input format of @p value.
468466 * @param[in] prefix_data Format-specific data for resolving any prefixes (see ly_resolve_prefix()).
469- * @param[in] hints Bitmap of value hints.
470- * @param[in] ctx_node The @p value schema context node.
471- * @param[in,out] storage Value storage to fill identically to ::lyplg_type_store_clb, on failure it is
472- * freeded and MUST NOT be freed again.
473- * @param[in,out] unres Global unres structure for newly implemented modules.
467+ * @param[in] hints Bitmap of value hints to use.
468+ * @param[in] ctx_node Schema context node of @p value.
469+ * @param[in,out] storage Value storage to fill.
474470 * @param[out] err Pointer to store the error information provided in case of failure.
475471 * @return LY_SUCCESS on success,
476472 * @return LY_EINCOMPLETE in case the value requires validation of its instance in the data tree,
477- * @return LY_EVALID in/out-of-range @p type_idx or if the member type does not accept the @p value,
478- * @return LY_ERR value on other error.
473+ * @return LY_ERR value on error.
479474 */
480475LIBYANG_API_DECL LY_ERR lyplg_type_store_union_idx (const struct ly_ctx * ctx , const struct lysc_type * type ,
481476 uint32_t type_idx , const void * value , uint64_t value_size_bits , uint32_t options , LY_VALUE_FORMAT format ,
482477 void * prefix_data , uint32_t hints , const struct lysc_node * ctx_node , struct lyd_value * storage ,
483- struct lys_glob_unres * unres , struct ly_err_item * * err );
478+ struct ly_err_item * * err );
484479
485480/**
486481 * @brief Print xpath1.0 value in the specific format.
0 commit comments