Merge branch 'develop'
This commit is contained in:
commit
4902f7cf1d
28 changed files with 1877 additions and 1002 deletions
|
|
@ -70,8 +70,7 @@ typedef int (*clicon_rpc_cb)(
|
|||
/*! Registered Upgrade callback function
|
||||
* @param[in] h Clicon handle
|
||||
* @param[in] xn XML tree to be updated
|
||||
* @param[in] modname Name of module
|
||||
* @param[in] modns Namespace of module (for info)
|
||||
* @param[in] namespace Namespace of module
|
||||
* @param[in] from From revision on the form YYYYMMDD
|
||||
* @param[in] to To revision on the form YYYYMMDD (0 not in system)
|
||||
* @param[in] arg User argument given at rpc_callback_register()
|
||||
|
|
@ -83,8 +82,7 @@ typedef int (*clicon_rpc_cb)(
|
|||
typedef int (*clicon_upgrade_cb)(
|
||||
clicon_handle h,
|
||||
cxobj *xn,
|
||||
char *modname,
|
||||
char *modns,
|
||||
char *namespace,
|
||||
uint32_t from,
|
||||
uint32_t to,
|
||||
void *arg,
|
||||
|
|
@ -203,6 +201,11 @@ struct clixon_plugin_api{
|
|||
#define ca_trans_end u.cau_backend.cb_trans_end
|
||||
#define ca_trans_abort u.cau_backend.cb_trans_abort
|
||||
|
||||
/*
|
||||
* Macros
|
||||
*/
|
||||
#define upgrade_callback_register(h, cb, namespace, from, to, arg) upgrade_callback_reg_fn((h), (cb), #cb, (namespace), (from), (to), (arg))
|
||||
|
||||
typedef struct clixon_plugin_api clixon_plugin_api;
|
||||
|
||||
/* Internal plugin structure with dlopen() handle and plugin_api
|
||||
|
|
@ -246,8 +249,8 @@ int rpc_callback_delete_all(clicon_handle h);
|
|||
int rpc_callback_call(clicon_handle h, cxobj *xe, cbuf *cbret, void *arg);
|
||||
|
||||
/* upgrade callback API */
|
||||
int upgrade_callback_register(clicon_handle h, clicon_upgrade_cb cb, void *arg, char *name, char *namespace, uint32_t from, uint32_t to);
|
||||
int upgrade_callback_reg_fn(clicon_handle h, clicon_upgrade_cb cb, const char *strfn, char *namespace, uint32_t from, uint32_t to, void *arg);
|
||||
int upgrade_callback_delete_all(clicon_handle h);
|
||||
int upgrade_callback_call(clicon_handle h, cxobj *xt, char *modname, char *modns, uint32_t from, uint32_t to, cbuf *cbret);
|
||||
int upgrade_callback_call(clicon_handle h, cxobj *xt, char *namespace, uint32_t from, uint32_t to, cbuf *cbret);
|
||||
|
||||
#endif /* _CLIXON_PLUGIN_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue