diff options
author | YohanPipereau <ypiperea@cisco.com> | 2019-02-26 11:47:26 +0100 |
---|---|---|
committer | YohanPipereau <ypiperea@cisco.com> | 2019-02-28 11:56:29 +0100 |
commit | 793682e6fcb9e39891c59c696e5f8e9c18f9d8e7 (patch) | |
tree | 3c85ee82ab556d696dc7af8a6d9f55e9a08cf7f8 /src/plugins/sc_plugins.h | |
parent | f9393a8c15fbd63b7a0938269afa8a35ddfc4738 (diff) |
This commit changes the way models are registered.
Registering a new model is now done using model_register function which
is generic enough to take care of every model family (IETF, Openconfig, ...).
Every model (ex: openconfig-interfaces) contain one or several xpaths.
Every model (ex: openconfig-interfaces) has its own dedicated C file
(ex: openconfig-interfaces.c) with its dedicated xpath_t structure in
it.
This structure is a mapping of all xpaths of a model to their associated
callbacks.
It still contains all informations needed by sr_*_subscribe functions.
Thus, xpath_t is an external array used in every model, it is seen as a
global symbol in shared library. And because these external arrays are passed
as arguments to a function, maccros defining the size of these xpath_t arrays
have been defined.
datastore_e datastructure has been removed to rely on the one provided by
sysrepo API.
The subscription linked list which was used has been removed because
sysrepo already takes care of this. Now, the same subscription_session_ctx_t
is used for all subscriptions as it was the case in ietf_subscribe_events.
Thus cleanup callback has been simplified to a simple
sysrepo_unsubscribe instead of going through the entire Linked List.
Change-Id: I43d52f619be27b6216bb3b9d197518b032306fa7
Signed-off-by: Yohan Pipereau <ypiperea@cisco.com>
Diffstat (limited to 'src/plugins/sc_plugins.h')
-rw-r--r-- | src/plugins/sc_plugins.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/plugins/sc_plugins.h b/src/plugins/sc_plugins.h index 9e9f774..bdf88d7 100644 --- a/src/plugins/sc_plugins.h +++ b/src/plugins/sc_plugins.h @@ -25,7 +25,3 @@ 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); #endif //__SC_PLUGINS_H__ - - - - |