yumapro  24.10-2
YumaPro SDK
Loading...
Searching...
No Matches
agt_val_silcall.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 - 2012, Andy Bierman, All Rights Reserved.
3 * Copyright (c) 2012 - 2023, 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_val_silcall
13#define _H_agt_val_silcall
14
15/* FILE: agt_val_silcall.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
29/*********************************************************************
30* *
31* C H A N G E H I S T O R Y *
32* *
33*********************************************************************
34
35date init comment
36----------------------------------------------------------------------
3719-dec-15 abb Begun; split from agt_val.c
38*/
39
40#ifndef _H_agt_cfg
41#include "agt_cfg.h"
42#endif
43
44#ifndef _H_cfg
45#include "cfg.h"
46#endif
47
48#ifndef _H_rpc
49#include "rpc.h"
50#endif
51
52#ifndef _H_ses
53#include "ses.h"
54#endif
55
56#ifndef _H_status_enum
57#include "status_enum.h"
58#endif
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64/********************************************************************
65* *
66* C O N S T A N T S *
67* *
68*********************************************************************/
69
70/********************************************************************
71* *
72* T Y P E S *
73* *
74*********************************************************************/
75
76/********************************************************************
77* *
78* F U N C T I O N S *
79* *
80*********************************************************************/
81
82
109extern status_t
111 rpc_msg_t *msg,
112 cfg_template_t *target,
113 op_editop_t editop);
114
115
127extern status_t
129 ses_cb_t *scb,
130 rpc_msg_t *msg,
131 cfg_template_t *target,
132 op_editop_t editop);
133
134
144extern boolean
146
147
170extern status_t
172 op_editop_t editop,
173 ses_cb_t *scb,
174 rpc_msg_t *msg,
175 val_value_t *newnode,
176 val_value_t *curnode,
177 boolean lookparent,
178 boolean indelete,
179 boolean in_reverse_delete,
180 agt_cfg_undo_rec_t *undo);
181
182
215extern status_t
217 op_editop_t editop,
218 ses_cb_t *scb,
219 rpc_msg_t *msg,
220 val_value_t *newnode,
221 val_value_t *curnode,
222 boolean lookparent,
223 boolean indelete,
224 boolean in_reverse_delete,
225 agt_cfg_undo_rec_t *undo,
227
228
245extern status_t
247 ses_cb_t *scb,
248 rpc_msg_t *msg,
249 op_editop_t editop,
250 val_value_t *newval,
251 val_value_t *curval,
252 boolean lookparent,
253 boolean indelete,
254 agt_cfg_edit_action_t edit_action);
255
256
268extern status_t
270 rpc_msg_t *msg,
271 agt_cbtyp_t cbtyp,
272 op_editop_t editop,
273 val_value_t *newval,
274 val_value_t *curval);
275
276
277#ifdef WITH_YCONTROL
292extern status_t
295 ses_cb_t *scb,
296 rpc_msg_t *msg,
297 agt_cbtyp_t cbtyp,
298 boolean is_reverse_edit);
299#endif // WITH_YCONTROL
300
301
317extern status_t
319 ses_cb_t *scb,
320 rpc_msg_t *msg,
321 agt_cfg_undo_rec_t *undo);
322
323
367extern boolean
369
370
412extern boolean
414
415
426extern status_t
428 op_editop_t editop,
429 val_value_t *newnode,
430 val_value_t *curnode);
431
432
436#ifdef __cplusplus
437} /* end extern 'C' */
438#endif
439
440#endif /* _H_agt_val_unload */
Manage Server configuration edit transactions.
@ brief NCX configuration database manager
boolean agt_val_silcall_deepest_and_last(agt_cfg_nested_silcall_t *silcall)
Check if the current nested SIL callback is at the deepest level for the current edit and that it is ...
Definition: agt_val_silcall.c:4161
status_t agt_val_silcall_setup(agt_cbtyp_t cbtyp, op_editop_t editop, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *newnode, val_value_t *curnode, boolean lookparent, boolean indelete, boolean in_reverse_delete, agt_cfg_undo_rec_t *undo)
Find the correct user callback function and invoke it.
Definition: agt_val_silcall.c:3001
status_t agt_val_silcall_run_validate_callbacks(ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, op_editop_t editop)
Run the validate SIL callbacks for the transaction in progress.
Definition: agt_val_silcall.c:2573
status_t agt_val_silcall_reverse_edit(agt_cfg_undo_rec_t *undo, ses_cb_t *scb, rpc_msg_t *msg, op_editop_t editop, val_value_t *newval, val_value_t *curval, boolean lookparent, boolean indelete, agt_cfg_edit_action_t edit_action)
Attempt SIL callbacks for a reverse edit.
Definition: agt_val_silcall.c:3535
status_t agt_val_silcall_invoke_raw(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
Call a SIL callback directly; used in rollback.
Definition: agt_val_silcall.c:3722
status_t agt_val_silcall_check_order_hook(agt_cfg_transaction_t *txcb, op_editop_t editop, val_value_t *newnode, val_value_t *curnode)
Check if a Set-Order-Hook callback is needed for the current edit; only checked for the list actually...
Definition: agt_val_silcall.c:4217
status_t agt_val_silcall_call_sil_callbacks(agt_cbtyp_t cbtyp, ses_cb_t *scb, rpc_msg_t *msg, cfg_template_t *target, op_editop_t editop)
Invoke all the mode (AGT_CB_APPLY) callbacks for a source and target and write operation.
Definition: agt_val_silcall.c:2715
boolean agt_val_silcall_is_deepest(rpc_msg_t *msg)
Check if the current nested SIL callback is at the deepest level for the current edit.
Definition: agt_val_silcall.c:4097
status_t agt_val_silcall_setup_ex(agt_cbtyp_t cbtyp, op_editop_t editop, ses_cb_t *scb, rpc_msg_t *msg, val_value_t *newnode, val_value_t *curnode, boolean lookparent, boolean indelete, boolean in_reverse_delete, agt_cfg_undo_rec_t *undo, agt_cfg_transaction_t *txcb)
Find the correct user callback function and invoke it Extended.
Definition: agt_val_silcall.c:4347
status_t agt_val_silcall_invoke(agt_cbtyp_t cbtyp, ses_cb_t *scb, rpc_msg_t *msg, agt_cfg_undo_rec_t *undo)
Invoke the callbacks recorded in an undo record.
Definition: agt_val_silcall.c:3994
boolean agt_val_silcall_has_subsys_callbacks(agt_cfg_transaction_t *txcb)
Check if the transaction needs subsystem callbacks.
Definition: agt_val_silcall.c:2949
status_t agt_val_silcall_handle_remote_transaction(agt_cfg_transaction_t *txcb, ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, boolean is_reverse_edit)
Start a distributed transaction with the agt_sil module This function will not return until the entir...
Definition: agt_val_silcall.c:3785
agt_cfg_edit_action_t
classify the config edit action type
Definition: agt_cfg.h:175
agt_cbtyp_t
enumeration of the different server EDIT callback types These are used as array indices so there is n...
Definition: agt.h:726
op_editop_t
NETCONF edit-config operation types.
Definition: op.h:122
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
struct of data for 1 nested SIL callback within 1 undo.
Definition: agt_cfg.h:487
Transaction Control Block.
Definition: agt_cfg.h:235
struct of params to undo an edit operation.
Definition: agt_cfg.h:559
struct representing 1 configuration database
Definition: cfg.h:229
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:181
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912