libyang  3.4.2
libyang is YANG data modelling language parser and toolkit written (and providing API) in C.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
plugins_types.h File Reference

API for (user) types plugins. More...

#include <stddef.h>
#include <stdint.h>
#include "log.h"
#include "ly_config.h"
#include "plugins.h"
#include "set.h"
#include "tree.h"
#include "tree_edit.h"
Include dependency graph for plugins_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lyplg_type
 Hold type-specific functions for various operations with the data values. More...
 
struct  lyplg_type_record
 

Macros

#define LYPLG_TYPE_API_VERSION   2
 Type API version. More...
 
#define LYPLG_TYPE_STORE_DYNAMIC   0x01
 
#define LYPLG_TYPE_STORE_IMPLEMENT   0x02
 
#define LYPLG_TYPE_STORE_IS_UTF8   0x04
 
#define LYPLG_TYPE_STORE_ONLY   0x08
 
#define LYPLG_TYPE_VAL_INLINE_DESTROY(type_val)   do { if (LYPLG_TYPE_VAL_IS_DYN(type_val)) free(type_val); } while(0)
 Destroy a prepared value. More...
 
#define LYPLG_TYPE_VAL_INLINE_PREPARE(storage, type_val)
 Prepare value memory for storing a specific type value, may be allocated dynamically. More...
 
#define LYPLG_TYPE_VAL_IS_DYN(type_val)   (sizeof *(type_val) > LYD_VALUE_FIXED_MEM_SIZE)
 Check whether specific type value needs to be allocated dynamically. More...
 
#define LYPLG_TYPES
 Macro to define plugin information in external plugins. More...
 

Typedefs

