Plugin RPC callback interface have been unified between backend, netconf and restconf.

* Backend RPC register callback function (Netconf RPC or restconf operation POST) has been changed from: `backend_rpc_cb_register()` to `rpc_callback_register()`
    * Backend RPC callback signature has been changed from: `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)` has been changed to : `int cb(clicon_handle h, cxobj *xe, struct client_entry *ce, cbuf *cbret, void *arg)`
    * Frontend netconf and restconf plugins can register callbacks as well with same API as backends.
This commit is contained in:
Olof hagsand 2018-04-07 18:20:33 +02:00
parent 7a4371e76f
commit d541c49c6f
20 changed files with 323 additions and 229 deletions

View file

@ -41,16 +41,8 @@
#define _CLIXON_BACKEND_TRANSACTION_H_
/*
* Types
* Prototypes
*/
/*! Generic downcall registration.
* Enables any function to be called from (cli) frontend
* to backend. Like an RPC on application-level.
*/
typedef int (*downcall_cb)(clicon_handle h, uint16_t op, uint16_t len,
void *arg, uint16_t *retlen, void **retarg);
/* Transaction callback data accessors for client plugins
* (defined in config_dbdep.c)
* @see transaction_data_t internal structure