yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt_rpcerr.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_rpcerr
13#define _H_agt_rpcerr
14/* FILE: agt_rpcerr.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
33date init comment
34----------------------------------------------------------------------
3507-mar-06 abb Begun.
3613-jan-07 abb moved from rpc dir to agt; rename rpc_agterr
37 to agt_rpcerr
38*/
39
40#include <xmlstring.h>
41
42#ifndef _H_ncxtypes
43#include "ncxtypes.h"
44#endif
45
46#ifndef _H_rpc_err
47#include "rpc_err.h"
48#endif
49
50#ifndef _H_status
51#include "status.h"
52#endif
53
54#ifndef _H_val
55#include "val.h"
56#endif
57
58#ifndef _H_xml_msg
59#include "xml_msg.h"
60#endif
61
62#ifndef _H_xml_util
63#include "xml_util.h"
64#endif
65
66#ifndef _H_getcb
67#include "getcb.h"
68#endif
69
70#ifdef __cplusplus
71extern "C" {
72#endif
73
74
75/********************************************************************
76* *
77* F U N C T I O N S *
78* *
79*********************************************************************/
80
119extern rpc_err_rec_t *
121 status_t interr,
122 const xml_node_t *errnode,
123 ncx_node_t parmtyp,
124 const void *error_parm,
125 xmlChar *error_path);
126
127
153extern rpc_err_rec_t *
155 status_t interr,
156 const xml_node_t *errnode,
157 ncx_node_t parmtyp,
158 const void *error_parm,
159 xmlChar *error_path,
160 const ncx_errinfo_t *errinfo);
161
162
193extern rpc_err_rec_t *
195 status_t interr,
196 const xml_node_t *errnode,
197 ncx_node_t parmtyp,
198 const void *error_parm,
199 xmlChar *error_path,
200 const ncx_errinfo_t *errinfo,
201 ncx_node_t nodetyp,
202 void *error_path_raw,
203 boolean is_error);
204
205
223extern rpc_err_rec_t *
225 status_t interr,
226 val_value_t *errval,
227 xmlChar *error_path);
228
229
250extern rpc_err_rec_t *
252 ncx_layer_t layer,
253 status_t interr,
254 dlq_hdr_t *valuniqueQ,
255 xmlChar *error_path,
256 val_value_t *errval);
257
258
280extern rpc_err_rec_t *
282 status_t interr,
283 const xml_attr_t *attr,
284 const xml_node_t *errnode,
285 val_value_t *errnodeval,
286 const xmlChar *badns,
287 xmlChar *error_path);
288
289
296extern rpc_err_t
298
299
300
307extern uint32
309
310
317extern const xmlChar *
318 agt_rpcerr_get_http_status_string (uint32 status);
319
320
321
334extern status_t
336 dlq_hdr_t *dataQ);
337
338
342#ifdef __cplusplus
343} /* end extern 'C' */
344#endif
345
346#endif /* _H_agt_rpcerr */
GET1 and GET2 Callback Support.
status_t agt_rpcerr_add_user_data(rpc_err_rec_t *err, dlq_hdr_t *dataQ)
Add data nodes to return in the <error-info> section of an error record.
Definition: agt_rpcerr.c:2467
rpc_err_rec_t * agt_rpcerr_gen_error_ex(ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path, const ncx_errinfo_t *errinfo, ncx_node_t nodetyp, void *error_path_raw, boolean is_error)
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer...
Definition: agt_rpcerr.c:1532
rpc_err_rec_t * agt_rpcerr_gen_insert_error(ncx_layer_t layer, status_t interr, val_value_t *errval, xmlChar *error_path)
Generate an internal <rpc-error> record for an element for an insert operation failed error.
Definition: agt_rpcerr.c:1940
const xmlChar * agt_rpcerr_get_http_status_string(uint32 status)
Translate the HTTP status code to an HTTP status line.
Definition: agt_rpcerr.c:2361
rpc_err_rec_t * agt_rpcerr_gen_error(ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path)
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer...
Definition: agt_rpcerr.c:1421
rpc_err_rec_t * agt_rpcerr_gen_attr_error(ncx_layer_t layer, status_t interr, const xml_attr_t *attr, const xml_node_t *errnode, val_value_t *errnodeval, const xmlChar *badns, xmlChar *error_path)
Generate an internal <rpc-error> record for an attribute.
Definition: agt_rpcerr.c:2122
rpc_err_t agt_rpcerr_get_rpcerr(status_t intres)
Translate the status_t to a rpc_err_t.
Definition: agt_rpcerr.c:2226
rpc_err_rec_t * agt_rpcerr_gen_error_errinfo(ncx_layer_t layer, status_t interr, const xml_node_t *errnode, ncx_node_t parmtyp, const void *error_parm, xmlChar *error_path, const ncx_errinfo_t *errinfo)
Generate an internal <rpc-error> record for an element (or non-attribute) related error for any layer...
Definition: agt_rpcerr.c:1474
rpc_err_rec_t * agt_rpcerr_gen_unique_error(xml_msg_hdr_t *msghdr, ncx_layer_t layer, status_t interr, dlq_hdr_t *valuniqueQ, xmlChar *error_path, val_value_t *errval)
Generate an internal <rpc-error> record for an element for a unique-stmt failed error (data-not-uniqu...
Definition: agt_rpcerr.c:2028
uint32 agt_rpcerr_get_http_status_code(status_t res)
Translate the rpc_err_t to an HTTP code.
Definition: agt_rpcerr.c:2249
status_t
global error return code
Definition: status_enum.h:210
ncx_node_t
NCX Internal Node Types.
Definition: ncxtypes.h:437
ncx_layer_t
Enumeration of NETCONF protocol layers.
Definition: ncxtypes.h:507
rpc_err_t
enumerations for NETCONF standard errors
Definition: rpc_err.h:405
YANG module data structures Many internal representations of YANG module constructs.
NETCONF protocol standard error definitions.
Global error messages for status code enumerations.
YANG error info statement struct used to override default error handling in the server.
Definition: ncxtypes.h:1366
One RPC error record built by the server before an <rpc-error> element is generated.
Definition: rpc_err.h:484
one value to match one type
Definition: val.h:912
represents one attribute
Definition: xml_util.h:159
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:404
gather node data into a simple struct.
Definition: xml_util.h:207
Value Node Basic Support.
XML and JSON Message send and receive support.
XML Utilities.