yumapro  20.10-12
YumaPro SDK
agt_xml.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_xml
13 #define _H_agt_xml
14 /* FILE: agt_xml.h
15 *********************************************************************
16 * *
17 * P U R P O S E *
18 * *
19 *********************************************************************/
20 
27 /*********************************************************************
28 * *
29 * C H A N G E H I S T O R Y *
30 * *
31 *********************************************************************
32 
33 date init comment
34 ----------------------------------------------------------------------
35 14-oct-05 abb begun
36 2-jan-06 abb rewrite xml_consume_* API to use simpler
37  xml_node_t
38 11-feb-07 abb moved consume_node fns to agt_xml.h
39 22-aug-08 abb changed reader parameter to the session
40  control block to record error stats;
41  also errQ to msghdr to record xmlns directives
42 */
43 
44 
45 #ifndef _H_ncxtypes
46 #include "ncxtypes.h"
47 #endif
48 
49 #ifndef _H_ses
50 #include "ses.h"
51 #endif
52 
53 #ifndef _H_xmlns
54 #include "xmlns.h"
55 #endif
56 
57 #ifndef _H_xml_msg
58 #include "xml_msg.h"
59 #endif
60 
61 #ifndef _H_xml_util
62 #include "xml_util.h"
63 #endif
64 
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
68 
69 /********************************************************************
70 * *
71 * F U N C T I O N S *
72 * *
73 *********************************************************************/
74 
75 
76 /* Group definied in agt_top.h */
77 
136 extern status_t
137  agt_xml_consume_node (ses_cb_t *scb,
138  xml_node_t *node,
139  ncx_layer_t layer,
140  xml_msg_hdr_t *msghdr);
141 
142 
159 extern status_t
160  agt_xml_consume_node_noeof (ses_cb_t *scb,
161  xml_node_t *node,
162  ncx_layer_t layer,
163  xml_msg_hdr_t *msghdr);
164 
165 
183 extern status_t
184  agt_xml_consume_node_nons (ses_cb_t *scb,
185  xml_node_t *node,
186  ncx_layer_t layer,
187  xml_msg_hdr_t *msghdr);
188 
189 
190 
207 extern status_t
208  agt_xml_consume_node_noadv (ses_cb_t *scb,
209  xml_node_t *node,
210  ncx_layer_t layer,
211  xml_msg_hdr_t *msghdr);
212 
213 
214 
218 #ifdef __cplusplus
219 } /* end extern 'C' */
220 #endif
221 
222 #endif /* _H_agt_xml */
ses.h
NETCONF Session Common definitions module.
agt_util.h
Utility Functions for NCX Server method routines.
xml_util.h
XML Utilities.
agt_xml.h
NETCONF Server XML Reader interface.
agt_record_error
void agt_record_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:1942
xpath1.h
XPath 1.0 expression support.
xpath.h
Schema and data model Xpath search support.
agt_xml_consume_node_nons
status_t agt_xml_consume_node_nons(ses_cb_t *scb, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr)
Consume an XML node from libxml2.
Definition: agt_xml.c:196
agt_record_attr_error
void agt_record_attr_error(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_attr_t *xmlattr, const xml_node_t *xmlnode, const xmlChar *badns, ncx_node_t nodetyp, void *errnode)
Generate an rpc_err_rec_t and save it in the msg.
Definition: agt_util.c:2162
xml_parse_consume_node
status_t xml_parse_consume_node(ses_cb_t *scb, boolean advance, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr, boolean eoferr, boolean nserr)
Internal consume XML node function.
Definition: xml_parse.c:4240
yangconst.h
Contains YANG constants separated to prevent H file include loops.
agt_xml_consume_node_noeof
status_t agt_xml_consume_node_noeof(ses_cb_t *scb, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr)
Consume an XML node from libxml2.
Definition: agt_xml.c:168
xml_parse.h
XML Parser functions.
agt.h
Multi-Protocol Network Management Server.
xpath_yang.h
YANG-specific Xpath support.
xml_msg.h
XML and JSON Message send and receive support.
agt_xml_consume_node_noadv
status_t agt_xml_consume_node_noadv(ses_cb_t *scb, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr)
Consume an XML node from libxml2.
Definition: agt_xml.c:222
agt_xml_consume_node
status_t agt_xml_consume_node(ses_cb_t *scb, xml_node_t *node, ncx_layer_t layer, xml_msg_hdr_t *msghdr)
Consume an XML node from libxml2.
Definition: agt_xml.c:141
log.h
NCX System Logging Manager.
ncxtypes.h
YANG module data structures Many internal representations of YANG module constructs.
ncx.h
YANG module utility functions.
agt_record_error_errinfo
void agt_record_error_errinfo(ses_cb_t *scb, xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t res, const xml_node_t *xmlnode, ncx_node_t parmtyp, const void *error_info, ncx_node_t nodetyp, void *error_path, const ncx_errinfo_t *errinfo)
Generate an rpc_err_rec_t and save it in the msg Use provided error fields.
Definition: agt_util.c:2051
xmlns.h
XML namespace support.
status.h
Global error messages for status code enumerations.