sysrepo  3.6.8
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 4
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 
148 typedef void (*srntf_destroy)(const struct lys_module *mod);
149 
153 struct srplg_ntf_s {
154  const char *name;
164 };
165 
172 #define SRPLG_NOTIFICATION \
173  uint32_t srpntf_apiver__ = SRPLG_NTF_API_VERSION; \
174  const struct srplg_ntf_s srpntf__
175 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #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
void(* srntf_destroy)(const struct lys_module *mod)
Destroy (delete) all stored notifications of a module.
srntf_destroy destroy_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.