diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-15 03:03:48 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-15 03:03:48 +0000 |
commit | 0356b70224db6f40cab8d069bbab6f22714ffa46 (patch) | |
tree | 8b39f6d3ade5b8cc43941163e2fb95ddfb83cbf9 /include/asterisk/cli.h | |
parent | b5272684eef7a84ed0d6e893877668c0716d866b (diff) |
add functions to register/unregister multiple CLI commands in a single operation (bug #4255, with minor mods)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/cli.h')
-rwxr-xr-x | include/asterisk/cli.h | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/include/asterisk/cli.h b/include/asterisk/cli.h index bc280220c..993b61687 100755 --- a/include/asterisk/cli.h +++ b/include/asterisk/cli.h @@ -57,23 +57,36 @@ struct ast_cli_entry { */ extern int ast_cli_command(int fd, char *s); -/*! Registers a command */ +/*! Registers a command or an array of commands */ /*! - * \param fd File descriptor that I/O is done to - * \param s string given at prompt + * \param e which cli entry to register * Register your own command * Returns 0 on success, -1 on failure */ extern int ast_cli_register(struct ast_cli_entry *e); -/*! Unregisters a command */ +/*! + * \param e pointer to first cli entry to register + * \param len number of entries to register + * Register multiple commands + */ +extern void ast_cli_register_multiple(struct ast_cli_entry *e, int len); + +/*! Unregisters a command or an array of commands */ /*! * \param e which cli entry to unregister - * Unregister your own command. You must pass a completed ast_cli_entry structur - * Returns 0 on success, -1 on failure + * Unregister your own command. You must pass a completed ast_cli_entry structure + * Returns 0. */ extern int ast_cli_unregister(struct ast_cli_entry *e); +/*! + * \param e pointer to first cli entry to unregister + * \param len number of entries to unregister + * Unregister multiple commands + */ +extern void ast_cli_unregister_multiple(struct ast_cli_entry *e, int len); + /*! Readline madness */ /* Useful for readline, that's about it * Returns 0 on success, -1 on failure |