yumapro  24.10-2
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
282extern status_t
284 ses_cb_t *scb,
285 ncx_nmda_ds_t datastore_id,
286 const xmlChar *selection_filter_ref,
287 const val_value_t *datastore_subtree_filter,
288 const val_value_t *datastore_xpath_filter,
289 const xmlChar *stop_time,
290 val_value_t *encoding,
291 boolean periodic,
292 uint32 period,
293 const xmlChar *anchor_time,
294 boolean on_change,
295 uint32 dampening_period,
296 boolean sync_on_start,
297 uint32 included_changes,
298 agt_not_subid_t *subid,
299 agt_push_dserr_t *errnum);
300
301
302
328extern status_t
330 ses_cb_t *scb,
331 agt_not_subid_t cur_subid,
332 ncx_nmda_ds_t datastore_id,
333 const xmlChar *selection_filter_ref,
334 const val_value_t *datastore_subtree_filter,
335 const val_value_t *datastore_xpath_filter,
336 const xmlChar *stop_time,
337 boolean periodic,
338 uint32 period,
339 const xmlChar *anchor_time,
340 boolean on_change,
341 boolean dampening_set,
342 uint32 dampening_period,
343 agt_push_dserr_t *errnum);
344
345
352extern status_t
354
355
362extern void
365
366
367
375extern boolean
376 agt_push_is_enabled (void);
377
378
382#ifdef __cplusplus
383} /* end extern 'C' */
384#endif
385
386#endif /* _H_agt_push */
387#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:3271
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:3205
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:2364
status_t agt_push_sync_subscription(agt_not_subid_t subid)
Request a sync for the YANG-Push datastore subscription.
Definition: agt_push.c:3175
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, val_value_t *encoding, 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)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3047
status_t agt_push_init(obj_template_t *update_obj, obj_template_t *change_obj)
Initialize the PUSH modules.
Definition: agt_push.c:2312
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, agt_push_dserr_t *errnum)
Set the YANG-Push datastore parameters and start a YANG push subscription.
Definition: agt_push.c:3120
status_t agt_push_init2(void)
PUSH init phase 2.
Definition: agt_push.c:2342
@ 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:210
ncx_nmda_ds_t
internal enumerations for standard NMDA datastores
Definition: ncxtypes.h:1631
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
One YANG data-def-stmt.
Definition: obj.h:1229
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
Value Node Basic Support.