#ifndef _CLI_H #define _CLI_H #include "frontend_common.h" #include "cli_source.h" #include "cli_param.h" #include "cli_output.h" #include "cli_nodes.h" struct backend_conn; enum CommandNameIds{ CMD_GETSOURCE, CMD_SETSOURCE, CMD_GETPARAM, CMD_SETPARAM, CMD_GETOUTPUT, CMD_GETNODES, CMD_ADDNODE, MAX_COMMANDS }; typedef int (*cli_function_ptr)(struct backend_conn *, int, char **); static cli_function_ptr cli_functions[] = { &cli_getsource, &cli_setsource, &cli_getparam, &cli_setparam, &cli_getoutput, &cli_getnodes, &cli_addnode }; static char* commandNames[MAX_COMMANDS] = { "getsource", "setsource", "getparam", "setparam", "getoutput", "getnodes", "addnode" }; /* This function is called by other cli functions to check for a help condition */ int help_check(int argc, char ** argv); #endif /* _CLI_H */