aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_indications.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 19:54:18 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-18 19:54:18 +0000
commit5aacb6a82d4cf625774fa1ea39ca193a3be73b35 (patch)
treecf63baa167f81c95d3dbf417f83681851decad80 /res/res_indications.c
parent4de5810a0530bca0665eadcfb06ef06fd2e86758 (diff)
merge qwell's CLI verbification work
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_indications.c')
-rw-r--r--res/res_indications.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/res/res_indications.c b/res/res_indications.c
index d12868d9c..34ddf1e31 100644
--- a/res/res_indications.c
+++ b/res/res_indications.c
@@ -64,8 +64,8 @@ static char help_remove_indication[] =
" Remove the given indication from the country.\n";
static char help_show_indications[] =
-"Usage: show indications [<country> ...]\n"
-" Show either a condensed for of all country/indications, or the\n"
+"Usage: indication list [<country> ...]\n"
+" Display either a condensed for of all country/indications, or the\n"
" indications for the specified countries.\n";
char *playtones_desc=
@@ -345,20 +345,24 @@ out: v = v->next;
/*
* CLI entries for commands provided by this module
*/
-static struct ast_cli_entry add_indication_cli =
- { { "indication", "add", NULL }, handle_add_indication,
- "Add the given indication to the country", help_add_indication,
- NULL };
+static struct ast_cli_entry cli_show_indications_deprecated = {
+ { "show", "indications", NULL },
+ handle_show_indications, NULL,
+ NULL };
-static struct ast_cli_entry remove_indication_cli =
- { { "indication", "remove", NULL }, handle_remove_indication,
- "Remove the given indication from the country", help_remove_indication,
- NULL };
+static struct ast_cli_entry cli_indications[] = {
+ { { "indication", "add", NULL },
+ handle_add_indication, "Add the given indication to the country",
+ help_add_indication, NULL },
-static struct ast_cli_entry show_indications_cli =
- { { "show", "indications", NULL }, handle_show_indications,
- "Show a list of all country/indications", help_show_indications,
- NULL };
+ { { "indication", "remove", NULL },
+ handle_remove_indication, "Remove the given indication from the country",
+ help_remove_indication, NULL },
+
+ { { "indication", "list", NULL },
+ handle_show_indications, "Display a list of all countries/indications",
+ help_show_indications, NULL, &cli_show_indications_deprecated },
+};
/*
* Standard module functions ...
@@ -369,9 +373,7 @@ static int unload_module(void)
ast_unregister_indication_country(NULL);
/* and the functions */
- ast_cli_unregister(&add_indication_cli);
- ast_cli_unregister(&remove_indication_cli);
- ast_cli_unregister(&show_indications_cli);
+ ast_cli_unregister_multiple(cli_indications, sizeof(cli_indications) / sizeof(struct ast_cli_entry));
ast_unregister_application("PlayTones");
ast_unregister_application("StopPlayTones");
return 0;
@@ -382,9 +384,7 @@ static int load_module(void)
{
if (ind_load_module())
return AST_MODULE_LOAD_DECLINE;
- ast_cli_register(&add_indication_cli);
- ast_cli_register(&remove_indication_cli);
- ast_cli_register(&show_indications_cli);
+ ast_cli_register_multiple(cli_indications, sizeof(cli_indications) / sizeof(struct ast_cli_entry));
ast_register_application("PlayTones", handle_playtones, "Play a tone list", playtones_desc);
ast_register_application("StopPlayTones", handle_stopplaytones, "Stop playing a tone list","Stop playing a tone list");