yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
xpath1_get2.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2023, 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_xpath1_get2
13#define _H_xpath1_get2
14
15/* FILE: xpath1_get2.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3521-dec-16 abb Begun; split from xpath1.c
36
37*/
38
39#ifndef _H_dlq
40#include "dlq.h"
41#endif
42
43#ifndef _H_ncxtypes
44#include "ncxtypes.h"
45#endif
46
47#ifndef _H_obj
48#include "obj.h"
49#endif
50
51#ifndef _H_status
52#include "status.h"
53#endif
54
55#ifndef _H_tk
56#include "tk.h"
57#endif
58
59#ifndef _H_val
60#include "val.h"
61#endif
62
63#ifndef _H_xmlns
64#include "xmlns.h"
65#endif
66
67#ifndef _H_xpath
68#include "xpath.h"
69#endif
70
71#ifdef __cplusplus
72extern "C" {
73#endif
74
75/********************************************************************
76* *
77* C O N S T A N T S *
78* *
79*********************************************************************/
80
81
82/********************************************************************
83* *
84* T Y P E S *
85* *
86*********************************************************************/
87
100typedef struct xpath1_walker_cookie_t_ {
103
106
108 const xmlChar *modname;
109
111 const xmlChar *objname;
112
115
118
121
123 dlq_hdr_t *resnodeQ;
124
127
131
132
133/********************************************************************
134* *
135* F U N C T I O N S *
136* *
137*********************************************************************/
138
139
140
176extern status_t
178 xpath_result_t *result,
179 xmlns_id_t childnsid,
180 const xmlChar *childname,
181 boolean textmode,
182 ncx_xpath_axis_t axis);
183
184
190extern status_t
192
193
203extern void
205 val_value_t **parentval,
206 xpath_get2_cb_t **parent_cb);
207
208
218extern status_t
220 xpath_result_t *result,
221 boolean leaflist_only);
222
223
234extern xpath_get2_cb_t *
236 val_value_t *parent_val,
237 xpath_get2_cb_t *parent_cb);
238
239
245extern void
247
248
259extern xpath_get2_node_t *
261 val_value_t *val,
262 xpath_get2_form_t get2_form);
263
264
270extern void
272
273
284extern status_t
286 dlq_hdr_t *resnodeQ,
287 xpath_get2_cb_t **retcb);
288
289
298extern void
299 xpath1_get2_free_fake_nodes (dlq_hdr_t *resnodeQ);
300
301
309extern val_value_t *
311 obj_template_t *keyobj);
312
313
324extern getcb_get2_t *
326
327
331#ifdef __cplusplus
332} /* end extern 'C' */
333#endif
334
335
336#endif /* _H_xpath1_get2 */
dlq provides general double-linked list and queue support:
status_t
global error return code
Definition: status_enum.h:210
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
xpath_get2_form_t
GET2 control block forms.
Definition: xpath.h:483
status_t xpath1_get2_create_fake_nodes(getcb_get2_t *parent_get2cb, dlq_hdr_t *resnodeQ, xpath_get2_cb_t **retcb)
@brief Create a dummy resnode chain for XPath processing of a GET2 node as the context node
Definition: xpath1_get2.c:2335
xpath_get2_cb_t * xpath1_get2_new_cb(obj_template_t *obj, val_value_t *parent_val, xpath_get2_cb_t *parent_cb)
Create a malloced XPath parser control block.
Definition: xpath1_get2.c:2230
val_value_t * xpath1_get2_find_return_key(xpath_get2_cb_t *cb, obj_template_t *keyobj)
Find a return key.
Definition: xpath1_get2.c:2484
getcb_get2_t * xpath1_get2_ancestor_keys_setup(xpath_get2_cb_t *cb)
Create parent_get2cb to facilitate all ancestor keys to the next callback invocation.
Definition: xpath1_get2.c:2532
status_t xpath1_get2_set_nodeset_child(xpath_pcb_t *pcb, xpath_result_t *result, xmlns_id_t childnsid, const xmlChar *childname, boolean textmode, ncx_xpath_axis_t axis)
Check the current result nodeset and replace each node with a node for every child instead.
Definition: xpath1_get2.c:1900
void xpath1_get2_free_node(xpath_get2_node_t *node)
Free a malloced XPath GET2 node.
Definition: xpath1_get2.c:2315
status_t xpath1_get2_set_resnode_parent(xpath_resnode_t *resnode)
Set the resnode to its parent.
Definition: xpath1_get2.c:2040
void xpath1_get2_get_resnode_parent(xpath_get2_node_t *get2node, val_value_t **parentval, xpath_get2_cb_t **parent_cb)
Get the resnode parent.
Definition: xpath1_get2.c:2102
status_t xpath1_get2_expand_result(xpath_pcb_t *pcb, xpath_result_t *result, boolean leaflist_only)
Check the result for GET2 nodes that need to be retrieved.
Definition: xpath1_get2.c:2145
void xpath1_get2_free_fake_nodes(dlq_hdr_t *resnodeQ)
Free the queue of dummy resnodes chain for XPath processing of a GET2 node as the context node.
Definition: xpath1_get2.c:2452
xpath_get2_node_t * xpath1_get2_new_node(xpath_get2_cb_t *cb, val_value_t *val, xpath_get2_form_t get2_form)
Create a malloced XPath GET2 node.
Definition: xpath1_get2.c:2292
void xpath1_get2_free_cb(xpath_get2_cb_t *cb)
Free a malloced XPath parser control block.
Definition: xpath1_get2.c:2268
ncx_xpath_axis_t
XPath expression axis types.
Definition: ncxtypes.h:662
YANG module data structures Many internal representations of YANG module constructs.
Data Object Support.
Global error messages for status code enumerations.
GET2 control block.
Definition: getcb.h:355
One YANG data-def-stmt.
Definition: obj.h:1209
one value to match one type
Definition: val.h:911
Special XPath GET2 state record to be used instead of val_value_t or val_child_hdr_t pointers.
Definition: xpath.h:560
Special XPath GET2 resnode.
Definition: xpath.h:608
XPath parser control block.
Definition: xpath.h:752
XPath result node struct.
Definition: xpath.h:664
XPath expression result.
Definition: xpath.h:703
NCX Syntax Token Handler.
Value Node Basic Support.
XML namespace support.
Schema and data model Xpath search support.