39 #ifndef NC_DATASTORE_CUSTOM_H
40 #define NC_DATASTORE_CUSTOM_H
108 int (*
lock)(
void *data,
NC_DATASTORE target,
const char* session_id,
struct nc_err** error);
158 char *(*getconfig)(
void *data,
NC_DATASTORE target,
struct nc_err **error);
Public callbacks for the data store.
Definition: datastore_custom.h:64
NC_EDIT_ERROPT_TYPE
Enumeration of edit-config's <error-option> element values.
Definition: netconf.h:308
NC_EDIT_DEFOP_TYPE
Enumeration of edit-config's <default-operation> element values.
Definition: netconf.h:296
NC_DATASTORE
Enumeration of the supported types of datastores defined by NETCONF.
Definition: netconf.h:260
int(* lock)(void *data, NC_DATASTORE target, const char *session_id, struct nc_err **error)
Lock the data store from other processes.
Definition: datastore_custom.h:108
int(* rollback)(void *data)
Revert the last change.
Definition: datastore_custom.h:98
struct nc_msg nc_rpc
rpc message.
Definition: netconf.h:56
int(* deleteconfig)(void *data, NC_DATASTORE target, struct nc_err **error)
Make the given data source empty.
Definition: datastore_custom.h:178
int(* copyconfig)(void *data, NC_DATASTORE target, NC_DATASTORE source, char *config, struct nc_err **error)
Copy config from one data store to another.
Definition: datastore_custom.h:169
int(* editconfig)(void *data, const nc_rpc *rpc, NC_DATASTORE target, const char *config, NC_EDIT_DEFOP_TYPE defop, NC_EDIT_ERROPT_TYPE errop, struct nc_err **error)
Perform the editconfig operation.
Definition: datastore_custom.h:192
void ncds_custom_set_data(struct ncds_ds *datastore, void *custom_data, const struct ncds_custom_funcs *callbacks)
Set custom data stored in custom datastore.
int(* init)(void *data)
Called before the data store is used.
Definition: datastore_custom.h:74
void(* free)(void *data)
Called after the last use of the data store.
Definition: datastore_custom.h:84
int(* is_locked)(void *data, NC_DATASTORE target, const char **session_id, const char **datetime)
Is datastore currently locked?
Definition: datastore_custom.h:146
int(* was_changed)(void *data)
Was the content of data store changed?
Definition: datastore_custom.h:91
int(* unlock)(void *data, NC_DATASTORE target, const char *session_id, struct nc_err **error)
The counter-part of lock.
Definition: datastore_custom.h:121