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:
parent
7a4371e76f
commit
d541c49c6f
20 changed files with 323 additions and 229 deletions
|
|
@ -39,27 +39,12 @@
|
|||
#ifndef _CLIXON_NETCONF_H_
|
||||
#define _CLIXON_NETCONF_H_
|
||||
|
||||
/*
|
||||
* Types
|
||||
*/
|
||||
typedef int (*netconf_cb_t)(
|
||||
clicon_handle h,
|
||||
cxobj *xn, /* Request: <rpc><xn></rpc> */
|
||||
cxobj **xret, /* Return xml tree, eg <rpc-reply>... */
|
||||
void *arg /* Argument given at netconf_register_callback() */
|
||||
);
|
||||
|
||||
/*
|
||||
* Prototypes
|
||||
* (Duplicated. Also in netconf_*.h)
|
||||
*/
|
||||
int netconf_output(int s, cbuf *xf, char *msg);
|
||||
|
||||
int netconf_register_callback(clicon_handle h,
|
||||
netconf_cb_t cb, /* Callback called */
|
||||
void *arg, /* Arg to send to callback */
|
||||
char *tag); /* Xml tag when callback is made */
|
||||
|
||||
int netconf_xpath(cxobj *xsearch,
|
||||
cxobj *xfilter,
|
||||
cbuf *xf, cbuf *xf_err,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue