yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
agt_glob.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024, YumaWorks, Inc., All Rights Reserved.
3 *
4 * Unless required by applicable law or agreed to in writing,
5 * software distributed under the License is distributed on an
6 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
7 * KIND, either express or implied. See the License for the
8 * specific language governing permissions and limitations
9 * under the License.
10 */
11#ifndef _H_agt_glob
12#define _H_agt_glob
13
14/* FILE: agt_glob.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----------------------------------------------------------------------
3520-apr-24 am Begun
36
37*/
38
39#ifndef _H_agt_rpc
40#include "agt_rpc.h"
41#endif
42
43#ifndef _H_agt_action
44#include "agt_action.h"
45#endif
46
47#ifndef _H_rpc
48#include "rpc.h"
49#endif
50
51#ifndef _H_ses
52#include "ses.h"
53#endif
54
55#ifndef _H_status_enum
56#include "status_enum.h"
57#endif
58
59#ifndef _H_val
60#include "val.h"
61#endif
62
63#ifndef _H_xml_util
64#include "xml_util.h"
65#endif
66
67#ifdef __cplusplus
68extern "C" {
69#endif
70
71
72/********************************************************************
73* *
74* T Y P E S *
75* *
76*********************************************************************/
77
78
93typedef struct agt_glob_cbset_t_ {
94
97
100
106
112
116 dlq_hdr_t glob_subsysQ;
117
119
120
121/********************************************************************
122* *
123* F U N C T I O N S *
124* *
125*********************************************************************/
126
127
135extern status_t
136 agt_glob_init (void);
137
138
146extern void
147 agt_glob_cleanup (void);
148
149
157extern agt_glob_cbset_t *
158 agt_glob_get_cbset (void);
159
160
169extern agt_rpc_method_t *
171
172
181extern agt_action_cb_t *
183
184
193extern agt_cb_fn_t
195
196
205extern agt_edit3_fn_t
207
208
220extern boolean
222
223
235extern boolean
237
238
250extern boolean
252
253
268extern status_t
270 agt_rpc_method_t cbfn);
271
272
279extern void
281
282
293extern status_t
295 agt_action_cb_t action_cb);
296
297
302extern void
304
305
317extern status_t
319
320
332extern status_t
334
335
342extern void
344
345
357extern status_t
359
360
367extern void
369
370
378extern boolean
380
381
389extern boolean
391
392
403extern status_t
404 agt_glob_setup_subsysQ (const xmlChar *subsys_id,
405 agt_cb_calltype_t calltype);
406
407
415extern dlq_hdr_t *
417
418
425extern void
427
428
441extern boolean
443
444
448#ifdef __cplusplus
449} /* end extern 'C' */
450#endif
451
452#endif /* _H_agt_glob */
NETCONF Server YANG action handler.
NETCONF protocol remote procedure call server-side definitions.
status_t(* agt_edit3_fn_t)(agt_editcb_t *editcb)
EDIT3 Callback function for server object handler.
Definition: agt_editcb.h:198
status_t(* agt_cb_fn_t)(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
EDIT1 and EDIT2 Callback function for server object handler.
Definition: agt_cb.h:272
agt_cb_calltype_t
different data node callback types for SIL and SIL-SA to register
Definition: agt_cb.h:212
void agt_glob_unregister_edit(void)
Unregister Global EDIT callbacks.
Definition: agt_glob.c:999
dlq_hdr_t * agt_glob_get_subsysQ(void)
Get the Global callbacks subsystem Queue.
Definition: agt_glob.c:1202
boolean agt_glob_has_rpc_callback(obj_template_t *obj)
Check there is RPC callback.
Definition: agt_glob.c:554
void agt_glob_clean_subsysQ(void)
Clean the SIL-SA subsysQ in cbset.
Definition: agt_glob.c:1221
status_t agt_glob_register_action(agt_rpc_phase_t phase, agt_action_cb_t action_cb)
add callback for 1 phase of Global Action processing
Definition: agt_glob.c:786
void agt_glob_unregister_rpc(void)
Unregister Global RPC callbacks.
Definition: agt_glob.c:753
boolean agt_glob_edit2_allowed(obj_template_t *obj)
Check if EDIT2 or EDIT3 are allowed to be invoked.
Definition: agt_glob.c:1253
agt_cb_fn_t agt_glob_get_edit2_cbfn(obj_template_t *obj)
Find EDIT2 callback function if any for a specific OBJ.
Definition: agt_glob.c:473
status_t agt_glob_setup_subsysQ(const xmlChar *subsys_id, agt_cb_calltype_t calltype)
Malloc and init a new header for a subsystem.
Definition: agt_glob.c:1163
agt_glob_cbset_t * agt_glob_get_cbset(void)
Get the Global Cbset structure.
Definition: agt_glob.c:378
void agt_glob_cleanup(void)
Cleanup the Global handler.
Definition: agt_glob.c:357
boolean agt_glob_edit3_enabled(void)
Get the Global EDIT3 callbacks enabled flag.
Definition: agt_glob.c:1131
agt_rpc_method_t * agt_glob_get_rpc_cbfn(obj_template_t *obj)
Find RPC callback function if any for a specific OBJ.
Definition: agt_glob.c:398
status_t agt_glob_register_edit3(agt_edit3_fn_t cbfn)
Register a Global EDIT3 callback.
Definition: agt_glob.c:942
status_t agt_glob_register_get(getcb_fn2_t cbfn)
Register a Global GET2 callback.
Definition: agt_glob.c:1032
agt_action_cb_t * agt_glob_get_action_cbfn(obj_template_t *obj)
Find Action callback function if any for a specific OBJ.
Definition: agt_glob.c:435
status_t agt_glob_init(void)
Initialize the Action handler.
Definition: agt_glob.c:331
boolean agt_glob_has_edit_callback(obj_template_t *obj)
Check there is EDIT2 or EDIT3 callback.
Definition: agt_glob.c:659
void agt_glob_unregister_action(void)
remove all Global callbacks for all phases of action processing
Definition: agt_glob.c:846
boolean agt_glob_has_action_callback(obj_template_t *obj)
Check there is Action callback.
Definition: agt_glob.c:606
status_t agt_glob_register_edit2(agt_cb_fn_t cbfn)
Register a Global EDIT2 callback.
Definition: agt_glob.c:880
status_t agt_glob_register_rpc(agt_rpc_phase_t phase, agt_rpc_method_t cbfn)
add callback for 1 phase of RPC processing
Definition: agt_glob.c:691
void agt_glob_unregister_get(void)
Unregister Global GET2 callbacks.
Definition: agt_glob.c:1083
boolean agt_glob_edit2_enabled(void)
Get the Global EDIT2 callbacks enabled flag.
Definition: agt_glob.c:1103
agt_edit3_fn_t agt_glob_get_edit3_cbfn(obj_template_t *obj)
Find EDIT3 callback function if any for a specific OBJ.
Definition: agt_glob.c:513
status_t(* agt_action_cb_t)(ses_cb_t *scb, rpc_msg_t *msg, xml_node_t *methnode, val_value_t *actionval)
Template for Action server callbacks.
Definition: agt_action.h:128
#define AGT_RPC_NUM_CALLBACK_PHASES
this constant is for the number of callback slots allocated in a 'cbset', and only includes the RPC p...
Definition: agt_rpc.h:89
status_t(* agt_rpc_method_t)(ses_cb_t *scb, rpc_msg_t *msg, xml_node_t *methnode)
Template for RPC server callbacks.
Definition: agt_rpc.h:147
agt_rpc_phase_t
There are 3 different callbacks possible in the server processing chain.
Definition: agt_rpc.h:109
status_t(* getcb_fn2_t)(ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *get2cb)
GET2 PRODUCER FUNCTION.
Definition: getcb.h:676
status_t
global error return code
Definition: status_enum.h:210
NETCONF protocol remote procedure call common definitions.
NETCONF Session Common definitions module.
global error status code enumerations
the Global Control Block stores a set of callbacks for each Global Callback [RPC, Action,...
Definition: agt_glob.h:93
dlq_hdr_t glob_subsysQ
Queue of agt_cb_subsys_t to use instead of obj linked Queue for EDIT2 and EDIT3 Global callbacks.
Definition: agt_glob.h:116
agt_cb_fn_t edit2_cbfn
backptr to Global EDIT2 callback that will be called if there are no any other EDIT2 callbacks regist...
Definition: agt_glob.h:105
agt_edit3_fn_t edit3_cbfn
backptr to Global EDIT3 callback that will be called if there are no any other EDIT3 callbacks regist...
Definition: agt_glob.h:111
One YANG data-def-stmt.
Definition: obj.h:1229
Value Node Basic Support.
XML Utilities.