17 #ifndef _SYSREPO_TYPES_H
18 #define _SYSREPO_TYPES_H
132 #define SR_DS_COUNT 4
137 #define SR_DS_READ_COUNT 5
142 #define SR_MOD_DS_NOTIF 5
147 #define SR_MOD_DS_PLUGIN_COUNT 6
179 const char *schema_path;
180 const char *schema_yang;
312 #define SR_OPER_MASK 0xFFFF
551 sr_event_t event, uint32_t request_id,
void *private_data);
579 const size_t input_cnt,
sr_event_t event, uint32_t request_id,
sr_val_t **output,
size_t *output_cnt,
598 sr_event_t event, uint32_t request_id,
struct lyd_node *output,
void *private_data);
641 const char *xpath,
const sr_val_t *values,
const size_t values_cnt,
struct timespec *timestamp,
void *private_data);
656 const struct lyd_node *notif,
struct timespec *timestamp,
void *private_data);
691 const char *request_xpath, uint32_t request_id,
struct lyd_node **parent,
void *private_data);
Instead of removing any previous existing matching data before getting them from an operational subsc...
The subscriber will be called before any other subscribers for the particular module with an addition...
If you call getters (sr_get_data()) in the module change callback for data from other modules than th...
uint32_t sr_get_options_t
Options overriding default get handling by sr_get_data call, it is supposed to be a bitmask sr_get_op...
sr_datastore_t
Datastores that sysrepo supports. To change which datastore a session operates on, use sr_session_switch_ds.
sr_event_t
Type of the event that has occurred (passed to application callbacks).
uint32_t sr_edit_options_t
Options overriding default behavior of data manipulation calls, it is supposed to be bitwise OR-ed va...
sr_val_type_t
Possible types of a data element stored in the sysrepo datastore.
On every data retrieval additionally compute diff with the previous data and report the changes to an...
Normally, XPath filter is applied by the listener (subscriber) for counting its statistics of filtere...
sr_error_t
Sysrepo error codes.
sr_error_info_err_t * err
Information about a module to be installed.
sr_log_level_t
Log levels used to determine if message of certain severity should be printed.
Default behavior of the subscription. In case of sr_module_change_subscribe call it means that: ...
void(* sr_event_notif_tree_cb)(sr_session_ctx_t *session, uint32_t sub_id, const sr_ev_notif_type_t notif_type, const struct lyd_node *notif, struct timespec *timestamp, void *private_data)
Callback to be called for the delivery of a notification. Data are represented as libyang subtrees...
void(* sr_event_notif_cb)(sr_session_ctx_t *session, uint32_t sub_id, const sr_ev_notif_type_t notif_type, const char *xpath, const sr_val_t *values, const size_t values_cnt, struct timespec *timestamp, void *private_data)
Callback to be called for the delivery of a notification. Data are represented as sr_val_t structures...
sr_subscr_flag_t
Flags used to override default handling of subscriptions.
struct sr_subscription_ctx_s sr_subscription_ctx_t
Sysrepo subscription context returned from sr_*_subscribe calls, it is supposed to be released by the...
Custom datastore implementation config for each datastore and notifications of a module.
The subscriber wants to be notified about the current configuration at the moment of subscribing...
uint32_t sr_conn_options_t
Options overriding default connection handling by sr_connect call, it is supposed to be bitwise OR-ed...
Detailed sysrepo session error information.
Suspend the default handler thread before adding the subscription if it is running. In case of the first subscription, start the handler thread suspended. Meaning any events will not be handled until sr_subscription_thread_resume() is called.
int(* sr_rpc_cb)(sr_session_ctx_t *session, uint32_t sub_id, const char *xpath, const sr_val_t *input, const size_t input_cnt, sr_event_t event, uint32_t request_id, sr_val_t **output, size_t *output_cnt, void *private_data)
Callback to be called for the delivery of an RPC/action. Data are represented as sr_val_t structures...
uint32_t sr_cid_t
Connection ID.
struct sr_session_ctx_s sr_session_ctx_t
Sysrepo session on a connection.
int(* sr_module_change_cb)(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data)
Callback to be called on the event of changing datastore content of the specified module...
A single, detailed error message. Used in sr_error_info_t.
struct sr_conn_ctx_s sr_conn_ctx_t
Sysrepo connection.
Data of an element (if applicable), properly set according to the type.
sr_get_oper_flag_t
Flags used to override default data get behaviour on SR_DS_OPERATIONAL.
#define SR_MOD_DS_PLUGIN_COUNT
Count of all module plugin types (datastores and notifications).
struct sr_change_iter_s sr_change_iter_t
Iterator used for retrieval of a changeset using sr_get_changes_iter call.
int(* sr_rpc_tree_cb)(sr_session_ctx_t *session, uint32_t sub_id, const char *op_path, const struct lyd_node *input, sr_event_t event, uint32_t request_id, struct lyd_node *output, void *private_data)
Callback to be called for the delivery of an RPC/action. Data are represented as libyang subtrees...
sr_edit_flag_t
Flags used to override default behavior of data manipulation calls.
sr_change_oper_t
Type of the operation made on an item, used by changeset retrieval in sr_get_change_next.
sr_ev_notif_type_t
Type of the notification passed to the sr_event_notif_cb and sr_event_notif_tree_cb callbacks...
void(* sr_log_cb)(sr_log_level_t level, const char *message)
Sets callback that will be called when a log entry would be populated.
int(* srp_init_cb_t)(sr_session_ctx_t *session, void **private_data)
Sysrepo plugin initialization callback.
The subscriber does not support verification of the changes and wants to be notified only after the c...
int(* sr_oper_get_items_cb)(sr_session_ctx_t *session, uint32_t sub_id, const char *module_name, const char *path, const char *request_xpath, uint32_t request_id, struct lyd_node **parent, void *private_data)
Callback to be called when operational data at the selected xpath are requested. Data are represented...
sr_conn_flag_t
Flags used to override default connection handling by sr_connect call.
There will be no thread created for handling this subscription meaning no event will be processed! Us...
The subscriber is not the "owner" of the subscribed data tree, just a passive watcher for changes...
uint32_t sr_subscr_options_t
Options overriding default behavior of subscriptions, it is supposed to be a bitwise OR-ed value of a...
sr_move_position_t
Options for specifying move direction of sr_move_item call.
void(* srp_cleanup_cb_t)(sr_session_ctx_t *session, void *private_data)
Sysrepo plugin cleanup callback.
Structure that safely wraps libyang data and prevents unexpected context changes. ...
const sr_conn_ctx_t * conn
sr_get_flag_t
Flags used to override default data get behavior.
Structure that contains value of an data element stored in the sysrepo datastore. ...