Radek Krejci | d6b7645 | 2019-09-03 17:03:03 +0200 | [diff] [blame] | 1 | /** |
| 2 | * @file plugins_exts_metadata.h |
| 3 | * @author Radek Krejci <rkrejci@cesnet.cz> |
| 4 | * @brief ietf-yang-metadata API |
| 5 | * |
| 6 | * Copyright (c) 2019 CESNET, z.s.p.o. |
| 7 | * |
| 8 | * This source code is licensed under BSD 3-Clause License (the "License"). |
| 9 | * You may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * https://opensource.org/licenses/BSD-3-Clause |
| 13 | */ |
| 14 | |
| 15 | #ifndef LY_PLUGINS_EXTS_METADATA_H_ |
| 16 | #define LY_PLUGINS_EXTS_METADATA_H_ |
| 17 | |
| 18 | #include "tree_schema.h" |
| 19 | |
| 20 | #ifdef __cplusplus |
| 21 | extern "C" { |
| 22 | #endif |
| 23 | |
| 24 | /** |
| 25 | * @brief Representation of the compiled metadata substatements as provided by libyang 2 metadata extension plugin. |
| 26 | */ |
| 27 | struct lyext_metadata { |
| 28 | struct lysc_type *type; /**< type of the metadata (mandatory) */ |
| 29 | const char *units; /**< units of the leaf's type */ |
| 30 | struct lysc_iffeature *iffeatures; /**< list of if-feature expressions ([sized array](@ref sizedarrays)) */ |
| 31 | uint16_t flags; /**< [schema node flags](@ref snodeflags) - only LYS_STATUS_* values are allowed */ |
| 32 | }; |
| 33 | |
| 34 | |
| 35 | #ifdef __cplusplus |
| 36 | } |
| 37 | #endif |
| 38 | |
| 39 | #endif /* LY_PLUGINS_EXTS_METADATA_H_ */ |