17 #ifndef _SYSREPO_PLUGINS_NOTIFICATION_H
18 #define _SYSREPO_PLUGINS_NOTIFICATION_H
21 #include <sys/types.h>
23 #include <libyang/libyang.h>
43 #define SRPLG_NTF_API_VERSION 3
76 typedef sr_error_info_t *(*srntf_store)(
const struct lys_module *mod,
const struct lyd_node *notif,
77 const struct timespec *notif_ts);
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);
105 typedef sr_error_info_t *(*srntf_earliest_get)(
const struct lys_module *mod,
struct timespec *ts);
117 typedef sr_error_info_t *(*srntf_access_set)(
const struct lys_module *mod,
const char *owner,
const char *group,
130 typedef sr_error_info_t *(*srntf_access_get)(
const struct lys_module *mod,
char **owner,
char **group, mode_t *perm);
141 typedef sr_error_info_t *(*srntf_access_check)(
const struct lys_module *mod,
int *read,
int *write);
164 #define SRPLG_NOTIFICATION \
165 uint32_t srpntf_apiver__ = SRPLG_NTF_API_VERSION; \
166 const struct srplg_ntf_s srpntf__
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.
Notification plugin structure.
srntf_earliest_get earliest_get_cb
srntf_replay_next replay_next_cb
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.