libyang  0.16.105
YANG data modeling language library
User Types
Collaboration diagram for User Types:

Data Structures

struct  lytype_plugin_list
 

Typedefs

typedef int(* lytype_store_clb) (const char *type_name, const char *value_str, lyd_val *value, char **err_msg)
 Callback for storing user type values. More...
 

Detailed Description

Typedef Documentation

◆ lytype_store_clb

typedef int(* lytype_store_clb) (const char *type_name, const char *value_str, lyd_val *value, char **err_msg)

Callback for storing user type values.

This callback should overwrite the value stored in value using some custom encoding. Be careful, if the type is LY_TYPE_BITS, the bits must be freed before overwritting the union value.

Parameters
[in]type_nameName of the type being stored.
[in]value_strString value to be stored.
[in,out]valueValue union for the value to be stored in (already is but in the standard way).
[out]err_msgCan be filled on error. If not, a generic error message will be printed.
Returns
0 on success, non-zero if an error occured and the value could not be stored for any reason.

Definition at line 42 of file user_types.h.