yumapro  24.10-3
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
27/*********************************************************************
28* *
29* C H A N G E H I S T O R Y *
30* *
31*********************************************************************
32
33date init comment
34----------------------------------------------------------------------
3518-jun-12 abb Begun; split from agt_acm.h
36*/
37
38#include <xmlstring.h>
39
40
41#ifndef _H_obj
42#include "obj.h"
43#endif
44
45#ifndef _H_op
46#include "op.h"
47#endif
48
49#ifndef _H_status
50#include "status.h"
51#endif
52
53#ifndef _H_val
54#include "val.h"
55#endif
56
57#ifndef _H_xml_msg
58#include "xml_msg.h"
59#endif
60
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
66/********************************************************************
67* *
68* C O N S T A N T S *
69* *
70*********************************************************************/
71
72
73/********************************************************************
74* *
75* T Y P E S *
76* *
77*********************************************************************/
78
79
100typedef boolean
102 const xmlChar *user,
103 const obj_template_t *rpcobj);
104
105
115typedef boolean
116 (*agt_acm_extern_notif_fn_t) (const xmlChar *user,
117 const obj_template_t *notifobj);
118
119
135typedef boolean
137 const xmlChar *user,
138 const val_value_t *newval,
139 const val_value_t *curval,
140 op_editop_t editop);
141
142
151typedef boolean
153 const xmlChar *user,
154 const val_value_t *val);
155
156
157/********************************************************************
158* *
159* F U N C T I O N S *
160* *
161*********************************************************************/
162
163
170extern status_t
172
173
182extern void agt_acm_extern_init0 (void);
183
184
190extern status_t
192
193
199extern void
201
202
213extern status_t
215 xml_msg_hdr_t *msg);
216
217
234
235
244extern boolean
246 const xmlChar *user,
247 const obj_template_t *rpcobj);
248
249
259extern boolean
260 agt_acm_extern_notif_allowed (const xmlChar *user,
261 const obj_template_t *notifobj);
262
263
279extern boolean
281 const xmlChar *user,
282 const val_value_t *newval,
283 const val_value_t *curval,
284 op_editop_t editop);
285
286
295extern boolean
297 const xmlChar *user,
298 const val_value_t *val);
299
300
304#ifdef __cplusplus
305} /* end extern 'C' */
306#endif
307
308#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
void agt_acm_extern_cleanup(void)
Cleanup the external access control module.
Definition: agt_acm_extern.c:144
status_t agt_acm_extern_init2(void)
Phase 2 : Initialize the external data model configuration data structures.
Definition: agt_acm_extern.c:88
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:136
status_t agt_acm_extern_init1(void)
Phase 1: Load the external data module.
Definition: agt_acm_extern.c:128
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
status_t agt_acm_extern_init_msg_cache(ses_cb_t *scb, xml_msg_hdr_t *msg)
Malloc and initialize an agt_acm_cache_t struct and attach it to the incoming message.
Definition: agt_acm_extern.c:172
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:152
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:101
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_init0(void)
Init 0 Pre-init 1 phase.
Definition: agt_acm_extern.c:104
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:116
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
status_t
global error return code
Definition: status_enum.h:210
Data Object Support.
NETCONF protocol operations.
Global error messages for status code enumerations.
One YANG data-def-stmt.
Definition: obj.h:1229
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.