yumapro  24.10-11
YumaPro SDK
Loading...
Searching...
No Matches
agt_acm_extern.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_acm_extern
13#define _H_agt_acm_extern
14
15/* FILE: agt_acm_extern.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
31/*********************************************************************
32* *
33* C H A N G E H I S T O R Y *
34* *
35*********************************************************************
36
37date init comment
38----------------------------------------------------------------------
3918-jun-12 abb Begun; split from agt_acm.h
40*/
41
42#include <xmlstring.h>
43
44
45#ifndef _H_obj
46#include "obj.h"
47#endif
48
49#ifndef _H_op
50#include "op.h"
51#endif
52
53#ifndef _H_status
54#include "status.h"
55#endif
56
57#ifndef _H_val
58#include "val.h"
59#endif
60
61#ifndef _H_xml_msg
62#include "xml_msg.h"
63#endif
64
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70/********************************************************************
71* *
72* C O N S T A N T S *
73* *
74*********************************************************************/
75
76
77/********************************************************************
78* *
79* T Y P E S *
80* *
81*********************************************************************/
82
83
106typedef boolean
108 const xmlChar *user,
109 const obj_template_t *rpcobj);
110
111
123typedef boolean
124 (*agt_acm_extern_notif_fn_t) (const xmlChar *user,
125 const obj_template_t *notifobj);
126
127
145typedef boolean
147 const xmlChar *user,
148 const val_value_t *newval,
149 const val_value_t *curval,
150 op_editop_t editop);
151
152
163typedef boolean
165 const xmlChar *user,
166 const val_value_t *val);
167
168
169/********************************************************************
170* *
171* F U N C T I O N S *
172* *
173*********************************************************************/
174
175
183extern status_t
184 agt_acm_extern_init2 (void);
185
186
196extern void agt_acm_extern_init0 (void);
197
198
205extern status_t
206 agt_acm_extern_init1 (void);
207
208
215extern void
216 agt_acm_extern_cleanup (void);
217
218
230extern status_t
231 agt_acm_extern_init_msg_cache (ses_cb_t *scb,
232 xml_msg_hdr_t *msg);
233
234
253
254
265extern boolean
267 const xmlChar *user,
268 const obj_template_t *rpcobj);
269
270
282extern boolean
283 agt_acm_extern_notif_allowed (const xmlChar *user,
284 const obj_template_t *notifobj);
285
286
304extern boolean
306 const xmlChar *user,
307 const val_value_t *newval,
308 const val_value_t *curval,
309 op_editop_t editop);
310
311
322extern boolean
324 const xmlChar *user,
325 const val_value_t *val);
326
327
331#ifdef __cplusplus
332} /* end extern 'C' */
333#endif
334
335#endif /* _H_agt_acm_extern */
boolean agt_acm_extern_val_write_allowed(xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *newval, const val_value_t *curval, op_editop_t editop)
Check if the specified user is allowed to access a value node.
Definition: agt_acm_extern.c:260
boolean(* agt_acm_extern_write_fn_t)(xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *newval, const val_value_t *curval, op_editop_t editop)
Check if the specified user is allowed to access a value node.
Definition: agt_acm_extern.h:146
boolean agt_acm_extern_rpc_allowed(xml_msg_hdr_t *msg, const xmlChar *user, const obj_template_t *rpcobj)
Check if the specified user is allowed to invoke an RPC.
Definition: agt_acm_extern.c:200
boolean(* agt_acm_extern_read_fn_t)(xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *val)
Check if the specified user is allowed to read a value node.
Definition: agt_acm_extern.h:164
boolean agt_acm_extern_val_read_allowed(xml_msg_hdr_t *msg, const xmlChar *user, const val_value_t *val)
Check if the specified user is allowed to read a value node.
Definition: agt_acm_extern.c:289
boolean(* agt_acm_extern_rpc_fn_t)(xml_msg_hdr_t *msg, const xmlChar *user, const obj_template_t *rpcobj)
Check if the specified user is allowed to invoke an RPC.
Definition: agt_acm_extern.h:107
boolean agt_acm_extern_notif_allowed(const xmlChar *user, const obj_template_t *notifobj)
Check if the specified user is allowed to receive a notification event.
Definition: agt_acm_extern.c:228
void agt_acm_extern_register_callbacks(agt_acm_extern_rpc_fn_t rpcfn, agt_acm_extern_notif_fn_t notfn, agt_acm_extern_write_fn_t writefn, agt_acm_extern_read_fn_t readfn)
Register the external callbacks for ACM implementation.
Definition: agt_acm_extern.c:318
boolean(* agt_acm_extern_notif_fn_t)(const xmlChar *user, const obj_template_t *notifobj)
Check if the specified user is allowed to receive a notification event.
Definition: agt_acm_extern.h:124
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:219
Data Object Support.
NETCONF protocol operations.
Global error messages for status code enumerations.
One YANG data-def-stmt.
Definition: obj.h:1232
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Common Encoding Message Header No longer XML specific!! Used by JSON and CBOR parsing as well!...
Definition: xml_msg.h:404
Value Node Basic Support.
XML and JSON Message send and receive support.