1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
/**
* @file schema_compile_amend.h
* @author Radek Krejci <rkrejci@cesnet.cz>
* @author Michal Vasko <mvasko@cesnet.cz>
* @brief Header for schema compilation of augments, deviations, and refines.
*
* Copyright (c) 2015 - 2024 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
*/
;
;
;
;
;
;
;
;
/**
* @brief Compiled parsed schema-node-id.
*/
;
/**
* @brief Compiled parsed augment structure. Just a temporary storage for applying the augment to data.
*/
;
/**
* @brief Compiled parsed deviation structure. Just a temporary storage for applying the deviation to data.
*/
;
/**
* @brief Compiled parsed refine structure. Just a temporary storage for applying the refine to data.
*/
;
/**
* @brief Prepare any uses augments and refines in the context to be applied during uses descendant node compilation.
*
* @param[in] ctx Compile context.
* @param[in] uses_p Parsed uses structure with augments and refines.
* @param[in] ctx_node Context node of @p uses_p meaning its first data definition parent.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Duplicate qname structure.
*
* @param[in] ctx libyang context.
* @param[in] orig_qname Structure to read from.
* @param[in,out] qname Structure to fill.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Free a compiled augment temporary structure.
*
* @param[in] ctx libyang context.
* @param[in] aug Structure to free.
*/
void ;
/**
* @brief Free a compiled deviation temporary structure.
*
* @param[in] ctx libyang context.
* @param[in] dev Structure to free.
*/
void ;
/**
* @brief Free a compiled refine temporary structure.
*
* @param[in] ctx libyang context.
* @param[in] rfn Structure to free.
*/
void ;
/**
* @brief Free a duplicate of parsed node. It is returned by ::lys_compile_node_deviations_refines().
*
* @param[in] ctx libyang context.
* @param[in] dev_pnode Parsed node to free.
*/
void ;
/**
* @brief Compile and apply any precompiled deviations and refines targeting a node.
*
* @param[in] ctx Compile context.
* @param[in] pnode Parsed node to consider.
* @param[in] parent First compiled parent of @p pnode.
* @param[out] dev_pnode Copy of parsed node @p pnode with deviations and refines, if any. NULL if there are none.
* @param[out] not_supported Whether a not-supported deviation is defined for the node.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Compile and apply any precompiled top-level or uses augments targeting a node.
*
* @param[in] ctx Compile context.
* @param[in] node Compiled node to consider.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Prepare all top-level augments for the current module to be applied during data nodes compilation.
*
* @param[in] ctx Compile context.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Prepare all deviations for the current module to be applied during data nodes compilation.
*
* @param[in] ctx Compile context.
* @return LY_ERR value.
*/
LY_ERR ;
/**
* @brief Add references to target modules of top-level augments and deviations in a module and all its submodules.
* Adds the module reference to the target modules and if not implemented, implement them (but not compile).
*
* @param[in] mod Module to process.
* @param[in,out] unres Global unres to use.
* @return LY_SUCCESS on success.
* @return LY_ERECOMPILE on required recompilation of the dep set.
* @return LY_ERR on error.
*/
LY_ERR ;
/**
* @brief Revert precompilation of module augments and deviations. Meaning remove its reference from
* all the target modules.
*
* @param[in] ctx libyang context.
* @param[in] mod Mod whose precompilation to revert.
*/
void ;
/* LY_SCHEMA_COMPILE_AMEND_H_ */