yumapro  21.10T-8
YumaPro SDK
agt_tree.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_agt_tree
13 #define _H_agt_tree
14 
15 /* FILE: agt_tree.h
16 *********************************************************************
17 * *
18 * P U R P O S E *
19 * *
20 *********************************************************************/
21 
29 /*********************************************************************
30 * *
31 * C H A N G E H I S T O R Y *
32 * *
33 *********************************************************************
34 
35 date init comment
36 ----------------------------------------------------------------------
37 16-jun-06 abb Begun
38 
39 */
40 
41 #ifndef _H_cfg
42 #include "cfg.h"
43 #endif
44 
45 #ifndef _H_rpc
46 #include "rpc.h"
47 #endif
48 
49 #ifndef _H_ses
50 #include "ses.h"
51 #endif
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 
71 /********************************************************************
72 * *
73 * F U N C T I O N S *
74 * *
75 *********************************************************************/
76 
77 
123 extern ncx_filptr_t *
125  rpc_msg_t *msg,
126  const cfg_template_t *cfg,
127  boolean getop,
128  boolean *do_all);
129 
130 
178 extern ncx_filptr_t *
180  rpc_msg_t *msg,
181  val_value_t *root,
182  obj_template_t *root_obj,
183  val_value_t *filter,
184  boolean getop,
185  boolean *do_all);
186 
187 
199 extern void
201  rpc_msg_t *msg,
202  ncx_filptr_t *top,
203  int32 indent,
204  boolean getop);
205 
206 
221 extern boolean
223  ses_cb_t *scb,
224  val_value_t *filter,
225  val_value_t *topval);
226 
227 
239 extern void
241  xml_msg_hdr_t *msg,
242  ncx_filptr_t *filptr,
243  obj_template_t *obj,
244  int32 indent,
245  boolean getop);
246 
247 
274 extern void
276  xml_msg_hdr_t *msg,
277  ncx_filptr_t *filptr,
278  obj_template_t *obj,
279  int32 indent,
280  boolean getop,
281  boolean isfirst,
282  boolean islast,
283  boolean isfirstchild,
284  boolean isfirstsibling,
285  boolean force_lastsibling,
286  boolean force_lastsib_value,
287  boolean force_array_obj);
288 
289 
298 extern boolean
300  val_value_t *targval);
301 
302 
314 extern boolean
316  const xmlChar *testval,
317  val_value_t *curval);
318 
319 
333 extern obj_template_t *
335  const xmlChar *obj_name,
336  obj_template_t *parent_obj,
337  boolean *more_matches);
338 
339 
340 #ifdef PTHREADS
341 
350 extern boolean
352 #endif // PTHREADS
353 
354 
381 extern status_t
383  rpc_msg_t *msg,
384  const cfg_template_t *cfg,
385  boolean getop,
386  val_value_t *filter,
387  boolean *skiptop,
388  xmlChar **xpathstr);
389 
390 
394 #ifdef __cplusplus
395 } /* end extern 'C' */
396 #endif
397 
398 #endif /* _H_agt_tree */
Common Encoding Message Header No longer XML specific!! Used by JSON parsing as well!! Allows common ...
Definition: xml_msg.h:351
void agt_tree_output_node_from_obj_json(ses_cb_t *scb, xml_msg_hdr_t *msg, ncx_filptr_t *filptr, obj_template_t *obj, int32 indent, boolean getop, boolean isfirst, boolean islast, boolean isfirstchild, boolean isfirstsibling, boolean force_lastsibling, boolean force_lastsib_value, boolean force_array_obj)
Output the get2 callback node from the value node to the specified session; JSON format.
Definition: agt_tree.c:3505
@ brief NCX configuration database manager
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
boolean agt_tree_content_match_test(ses_cb_t *scb, const xmlChar *testval, val_value_t *curval)
Check a content match node against the corresponding node in the target.
Definition: agt_tree.c:3742
boolean agt_tree_filter_ok_for_nolock(val_value_t *filterval)
Check a filter to see if it selects only top-level config=false.
Definition: agt_tree.c:3875
One YANG data-def-stmt.
Definition: obj.h:1140
NETCONF Session Common definitions module.
uint16 xmlns_id_t
integer handle for registered namespaces
Definition: xmlns.h:89
void agt_tree_output_node_from_obj_xml(ses_cb_t *scb, xml_msg_hdr_t *msg, ncx_filptr_t *filptr, obj_template_t *obj, int32 indent, boolean getop)
Output the get2 callback node from the value node to the specified session.
Definition: agt_tree.c:3300
struct representing 1 configuration database
Definition: cfg.h:225
status_t agt_tree_cvt_subtree_xpath(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, val_value_t *filter, boolean *skiptop, xmlChar **xpathstr)
Convert a subtree filter to an XPath filter.
Definition: agt_tree.c:3957
obj_template_t * agt_tree_find_child_object(xmlns_id_t obj_id, const xmlChar *obj_name, obj_template_t *parent_obj, boolean *more_matches)
find the child object template from a namespace ID (may be zero)
Definition: agt_tree.c:3778
one value to match one type
Definition: val.h:870
struct for holding r/o pointer to generic internal node for filtering purposes
Definition: ncxtypes.h:982
Session Control Block.
Definition: ses.h:542
status_t
global error return code
Definition: status_enum.h:186
void agt_tree_output_filter(ses_cb_t *scb, rpc_msg_t *msg, ncx_filptr_t *top, int32 indent, boolean getop)
get and get-config step 2.
Definition: agt_tree.c:3142
ncx_filptr_t * agt_tree_prune_filter(ses_cb_t *scb, rpc_msg_t *msg, const cfg_template_t *cfg, boolean getop, boolean *do_all)
get and get-config step 1.
Definition: agt_tree.c:2954
NETCONF protocol remote procedure call common definitions.
ncx_filptr_t * agt_tree_prune_filter2(ses_cb_t *scb, rpc_msg_t *msg, val_value_t *root, obj_template_t *root_obj, val_value_t *filter, boolean getop, boolean *do_all)
get and get-config step 1.
Definition: agt_tree.c:3024
boolean agt_tree_test_filter(xml_msg_hdr_t *msghdr, ses_cb_t *scb, val_value_t *filter, val_value_t *topval)
notification filter evaluation
Definition: agt_tree.c:3207
boolean agt_tree_attr_test(val_value_t *filval, val_value_t *targval)
Check any attribute match expressions.
Definition: agt_tree.c:3672