yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
agt_editcb.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2016 - 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_editcb
12#define _H_agt_editcb
13
14/* FILE: agt_editcb.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-feb-24 am Begun
36
37*/
38
39#include "agt_cfg.h"
40
41#ifndef _H_agt_rpc
42#include "agt_rpc.h"
43#endif
44
45#ifndef _H_rpc
46#include "rpc.h"
47#endif
48
49#ifndef _H_ses
50#include "ses.h"
51#endif
52
53#ifndef _H_status_enum
54#include "status_enum.h"
55#endif
56
57#ifndef _H_val
58#include "val.h"
59#endif
60
61#ifndef _H_xml_util
62#include "xml_util.h"
63#endif
64
65#ifdef __cplusplus
66extern "C" {
67#endif
68
69
70/********************************************************************
71* *
72* T Y P E S *
73* *
74*********************************************************************/
75
76
100typedef struct agt_editcb_t_ {
101
105
109
113
121
133
139
145
150
152 const xmlChar *modname;
153
156
158 boolean isvalidate;
159
165
167 boolean isrunning;
168
170 const xmlChar *user_id;
171
173 const xmlChar *client_addr;
174
176 const xmlChar *target;
177
179 const xmlChar *txid_str;
180
184 xmlChar *instance_id;
185
188
189} YPACK agt_editcb_t;
190
191
203typedef status_t
204 (*agt_edit3_fn_t) (agt_editcb_t *editcb);
205
206
207
211/********************************************************************
212* *
213* F U N C T I O N S *
214* *
215*********************************************************************/
216
227extern val_value_t *
229 val_value_t *curval,
230 op_editop_t editop,
231 status_t *res);
232
233
239extern void
241
242
258extern agt_editcb_t *
260 rpc_msg_t *msg,
261 agt_cbtyp_t cbtyp,
262 op_editop_t editop,
263 val_value_t *newval,
264 val_value_t *curval);
265
266
267
268#ifdef __cplusplus
269} /* end extern 'C' */
270#endif
271
272#endif /* _H_agt_editcb */
Manage Server configuration edit transactions.
agt_editcb_t * agt_editcb_make_new_cb(ses_cb_t *scb, rpc_msg_t *msg, agt_cbtyp_t cbtyp, op_editop_t editop, val_value_t *newval, val_value_t *curval)
Create Edit Control Block for the EDIT3 callback.
Definition: agt_editcb.c:302
val_value_t * agt_editcb_make_update_value(val_value_t *newval, val_value_t *curval, op_editop_t editop, status_t *res)
make a combine value of newval and curval
Definition: agt_editcb.c:188
void agt_editcb_free_cb(agt_editcb_t *editcb)
Clean and free an agt_editcb_t.
Definition: agt_editcb.c:262
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:204
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
Transaction Control Block.
Definition: agt_cfg.h:235
EDIT Control Block used to store all the pointers for the EDIT3 callbacks.
Definition: agt_editcb.h:100
obj_template_t * obj
Object of a a current node in the callback.
Definition: agt_editcb.h:155
val_value_t * update
Update value contains all new values and the current values from the datastore.
Definition: agt_editcb.h:149
xmlChar * instance_id
instance-identifier path string for target object with all the keys
Definition: agt_editcb.h:184
agt_cbtyp_t cbtyp
Callback type - reason for the callback.
Definition: agt_editcb.h:120
const xmlChar * user_id
user-id backptr from the transaction
Definition: agt_editcb.h:170
op_editop_t editop
Callback editop - the parent edit-config operation type, which is also used for all other callbacks t...
Definition: agt_editcb.h:132
boolean in_delete_children_first
This SIL callback is for a nested child and the sil-delete-children-first is active; False if not app...
Definition: agt_editcb.h:164
boolean isrunning
TRUE if this Transaction is for the the running datastore.
Definition: agt_editcb.h:167
const xmlChar * client_addr
client address backptr from the transaction
Definition: agt_editcb.h:173
ses_cb_t * scb
Session control block making the request.
Definition: agt_editcb.h:104
val_value_t * newval
Container object holding the proposed changes to apply to the current config, depending on the editop...
Definition: agt_editcb.h:138
agt_cfg_transaction_t * txcb
Transaction control block in progress.
Definition: agt_editcb.h:112
boolean silsa_editcb
Indicate that this is a SIL-SA editcb or not.
Definition: agt_editcb.h:187
val_value_t * curval
Current container values from the <running> or <candidate> configuration, if any.
Definition: agt_editcb.h:144
const xmlChar * modname
Name of a module the current callback is invoked for.
Definition: agt_editcb.h:152
const xmlChar * txid_str
transaction ID from the transaction
Definition: agt_editcb.h:179
boolean isvalidate
Transaction is a <validate> operation.
Definition: agt_editcb.h:158
rpc_msg_t * msg
Incoming rpc_msg_t in progress.
Definition: agt_editcb.h:108
const xmlChar * target
datastore target backptr from the transaction
Definition: agt_editcb.h:176
One YANG data-def-stmt.
Definition: obj.h:1229
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:573
one value to match one type
Definition: val.h:912
Value Node Basic Support.
XML Utilities.