summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.h
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r--cli/src/cli.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h
index f365da70f81..70d6cfb271a 100644
--- a/cli/src/cli.h
+++ b/cli/src/cli.h
@@ -46,11 +46,14 @@ enum argp_option_keys {
struct cli_state;
struct cli_cmd_word;
struct cli_cmd_tree;
+struct cli_cmd;
typedef int (cli_cmd_cbk_t)(struct cli_state *state,
struct cli_cmd_word *word,
const char **words,
int wordcount);
+typedef void (cli_cmd_reg_cbk_t)( struct cli_cmd *this);
+
typedef int (cli_cmd_match_t)(struct cli_cmd_word *word);
typedef int (cli_cmd_filler_t)(struct cli_cmd_word *word);
@@ -147,8 +150,7 @@ typedef ssize_t (*cli_serialize_t) (struct iovec outmsg, void *args);
extern struct cli_state *global_state; /* use only in readline callback */
-int cli_cmd_register (struct cli_cmd_tree *tree, const char *template,
- cli_cmd_cbk_t cbk, const char *desc);
+int cli_cmd_register (struct cli_cmd_tree *tree, struct cli_cmd *cmd);
int cli_cmds_register (struct cli_state *state);
int cli_input_init (struct cli_state *state);