Merge branch dispatcher and broke out pagination callbacks to use it

* Merge branch 'dcornejo-master'
* Broke out pagination callback API from state data callbacks
  * New pagination callback API uses new dispatcher from netgate, thanks @dcornejo
   * Register callback with: `clixon_pagination_cb_register()`
   * Use accessor functions `pagination_offset()`, `pagination_limit()`, etc
 * Reverted state data callback API to pre-5.3 (see C/CLI API changes below)
This commit is contained in:
Olof hagsand 2021-10-07 09:17:25 +02:00
commit ce06f25be7
19 changed files with 996 additions and 123 deletions

View file

@ -180,10 +180,6 @@ int
nacm_statedata(clicon_handle h,
cvec *nsc,
char *xpath,
pagination_mode_t pagmode,
uint32_t offset,
uint32_t limit,
uint32_t *remaining,
cxobj *xstate)
{
int retval = -1;
@ -210,7 +206,7 @@ static clixon_plugin_api api = {
clixon_plugin_init, /* init */
NULL, /* start */
NULL, /* exit */
.ca_statedata=nacm_statedata, /* statedata */
.ca_statedata=nacm_statedata, /* statedata */
.ca_trans_begin=nacm_begin, /* trans begin */
.ca_trans_validate=nacm_validate, /* trans validate */
.ca_trans_complete=nacm_complete, /* trans complete */