sysrepo 3.6.11
YANG-based system repository for all-around configuration management.
Loading...
Searching...
No Matches
plugins_notification.h
Go to the documentation of this file.
1
16
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
28extern "C" {
29#endif
30
32// Notification Plugin API
34
39
43#define SRPLG_NTF_API_VERSION 4
44
54typedef sr_error_info_t *(*srntf_enable)(const struct lys_module *mod);
55
65typedef sr_error_info_t *(*srntf_disable)(const struct lys_module *mod);
66
76typedef sr_error_info_t *(*srntf_store)(const struct lys_module *mod, const struct lyd_node *notif,
77 const struct timespec *notif_ts);
78
92typedef 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
105typedef sr_error_info_t *(*srntf_earliest_get)(const struct lys_module *mod, struct timespec *ts);
106
117typedef sr_error_info_t *(*srntf_access_set)(const struct lys_module *mod, const char *owner, const char *group,
118 mode_t perm);
119
130typedef sr_error_info_t *(*srntf_access_get)(const struct lys_module *mod, char **owner, char **group, mode_t *perm);
131
141typedef sr_error_info_t *(*srntf_access_check)(const struct lys_module *mod, int *read, int *write);
142
148typedef void (*srntf_destroy)(const struct lys_module *mod);
149
165
172#define SRPLG_NOTIFICATION \
173 uint32_t srpntf_apiver__ = SRPLG_NTF_API_VERSION; \
174 const struct srplg_ntf_s srpntf__
175
177
178#ifdef __cplusplus
179}
180#endif
181
182#endif /* _SYSREPO_PLUGINS_NOTIFICATION_H */
srntf_earliest_get earliest_get_cb
srntf_disable disable_cb
srntf_replay_next replay_next_cb
srntf_destroy destroy_cb
srntf_access_get access_get_cb
srntf_access_check access_check_cb
srntf_enable enable_cb
srntf_access_set access_set_cb
sr_error_info_t *(* srntf_disable)(const struct lys_module *mod)
Destroy notification storage of a specific module.
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.
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.
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.
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_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.
void(* srntf_destroy)(const struct lys_module *mod)
Destroy (delete) all stored notifications of a module.
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_enable)(const struct lys_module *mod)
Initialize notification storage for a specific module.
Notification plugin structure.
public sysrepo types header
Detailed sysrepo session error information.