* Added new cli show functions to work with cligen_output for cligen pageing to work. To acheive this, add a callback function as follows:

* xml2txt(...) --> xml2txt_cb(..., cligen_output)
  * xml2cli(...) --> xml2cli_cb(..., cligen_output)
  * clicon_xml2file(...) --> clicon_xml2file_cb(..., cligen_output)
  * xml2json(...) --> xml2json_cb(..., cligen_output)
  * yang_print(...) --> yang_print_cb(..., cligen_output)
This commit is contained in:
Olof hagsand 2020-06-17 14:04:19 +02:00
parent 6e714beea5
commit 0adcd94f3f
13 changed files with 291 additions and 114 deletions

View file

@ -53,6 +53,20 @@ typedef void *clicon_handle;
/* The dynamicically loadable plugin object handle (should be in clixon_plugin.h) */
typedef void *plghndl_t;
/*! Indirect output functions to print with something else than fprintf
* @param[in] h Clicon handle
* @param[in] xn Request: <rpc><xn></rpc>
* @param[out] cbret Return xml tree, eg <rpc-reply>..., <rpc-error..
* @param[in] arg Domain specific arg, ec client-entry or FCGX_Request
* @param[in] regarg User argument given at rpc_callback_register()
* @retval 0 OK
* @retval -1 Error
*/
typedef int (clicon_output_cb)(
FILE *f,
const char *templ, ...
) __attribute__ ((format (printf, 2, 3)));
/*
* Prototypes
*/