diff options
Diffstat (limited to 'src/plugins/sc_plugins.h')
-rw-r--r-- | src/plugins/sc_plugins.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/sc_plugins.h b/src/plugins/sc_plugins.h index 4a784fb..681be6b 100644 --- a/src/plugins/sc_plugins.h +++ b/src/plugins/sc_plugins.h @@ -20,6 +20,23 @@ #include <sysrepo/values.h> #include <sysrepo/plugins.h> +#include "sc_init.h" +#include "sys_util.h" + +typedef struct sc_plugin_main_t { + /* Session context acquired with ::sr_session_start call. */ + sr_session_ctx_t *session; + + /* Subscription context that is supposed to be released by ::sr_unsubscribe */ + sr_subscription_ctx_t *subscription; + + /* List of init/exit functions to call, setup by constructors */ + _sc_init_function_list_elt_t *init_function_registrations; + _sc_exit_function_list_elt_t *exit_function_registrations; +} sc_plugin_main_t; + +sc_plugin_main_t *sc_get_plugin_main(); + //functions that sysrepo-plugin need int sr_plugin_init_cb(sr_session_ctx_t *session, void **private_ctx); void sr_plugin_cleanup_cb(sr_session_ctx_t *session, void *private_ctx); |