sysrepo  3.0.0
YANG-based system repository for all-around configuration management.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
plugins_notification.h
Go to the documentation of this file.
1 
17 #ifndef _SYSREPO_PLUGINS_NOTIFICATION_H
18 #define _SYSREPO_PLUGINS_NOTIFICATION_H
19 
20 #include <stdint.h>
21 #include <sys/types.h>
22 
23 #include <libyang/libyang.h>
24 
25 #include "sysrepo_types.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
32 // Notification Plugin API
34 
43 #define SRPLG_NTF_API_VERSION 3
44 
54 typedef sr_error_info_t *(*srntf_enable)(const struct lys_module *mod);
55 
65 typedef sr_error_info_t *(*srntf_disable)(const struct lys_module *mod);
66 
76 typedef sr_error_info_t *(*srntf_store)(const struct lys_module *mod, const struct lyd_node *notif,
77  const struct timespec *notif_ts);
78 
92 typedef sr_error_info_t *(*srntf_replay_next)(const struct lys_module *mod, const struct timespec *start,
93  const struct timespec *stop, struct lyd_node **notif, struct timespec *notif_ts, void *state);
94 
105 typedef sr_error_info_t *(*srntf_earliest_get)(const struct lys_module *mod, struct timespec *ts);
106 
117 typedef sr_error_info_t *(*srntf_access_set)(const struct lys_module *mod, const char *owner, const char *group,
118  mode_t perm);
119 
130 typedef sr_error_info_t *(*srntf_access_get)(const struct lys_module *mod, char **owner, char **group, mode_t *perm);
131 
141 typedef sr_error_info_t *(*srntf_access_check)(const struct lys_module *mod, int *read, int *write);
142 
146 struct srplg_ntf_s {
147  const char *name;
156 };
157 
164 #define SRPLG_NOTIFICATION \
165  uint32_t srpntf_apiver__ = SRPLG_NTF_API_VERSION; \
166  const struct srplg_ntf_s srpntf__
167 
170 #ifdef __cplusplus
171 }
172 #endif
173 
174 #endif /* _SYSREPO_PLUGINS_NOTIFICATION_H */
srntf_enable enable_cb
srntf_access_set access_set_cb
sr_error_info_t *(* srntf_replay_next)(const struct lys_module *mod, const struct timespec *start, const struct timespec *stop, struct lyd_node **notif, struct timespec *notif_ts, void *state)
Replay the next notification of a module.
sr_error_info_t *(* srntf_store)(const struct lys_module *mod, const struct lyd_node *notif, const struct timespec *notif_ts)
Store a notification for replay.
srntf_access_get access_get_cb
sr_error_info_t *(* srntf_earliest_get)(const struct lys_module *mod, struct timespec *ts)
Get the timestamp of the earliest stored notification of the module.
srntf_access_check access_check_cb
sr_error_info_t *(* srntf_access_check)(const struct lys_module *mod, int *read, int *write)
Check whether the current user has the required access to notification data.
public sysrepo types header
sr_error_info_t *(* srntf_enable)(const struct lys_module *mod)
Initialize notification storage for a specific module.
Detailed sysrepo session error information.
sr_error_info_t *(* srntf_access_set)(const struct lys_module *mod, const char *owner, const char *group, mode_t perm)
Set access permissions for notification data of a module.
srntf_store store_cb
Notification plugin structure.
srntf_earliest_get earliest_get_cb
srntf_replay_next replay_next_cb
srntf_disable disable_cb
const char * name
sr_error_info_t *(* srntf_access_get)(const struct lys_module *mod, char **owner, char **group, mode_t *perm)
Get access permissions for notification data of a module.
sr_error_info_t *(* srntf_disable)(const struct lys_module *mod)
Destroy notification storage of a specific module.