yumapro  25.10-1
YumaPro SDK
Loading...
Searching...
No Matches
agt_push.h
Go to the documentation of this file.
1#ifdef WITH_YANG_PUSH
2/*
3 * Copyright (c) 2019 - 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_push
13#define _H_agt_push
14
15/* FILE: agt_push.h
16*********************************************************************
17* *
18* P U R P O S E *
19* *
20*********************************************************************/
21
28/*********************************************************************
29* *
30* C H A N G E H I S T O R Y *
31* *
32*********************************************************************
33
34date init comment
35----------------------------------------------------------------------
3623-nov-19 abb Begun
37*/
38
39#ifndef _H_agt_cfg
40#include "agt_cfg.h"
41#endif
42
43#ifndef _H_agt_not
44#include "agt_not.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
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68
82/********************************************************************
83* *
84* C O N S T A N T S *
85* *
86*********************************************************************/
87
88
89
90/********* agt_push_change_t flags fields *************/
91
100#define AGT_PUSH_FL_CREATE bit0
101
103#define AGT_PUSH_FL_DELETE bit1
104
106#define AGT_PUSH_FL_INSERT bit2
107
109#define AGT_PUSH_FL_MOVE bit3
110
112#define AGT_PUSH_FL_REPLACE bit4
113
117#define AGT_PUSH_DEF_INCLUDED_CHANGES 0x1f
118
120#define AGT_PUSH_SET_CREATE_FLAG(F) (F) |= AGT_PUSH_FL_CREATE
121
123#define AGT_PUSH_GET_CREATE_FLAG(F) ((F) & AGT_PUSH_FL_CREATE)
124
126#define AGT_PUSH_SET_DELETE_FLAG(F) (F) |= AGT_PUSH_FL_DELETE
127
129#define AGT_PUSH_GET_DELETE_FLAG(F) ((F) & AGT_PUSH_FL_DELETE)
130
132#define AGT_PUSH_SET_INSERT_FLAG(F) (F) |= AGT_PUSH_FL_INSERT
133
135#define AGT_PUSH_GET_INSERT_FLAG(F) ((F) & AGT_PUSH_FL_INSERT)
136
138#define AGT_PUSH_SET_MOVE_FLAG(F) (F) |= AGT_PUSH_FL_MOVE
139
141#define AGT_PUSH_GET_MOVE_FLAG(F) ((F) & AGT_PUSH_FL_MOVE)
142
144#define AGT_PUSH_SET_REPLACE_FLAG(F) (F) |= AGT_PUSH_FL_REPLACE
145
147#define AGT_PUSH_GET_REPLACE_FLAG(F) ((F) & AGT_PUSH_FL_REPLACE)
148
149
150
151
152/********************************************************************
153* *
154* T Y P E S *
155* *
156*********************************************************************/
157
161typedef enum agt_push_dserr_t_ {
164
167
170
173
176
179
182
185
188
191
194
197
200
203
207
208
209/********************************************************************
210* *
211* F U N C T I O N S *
212* *
213*********************************************************************/
214
215
227extern status_t
228 agt_push_init (obj_template_t *update_obj,
229 obj_template_t *change_obj);
230
231
240extern status_t
241 agt_push_init2 (void);
242
243
250extern void
251 agt_push_cleanup (void);
252
253
286extern status_t
288 ses_cb_t *scb,
289 ncx_nmda_ds_t datastore_id,
290 const xmlChar *selection_filter_ref,
291 const val_value_t *datastore_subtree_filter,
292 const val_value_t *datastore_xpath_filter,
293 const xmlChar *stop_time,
294 const val_value_t *encoding,
295 const val_value_t *parentval,
296 boolean periodic,
297 uint32 period,
298 const xmlChar *anchor_time,
299 boolean on_change,
300 uint32 dampening_period,
301 boolean sync_on_start,
302 uint32 included_changes,
303 agt_not_subid_t *subid,
304 agt_push_dserr_t *errnum,
305 val_value_t **errchild);
306
307
308
338extern status_t
340 ses_cb_t *scb,
341 agt_not_subid_t cur_subid,
342 ncx_nmda_ds_t datastore_id,
343 const xmlChar *selection_filter_ref,
344 const val_value_t *datastore_subtree_filter,
345 const val_value_t *datastore_xpath_filter,
346 const xmlChar *stop_time,
347 boolean periodic,
348 uint32 period,
349 const xmlChar *anchor_time,
350 boolean on_change,
351 boolean dampening_set,
352 uint32 dampening_period,
353 const val_value_t *parentval,
354 agt_push_dserr_t *errnum,
355 val_value_t **errchild);
356
357
358#ifdef WITH_YANG_PUSH2
372extern status_t
373 agt_push_edit_subscription (ses_cb_t *scb,
374 const agt_not_subparms_t *parms,
375 agt_push_dserr_t *errnum);
376
377#endif // WITH_YANG_PUSH2
378
379
386extern status_t
388
389
396extern void
399
400
401
409extern boolean
410 agt_push_is_enabled (void);
411
412
416#ifdef __cplusplus
417} /* end extern 'C' */
418#endif
419
420#endif /* _H_agt_push */
421#endif // WITH_YANG_PUSH
Manage Server configuration edit transactions.
NETCONF Notifications DM module support.
uint32 agt_not_subid_t
subscription-id parameter
Definition: agt_not.h:123
boolean agt_push_is_enabled(void)
Check if agt_push is enabled.
Definition: agt_push.c:4117
void agt_push_config_update(rpc_msg_t *msg, agt_cfg_transaction_t *txcb)
Do a config update for YANG Push subscriptions if needed.
Definition: agt_push.c:4051
status_t agt_push_modify_subscription(ses_cb_t *scb, agt_not_subid_t cur_subid, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, boolean dampening_set, uint32 dampening_period, const val_value_t *parentval, agt_push_dserr_t *errnum, val_value_t **errchild)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3867
agt_push_dserr_t
datastore error parameter numbers Used internally to identify error objects for <rpc-error>
Definition: agt_push.h:161
void agt_push_cleanup(void)
Cleanup the PUSH Module.
Definition: agt_push.c:2746
status_t agt_push_sync_subscription(agt_not_subid_t subid)
Request a sync for the YANG-Push datastore subscription.
Definition: agt_push.c:4021
status_t agt_push_establish_subscription(ses_cb_t *scb, ncx_nmda_ds_t datastore_id, const xmlChar *selection_filter_ref, const val_value_t *datastore_subtree_filter, const val_value_t *datastore_xpath_filter, const xmlChar *stop_time, const val_value_t *encoding, const val_value_t *parentval, boolean periodic, uint32 period, const xmlChar *anchor_time, boolean on_change, uint32 dampening_period, boolean sync_on_start, uint32 included_changes, agt_not_subid_t *subid, agt_push_dserr_t *errnum, val_value_t **errchild)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3780
status_t agt_push_init(obj_template_t *update_obj, obj_template_t *change_obj)
Initialize the PUSH modules.
Definition: agt_push.c:2690
status_t agt_push_init2(void)
PUSH init phase 2.
Definition: agt_push.c:2724
@ AGT_PUSH_DSERR_DAMPENING_PERIOD
dampening-period parameter
Definition: agt_push.h:196
@ AGT_PUSH_DSERR_FILTER_REF
filter ref parameter
Definition: agt_push.h:169
@ AGT_PUSH_DSERR_ANCHOR_TIME
anchor-time parameter
Definition: agt_push.h:190
@ AGT_PUSH_DSERR_ENCODING
encoding parameter
Definition: agt_push.h:181
@ AGT_PUSH_DSERR_SUBTREE_FILTER
subtree filter parameter
Definition: agt_push.h:172
@ AGT_PUSH_DSERR_DATASTORE
datastore parameter
Definition: agt_push.h:166
@ AGT_PUSH_DSERR_ID
subscription ID parameter
Definition: agt_push.h:205
@ AGT_PUSH_DSERR_EXCLUDED_CHANGE
excluded-change parameter
Definition: agt_push.h:202
@ AGT_PUSH_DSERR_XPATH_FILTER
xpath filter parameter
Definition: agt_push.h:175
@ AGT_PUSH_DSERR_PERIOD
period parameter
Definition: agt_push.h:187
@ AGT_PUSH_DSERR_STOP_TIME
stop-time parameter
Definition: agt_push.h:178
@ AGT_PUSH_DSERR_ON_CHANGE
on-change parameter
Definition: agt_push.h:193
@ AGT_PUSH_DSERR_NONE
not set
Definition: agt_push.h:163
@ AGT_PUSH_DSERR_PERIODIC
periodic parameter
Definition: agt_push.h:184
@ AGT_PUSH_DSERR_SYNC_ON_START
sync-on-start parameter
Definition: agt_push.h:199
status_t
global error return code
Definition: status_enum.h:219
ncx_nmda_ds_t
internal enumerations for standard NMDA datastores
Definition: ncxtypes.h:1612
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
subscription parms parameter block used by various subscribe APIs each API will ignore unused paramet...
Definition: agt_not.h:600
One YANG data-def-stmt.
Definition: obj.h:1284
NETCONF Server and Client RPC Request/Reply Message Header.
Definition: rpc.h:185
Session Control Block.
Definition: ses.h:759
one value to match one type
Definition: val.h:939
Value Node Basic Support.