diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-15 03:03:48 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-05-15 03:03:48 +0000 |
commit | f5c1139da439fb8cb79ed06fd958658cef50ef89 (patch) | |
tree | 8b39f6d3ade5b8cc43941163e2fb95ddfb83cbf9 /include | |
parent | c3b40fbb666414f4d5e5a1ae63272a79d438af88 (diff) |
add functions to register/unregister multiple CLI commands in a single operation (bug #4255, with minor mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5662 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-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 |