sysrepo
2.11.7
YANG-based system repository for all-around configuration management.
|
Data Structures | |
struct | srplg_ntf_s |
Notification plugin structure. More... | |
Macros | |
#define | SRPLG_NOTIFICATION |
Macro to define datastore plugin information in external plugins. More... | |
#define | SRPLG_NTF_API_VERSION 3 |
Notification plugin API version. More... | |
Typedefs | |
typedef 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. More... | |
typedef 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. More... | |
typedef 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. More... | |
typedef sr_error_info_t *(* | srntf_disable )(const struct lys_module *mod) |
Destroy notification storage of a specific module. More... | |
typedef 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. More... | |
typedef sr_error_info_t *(* | srntf_enable )(const struct lys_module *mod) |
Initialize notification storage for a specific module. More... | |
typedef 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. More... | |
typedef 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. More... | |
struct srplg_ntf_s |
Notification plugin structure.
Definition at line 146 of file plugins_notification.h.
Data Fields | ||
---|---|---|
srntf_access_check | access_check_cb |
callback for checking user access to notificaion data |
srntf_access_get | access_get_cb |
callback got getting access rights for notification data |
srntf_access_set | access_set_cb |
callback for setting access rights for notification data |
srntf_disable | disable_cb |
disable notification storage of a module |
srntf_earliest_get | earliest_get_cb |
get the timestamp of the earliest stored notification |
srntf_enable | enable_cb |
enable notification storage of a module |
const char * | name |
name of the notification implementation plugin by which it is referenced |
srntf_replay_next | replay_next_cb |
replay next notification in order |
srntf_store | store_cb |
store a notification for replay |
#define SRPLG_NOTIFICATION |
Macro to define datastore plugin information in external plugins.
Use as follows: SRPLG_NOTIFICATION = {<filled information of srplg_ntf_s>};
Definition at line 164 of file plugins_notification.h.
#define SRPLG_NTF_API_VERSION 3 |
Notification plugin API version.
Definition at line 43 of file plugins_notification.h.
typedef 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.
[in] | mod | Specific module. |
[out] | read | Optional, whether the read permission was granted or not. |
[out] | write | Optional, whether the write permission was granted or not. |
Definition at line 141 of file plugins_notification.h.
typedef 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.
[in] | mod | Specific module. |
[out] | owner | Optional, owner of the module data. |
[out] | group | Optional, group of the module data. |
[out] | perm | Optional, permissions of the module data. |
Definition at line 130 of file plugins_notification.h.
typedef 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.
[in] | mod | Specific module. |
[in] | owner | Optional, new owner of the module notification data. |
[in] | group | Optional, new group of the module notification data. |
[in] | perm | Optional not 0, new permissions of the module notification data. |
Definition at line 117 of file plugins_notification.h.
typedef sr_error_info_t*(* srntf_disable)(const struct lys_module *mod) |
Destroy notification storage of a specific module.
Stored notifications may be kept and usable once srntf_enable is called again for the module.
[in] | mod | Specific module. |
Definition at line 65 of file plugins_notification.h.
typedef 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.
Is called even before srntf_enable().
[in] | mod | Specific module. |
[out] | ts | Timestamp of the earliest notification, zeroed if there are none. |
Definition at line 105 of file plugins_notification.h.
typedef sr_error_info_t*(* srntf_enable)(const struct lys_module *mod) |
Initialize notification storage for a specific module.
Install is called once for every module on enabled replay.
[in] | mod | Specific module. |
Definition at line 54 of file plugins_notification.h.
typedef 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.
[in] | mod | Specific module. |
[in] | start | Notifications with earlier timestamp cannot be returned. |
[in] | stop | Notifications with equal or later timestamp cannot be returned. |
[out] | notif | Notification data tree. |
[out] | notif_ts | Notification timestamp. |
[in,out] | state | Arbitrary state to keep track of returned notifications, is NULL on first call. When NULL on return, there are no more notifications. |
state
was freed. Definition at line 92 of file plugins_notification.h.
typedef 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.
[in] | mod | Specific module. |
[in] | notif | Notification data tree. |
[in] | notif_ts | Notification timestamp. |
Definition at line 76 of file plugins_notification.h.