typedef LY_ERR(* lyplg_type_compare_clb )(const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Callback for comparing 2 values of the same type. More...
 
typedef LY_ERR(* lyplg_type_dup_clb )(const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Callback to duplicate data in the data structure. More...
 
typedef void(* lyplg_type_free_clb )(const struct ly_ctx *ctx, struct lyd_value *value)
 Callback for freeing the user type values stored by lyplg_type_store_clb. More...
 
typedef const void *(* lyplg_type_print_clb )(const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Callback for getting the value of the data stored in value. More...
 
typedef int(* lyplg_type_sort_clb )(const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Callback for sorting values. More...
 

Functions

LIBYANG_API_DECL LY_ERR
LIBYANG_API_DECL void 
ly_err_free (void *ptr)
 Destructor for the error records created with ly_err_new(). More...
 
LIBYANG_API_DECL LY_ERR ly_err_new (struct ly_err_item **err, LY_ERR ecode, LY_VECODE vecode, char *data_path, char *apptag, const char *err_format,...) _FORMAT_PRINTF(6
 Create and fill error structure. More...
 
LIBYANG_API_DECL size_t lyplg_type_bits_bitmap_size (const struct lysc_type_bits *type)
 Get the bitmap size of a bits value bitmap. More...
 
LIBYANG_API_DECL ly_bool lyplg_type_bits_is_bit_set (const char *bitmap, size_t size, uint32_t bit_position)
 Check whether a particular bit of a bitmap is set. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_check_hints (uint32_t hints, const char *value, size_t value_len, LY_DATA_TYPE type, int *base, struct ly_err_item **err)
 Check that the type is suitable for the parser's hints (if any) in the specified format. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_check_status (const struct lysc_node *ctx_node, uint16_t val_flags, LY_VALUE_FORMAT format, void *prefix_data, const char *val_name, struct ly_err_item **err)
 Check that the value of a type is allowed based on its status. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_binary (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in binary type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_bits (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of the lyplg_type_compare_clb for the built-in bits type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_boolean (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in boolean type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_decimal64 (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in decimal64 type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_identityref (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in identityref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_int (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in signed integer types. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_leafref (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_simple (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for a generic simple type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_uint (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in unsigned integer types. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_union (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the built-in union type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_compare_xpath10 (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_compare_clb for the ietf-yang-types xpath1.0 type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_binary (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for the built-in binary type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_bits (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of the lyplg_type_dup_clb for the built-in bits type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_instanceid (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for the built-in instance-identifier type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_leafref (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_simple (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for a generic simple type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_union (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for the built-in union type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_dup_xpath10 (const struct ly_ctx *ctx, const struct lyd_value *original, struct lyd_value *dup)
 Implementation of lyplg_type_dup_clb for the ietf-yang-types xpath1.0 type. More...
 
LIBYANG_API_DECL void lyplg_type_free_binary (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for the built-in binary type. More...
 
LIBYANG_API_DECL void lyplg_type_free_bits (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of the lyplg_type_free_clb for the built-in bits type. More...
 
LIBYANG_API_DECL void lyplg_type_free_instanceid (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for the built-in instance-identifier type. More...
 
LIBYANG_API_DECL void lyplg_type_free_leafref (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL void lyplg_type_free_simple (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for a generic simple type. More...
 
LIBYANG_API_DECL void lyplg_type_free_union (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for the built-in union type. More...
 
LIBYANG_API_DECL void lyplg_type_free_xpath10 (const struct ly_ctx *ctx, struct lyd_value *value)
 Implementation of lyplg_type_free_clb for the ietf-yang-types xpath1.0 type. More...
 
LIBYANG_API_DECL const char * lyplg_type_get_prefix (const struct lys_module *mod, LY_VALUE_FORMAT format, void *prefix_data)
 Get format-specific prefix for a module. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_identity_isderived (const struct lysc_ident *base, const struct lysc_ident *derived)
 Decide if the derived identity is derived from (based on) the base identity. More...
 
LIBYANG_API_DECL struct
lys_module
lyplg_type_identity_module (const struct ly_ctx *ctx, const struct lysc_node *ctx_node, const char *prefix, size_t prefix_len, LY_VALUE_FORMAT format, const void *prefix_data)
 Get the corresponding module for the identity value. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_lypath_check_status (const struct lysc_node *ctx_node, const struct ly_path *path, LY_VALUE_FORMAT format, void *prefix_data, struct ly_err_item **err)
 Check that the lypath instance-identifier value is allowed based on the status of the nodes. More...
 
LIBYANG_API_DECL void lyplg_type_lypath_free (const struct ly_ctx *ctx, struct ly_path *path)
 Free ly_path structure used by instanceid value representation. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_lypath_new (const struct ly_ctx *ctx, const char *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, const struct lysc_node *ctx_node, struct lys_glob_unres *unres, struct ly_path **path, struct ly_err_item **err)
 Helper function to create internal schema path representation for instance-identifier value representation. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_make_implemented (struct lys_module *mod, const char **features, struct lys_glob_unres *unres)
 Implement a module (just like lys_set_implemented()), but keep maintaining unresolved items. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_parse_dec64 (uint8_t fraction_digits, const char *value, size_t value_len, int64_t *ret, struct ly_err_item **err)
 Convert a string with a decimal64 value into libyang representation: ret = value * 10^fraction-digits. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_parse_int (const char *datatype, int base, int64_t min, int64_t max, const char *value, size_t value_len, int64_t *ret, struct ly_err_item **err)
 Unsigned integer value parser and validator. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_parse_uint (const char *datatype, int base, uint64_t max, const char *value, size_t value_len, uint64_t *ret, struct ly_err_item **err)
 Unsigned integer value parser and validator. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_prefix_data_dup (const struct ly_ctx *ctx, LY_VALUE_FORMAT format, const void *orig, void **dup)
 Duplicate prefix data. More...
 
LIBYANG_API_DECL void lyplg_type_prefix_data_free (LY_VALUE_FORMAT format, void *prefix_data)
 Free internal prefix data. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_prefix_data_new (const struct ly_ctx *ctx, const void *value, size_t value_len, LY_VALUE_FORMAT format, const void *prefix_data, LY_VALUE_FORMAT *format_p, void **prefix_data_p)
 Store used prefixes in a string into an internal libyang structure used in lyd_value. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_binary (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in binary type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_bits (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of the lyplg_type_print_clb for the built-in bits type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_boolean (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in boolean type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_decimal64 (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in decimal64 type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_enum (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in enumeration type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_identityref (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in identityref type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_instanceid (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in instance-identifier type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_int (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in signed integer types. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_leafref (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_simple (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for a generic simple type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_uint (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in unsigned integer types. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_union (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the built-in union type. More...
 
LIBYANG_API_DECL const void * lyplg_type_print_xpath10 (const struct ly_ctx *ctx, const struct lyd_value *value, LY_VALUE_FORMAT format, void *prefix_data, ly_bool *dynamic, size_t *value_len)
 Implementation of lyplg_type_print_clb for the ietf-yang-types xpath1.0 type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_print_xpath10_value (const struct lyd_value_xpath10 *xp_val, LY_VALUE_FORMAT format, void *prefix_data, char **str_value, struct ly_err_item **err)
 Print xpath1.0 value in the specific format. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_resolve_leafref (const struct lysc_type_leafref *lref, const struct lyd_node *node, struct lyd_value *value, const struct lyd_node *tree, struct ly_set **targets, char **errmsg)
 Find leafref target in data. More...
 
LIBYANG_API_DECL int lyplg_type_sort_binary (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in binary type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_bits (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of the lyplg_type_sort_clb for the built-in bits type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_boolean (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in boolean type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_decimal64 (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in decimal64 type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_enum (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in enumeration type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_identityref (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in identityref type. More...
 
LIBYANG_API_DECL int lyplg_type_sort_int (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in signed integer types. More...
 
LIBYANG_API_DECL int lyplg_type_sort_leafref (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in leafref type. More...
 
LIBYANG_API_DEF int lyplg_type_sort_simple (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for a generic simple type. More...
 
LIBYANG_API_DECL int lyplg_type_sort_uint (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in unsigned integer types. More...
 
LIBYANG_API_DECL int lyplg_type_sort_union (const struct ly_ctx *ctx, const struct lyd_value *val1, const struct lyd_value *val2)
 Implementation of lyplg_type_sort_clb for the built-in union type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_binary (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in binary type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_bits (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of the lyplg_type_store_clb for the built-in bits type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_boolean (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in boolean type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_decimal64 (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in decimal64 type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_empty (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in empty type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_enum (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in enumeration type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_identityref (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in identityref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_instanceid (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in instance-identifier type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_int (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in signed integer types. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_leafref (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_string (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in string type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_uint (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in unsigned integer types. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_union (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the built-in union type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_store_xpath10 (const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Implementation of lyplg_type_store_clb for the ietf-yang-types xpath1.0 type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_validate_instanceid (const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node, const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 Implementation of lyplg_type_validate_clb for the built-in instance-identifier type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_validate_leafref (const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node, const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 Implementation of lyplg_type_validate_clb for the built-in leafref type. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_validate_patterns (struct lysc_pattern **patterns, const char *str, size_t str_len, struct ly_err_item **err)
 Data type validator for pattern-restricted string values. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_validate_range (LY_DATA_TYPE basetype, struct lysc_range *range, int64_t value, const char *strval, size_t strval_len, struct ly_err_item **err)
 Data type validator for a range/length-restricted values. More...
 
LIBYANG_API_DECL LY_ERR lyplg_type_validate_union (const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node, const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 Implementation of lyplg_type_validate_clb for the built-in union type. More...
 
LIBYANG_API_DEF LY_ERR lyplg_type_xpath10_print_token (const char *token, uint16_t tok_len, ly_bool is_nametest, const struct lys_module **context_mod, const struct ly_ctx *resolve_ctx, LY_VALUE_FORMAT resolve_format, const void *resolve_prefix_data, LY_VALUE_FORMAT get_format, void *get_prefix_data, char **token_p, struct ly_err_item **err)
 Print xpath1.0 token in the specific format. More...
 

Variables

LIBYANG_API_DECL typedef LY_ERR(* lyplg_type_store_clb )(const struct ly_ctx *ctx, const struct lysc_type *type, const void *value, size_t value_len, uint32_t options, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, const struct lysc_node *ctx_node, struct lyd_value *storage, struct lys_glob_unres *unres, struct ly_err_item **err)
 Callback to store the given value according to the given type. More...
 
LIBYANG_API_DECL typedef LY_ERR(* lyplg_type_validate_clb )(const struct ly_ctx *ctx, const struct lysc_type *type, const struct lyd_node *ctx_node, const struct lyd_node *tree, struct lyd_value *storage, struct ly_err_item **err)
 Callback to validate the stored value in the accessible data tree. More...
 

Detailed Description

API for (user) types plugins.

Author
Radek Krejci rkrej.nosp@m.ci@c.nosp@m.esnet.nosp@m..cz Copyright (c) 2019 CESNET, z.s.p.o.

This source code is licensed under BSD 3-Clause License (the "License"). You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://opensource.org/licenses/BSD-3-Clause

Definition in file plugins_types.h.