Remove MODULECMD_ARG_OUTPUT argument type

Since the module command interface was expanded to include a JSON output
parameter, there is no longer a need for an output DCB. As the JSON can be
printed by both maxadmin and the REST API, this allows the removal of
explicit output formatting in module commands.
This commit is contained in:
Markus Mäkelä
2017-09-28 13:55:45 +03:00
parent da648387dd
commit 14d8b6a0df
9 changed files with 32 additions and 115 deletions

View File

@ -62,9 +62,6 @@ typedef struct
#define MODULECMD_ARG_DCB 8 /**< DCB */
#define MODULECMD_ARG_MONITOR 9 /**< Monitor */
#define MODULECMD_ARG_FILTER 10 /**< Filter */
#define MODULECMD_ARG_OUTPUT 11 /**< DCB suitable for writing results to.
This should always be the first argument
if the function requires an output DCB. */
/** What type of an action does the command perform? */
enum modulecmd_type
@ -196,7 +193,6 @@ const MODULECMD* modulecmd_find_command(const char *domain, const char *identifi
* | MODULECMD_ARG_STRING | String |
* | MODULECMD_ARG_BOOLEAN | Boolean value |
* | MODULECMD_ARG_DCB | Raw DCB pointer |
* | MODULECMD_ARG_OUTPUT | DCB for output |
*
* @param cmd Command for which the parameters are parsed
* @param argc Number of arguments
@ -223,15 +219,6 @@ void modulecmd_arg_free(MODULECMD_ARG *arg);
*/
bool modulecmd_arg_is_present(const MODULECMD_ARG *arg, int idx);
/**
* @brief Check if module command requires an output DCB
*
* @param cmd Command to check
*
* @return True if module requires a DCB for printing output
*/
bool modulecmd_requires_output_dcb(const MODULECMD* cmd);
/**
* @brief Call a registered command
*