Renamed paging to pagination
This commit is contained in:
parent
60193cca0d
commit
ff3f600920
11 changed files with 50 additions and 51 deletions
|
|
@ -258,7 +258,7 @@ get_client_statedata(clicon_handle h,
|
|||
goto fail;
|
||||
}
|
||||
/* Use plugin state callbacks */
|
||||
if ((ret = clixon_plugin_statedata_all(h, yspec, nsc, xpath, PAGING_NONE, 0, 0, NULL, xret)) < 0)
|
||||
if ((ret = clixon_plugin_statedata_all(h, yspec, nsc, xpath, PAGINATION_NONE, 0, 0, NULL, xret)) < 0)
|
||||
goto done;
|
||||
if (ret == 0)
|
||||
goto fail;
|
||||
|
|
@ -467,10 +467,10 @@ get_list_pagination(clicon_handle h,
|
|||
cxobj *xerr = NULL;
|
||||
cbuf *cbmsg = NULL; /* For error msg */
|
||||
cxobj *xret = NULL;
|
||||
char *xpath2; /* With optional paging predicate */
|
||||
char *xpath2; /* With optional pagination predicate */
|
||||
int ret;
|
||||
uint32_t iddb; /* DBs lock, if any */
|
||||
paging_status_t pagingstatus;
|
||||
pagination_mode_t pagmode;
|
||||
cxobj *x1 = NULL;
|
||||
cxobj *xcache = NULL;
|
||||
uint32_t total = 0;
|
||||
|
|
@ -600,12 +600,12 @@ get_list_pagination(clicon_handle h,
|
|||
else {/* Check if running locked (by this session) */
|
||||
if ((iddb = xmldb_islocked(h, "running")) != 0 &&
|
||||
iddb == ce->ce_id)
|
||||
pagingstatus = PAGING_LOCK;
|
||||
pagmode = PAGINATION_LOCK;
|
||||
else
|
||||
pagingstatus = PAGING_STATELESS;
|
||||
pagmode = PAGINATION_STATELESS;
|
||||
/* Use plugin state callbacks */
|
||||
if ((ret = clixon_plugin_statedata_all(h, yspec, nsc, xpath,
|
||||
pagingstatus,
|
||||
pagmode,
|
||||
offset, limit, &remaining, &xret)) < 0)
|
||||
goto done;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ clixon_plugin_daemon_all(clicon_handle h)
|
|||
* @param[in] h clicon handle
|
||||
* @param[in] nsc namespace context for xpath
|
||||
* @param[in] xpath String with XPATH syntax. or NULL for all
|
||||
* @param[in] pagingstatus List pagination status
|
||||
* @param[in] pagmode List pagination mode
|
||||
* @param[in] offset Offset, for list pagination
|
||||
* @param[in] limit Limit, for list pagination
|
||||
* @param[out] remaining Remaining elements (if limit is non-zero)
|
||||
|
|
@ -253,7 +253,7 @@ clixon_plugin_statedata_one(clixon_plugin_t *cp,
|
|||
clicon_handle h,
|
||||
cvec *nsc,
|
||||
char *xpath,
|
||||
paging_status_t pagingstatus,
|
||||
pagination_mode_t pagmode,
|
||||
uint32_t offset,
|
||||
uint32_t limit,
|
||||
uint32_t *remaining,
|
||||
|
|
@ -268,7 +268,7 @@ clixon_plugin_statedata_one(clixon_plugin_t *cp,
|
|||
if ((fn2 = clixon_plugin_api_get(cp)->ca_statedata2) != NULL){
|
||||
if ((x = xml_new(DATASTORE_TOP_SYMBOL, NULL, CX_ELMNT)) == NULL)
|
||||
goto done;
|
||||
if (fn2(h, nsc, xpath, pagingstatus, offset, limit, remaining, x) < 0){
|
||||
if (fn2(h, nsc, xpath, pagmode, offset, limit, remaining, x) < 0){
|
||||
if (clicon_errno < 0)
|
||||
clicon_log(LOG_WARNING, "%s: Internal error: State callback in plugin: %s returned -1 but did not make a clicon_err call",
|
||||
__FUNCTION__, clixon_plugin_name_get(cp));
|
||||
|
|
@ -302,7 +302,7 @@ clixon_plugin_statedata_one(clixon_plugin_t *cp,
|
|||
* @param[in] yspec Yang spec
|
||||
* @param[in] nsc Namespace context
|
||||
* @param[in] xpath String with XPATH syntax. or NULL for all
|
||||
* @param[in] pagination List pagination
|
||||
* @param[in] pagmode List pagination mode
|
||||
* @param[in] offset Offset, for list pagination
|
||||
* @param[in] limit Limit, for list pagination
|
||||
* @param[out] remaining Remaining elements (if limit is non-zero)
|
||||
|
|
@ -317,7 +317,7 @@ clixon_plugin_statedata_all(clicon_handle h,
|
|||
yang_stmt *yspec,
|
||||
cvec *nsc,
|
||||
char *xpath,
|
||||
paging_status_t pagingstatus,
|
||||
pagination_mode_t pagmode,
|
||||
uint32_t offset,
|
||||
uint32_t limit,
|
||||
uint32_t *remaining,
|
||||
|
|
@ -332,7 +332,7 @@ clixon_plugin_statedata_all(clicon_handle h,
|
|||
|
||||
clicon_debug(1, "%s", __FUNCTION__);
|
||||
while ((cp = clixon_plugin_each(h, cp)) != NULL) {
|
||||
if ((ret = clixon_plugin_statedata_one(cp, h, nsc, xpath, pagingstatus,
|
||||
if ((ret = clixon_plugin_statedata_one(cp, h, nsc, xpath, pagmode,
|
||||
offset, limit, remaining, &x)) < 0)
|
||||
goto done;
|
||||
if (ret == 0){
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ int clixon_plugin_pre_daemon_all(clicon_handle h);
|
|||
int clixon_plugin_daemon_all(clicon_handle h);
|
||||
|
||||
int clixon_plugin_statedata_all(clicon_handle h, yang_stmt *yspec, cvec *nsc, char *xpath,
|
||||
paging_status_t pagingstatus,
|
||||
pagination_mode_t pagmode,
|
||||
uint32_t offset, uint32_t limit, uint32_t *remaining,
|
||||
cxobj **xtop);
|
||||
int clixon_plugin_lockdb_all(clicon_handle h, char *db, int lock, int id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue