yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
ncx_appinfo.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2021, YumaWorks, Inc., All Rights Reserved.
4 *
5 * Unless required by applicable law or agreed to in writing,
6 * software distributed under the License is distributed on an
7 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 * KIND, either express or implied. See the License for the
9 * specific language governing permissions and limitations
10 * under the License.
11 */
12#ifndef _H_ncx_appinfo
13#define _H_ncx_appinfo
14
15/* FILE: ncx_appinfo.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3617-feb-10 abb Begun; split out from ncx.c
37*/
38
39#include <xmlstring.h>
40
41#ifndef _H_dlq
42#include "dlq.h"
43#endif
44
45#ifndef _H_ext
46#include "ext.h"
47#endif
48
49#ifndef _H_ncx
50#include "ncx.h"
51#endif
52
53#ifndef _H_ncx_appinfo
54#include "ncx_appinfo.h"
55#endif
56
57#ifndef _H_ncxtypes
58#include "ncxtypes.h"
59#endif
60
61#ifndef _H_tk
62#include "tk.h"
63#endif
64
65#ifndef _H_typ
66#include "typ.h"
67#endif
68
69#ifndef _H_val
70#include "val.h"
71#endif
72
73#ifndef _H_xmlns
74#include "xmlns.h"
75#endif
76
77#ifndef _H_yang
78#include "yang.h"
79#endif
80
81#ifdef __cplusplus
82extern "C" {
83#endif
84
85/********************************************************************
86* *
87* F U N C T I O N S *
88* *
89*********************************************************************/
90
108extern ncx_appinfo_t *
109 ncx_new_appinfo (boolean isclone);
110
111
117extern void
119
120
139extern ncx_appinfo_t *
140 ncx_find_appinfo (dlq_hdr_t *appinfoQ,
141 const xmlChar *prefix,
142 const xmlChar *varname);
143
144
157extern const ncx_appinfo_t *
158 ncx_find_const_appinfo (const dlq_hdr_t *appinfoQ,
159 const xmlChar *prefix,
160 const xmlChar *varname);
161
162
176extern const ncx_appinfo_t *
177 ncx_find_next_appinfo (const ncx_appinfo_t *current,
178 const xmlChar *prefix,
179 const xmlChar *varname);
180
181
195extern ncx_appinfo_t *
197 const xmlChar *prefix,
198 const xmlChar *varname);
199
200
208extern ncx_appinfo_t *
210
211
218extern void
219 ncx_clean_appinfoQ (dlq_hdr_t *appinfoQ);
220
221
235extern status_t
237 ncx_module_t *mod,
238 dlq_hdr_t *appinfoQ);
239
240
261extern status_t
263 tk_chain_t *tkc,
264 ncx_module_t *mod,
265 dlq_hdr_t *appinfoQ,
266 boolean struct_ok);
267
268
286extern status_t
288 ncx_module_t *mod,
289 dlq_hdr_t *appinfoQ,
290 boolean plain_ok);
291
292
305extern status_t
307 tk_chain_t *tkc,
308 ncx_module_t *mod,
309 dlq_hdr_t *appinfoQ);
310
311
326extern status_t
328 tk_chain_t *tkc,
329 ncx_module_t *mod,
330 dlq_hdr_t *appinfoQ,
331 ncx_node_t node_type,
332 void *node);
333
334
347extern const xmlChar *
348 ncx_get_appinfo_value (const ncx_appinfo_t *appinfo);
349
350
351
355#ifdef __cplusplus
356} /* end extern 'C' */
357#endif
358
359#endif /* _H_ncx_appinfo */
dlq provides general double-linked list and queue support:
YANG Extension Handler.
status_t
global error return code
Definition: status_enum.h:210
ncx_node_t
NCX Internal Node Types.
Definition: ncxtypes.h:437
status_t ncx_resolve_appinfoQ_ex(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ, ncx_node_t node_type, void *node)
Validate all the appinfo clauses present in the specified Q.
Definition: ncx_appinfo.c:934
ncx_appinfo_t * ncx_clone_appinfo(ncx_appinfo_t *appinfo)
Clone an appinfo value.
Definition: ncx_appinfo.c:707
void ncx_free_appinfo(ncx_appinfo_t *appinfo)
Free an appinfo entry.
Definition: ncx_appinfo.c:478
const xmlChar * ncx_get_appinfo_value(const ncx_appinfo_t *appinfo)
Get the value string from an appinfo struct.
Definition: ncx_appinfo.c:1076
void ncx_clean_appinfoQ(dlq_hdr_t *appinfoQ)
Check an initialized appinfoQ for any entries Remove them from the queue and delete them.
Definition: ncx_appinfo.c:740
const ncx_appinfo_t * ncx_find_const_appinfo(const dlq_hdr_t *appinfoQ, const xmlChar *prefix, const xmlChar *varname)
Find an appinfo entry by name (First match is returned) The entry returned is not removed from the Q ...
Definition: ncx_appinfo.c:569
status_t ncx_resolve_appinfoQ(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ)
Validate all the appinfo clauses present in the specified Q.
Definition: ncx_appinfo.c:900
status_t ncx_consume_appinfo2(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ, boolean plain_ok)
Check if an appinfo clause is present Do not backup the current token The TK_TT_MSTRING token has not...
Definition: ncx_appinfo.c:861
ncx_appinfo_t * ncx_find_next_appinfo2(ncx_appinfo_t *current, const xmlChar *prefix, const xmlChar *varname)
Find the next instance of an appinfo entry by name (First match is returned, not const version) The e...
Definition: ncx_appinfo.c:665
const ncx_appinfo_t * ncx_find_next_appinfo(const ncx_appinfo_t *current, const xmlChar *prefix, const xmlChar *varname)
Find the next instance of an appinfo entry by name (First match is returned) The entry returned is no...
Definition: ncx_appinfo.c:617
ncx_appinfo_t * ncx_new_appinfo(boolean isclone)
Create an appinfo entry.
Definition: ncx_appinfo.c:445
ncx_appinfo_t * ncx_find_appinfo(dlq_hdr_t *appinfoQ, const xmlChar *prefix, const xmlChar *varname)
Find an appinfo entry by name (First match is returned) The entry returned is not removed from the Q.
Definition: ncx_appinfo.c:522
status_t ncx_consume_appinfo(tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ)
Check if an appinfo clause is present.
Definition: ncx_appinfo.c:775
status_t ncx_consume_top_appinfo(yang_pcb_t *pcb, tk_chain_t *tkc, ncx_module_t *mod, dlq_hdr_t *appinfoQ, boolean struct_ok)
Check if an appinfo clause is present Called from the body_stmt handler Only top-level extension hand...
Definition: ncx_appinfo.c:817
YANG module utility functions.
NCX Module Library Extension (Application Info) Utility Functions.
YANG module data structures Many internal representations of YANG module constructs.
YANG extension usage entry A nested external statement will produce a tree of ncx_appinfo_t.
Definition: ncxtypes.h:887
representation of one module or submodule during and after parsing
Definition: ncxtypes.h:1138
token parsing chain (main parser control block)
Definition: tk.h:415
YANG parser control block.
Definition: yang.h:204
NCX Syntax Token Handler.
Parameter Type Handler.
Value Node Basic Support.
XML namespace support.
YANG Module parser utilities.