aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.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_musiconhold.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_musiconhold.c')
-rw-r--r--res/res_musiconhold.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 18436e0bf..e553a994d 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1183,11 +1183,29 @@ static int moh_classes_show(int fd, int argc, char *argv[])
return 0;
}
-static struct ast_cli_entry cli_moh = { { "moh", "reload"}, moh_cli, "Music On Hold", "Music On Hold", NULL};
-
-static struct ast_cli_entry cli_moh_classes_show = { { "moh", "classes", "show"}, moh_classes_show, "List MOH classes", "Lists all MOH classes", NULL};
-
-static struct ast_cli_entry cli_moh_files_show = { { "moh", "files", "show"}, cli_files_show, "List MOH file-based classes", "Lists all loaded file-based MOH classes and their files", NULL};
+static struct ast_cli_entry cli_moh_classes_show_deprecated = {
+ { "moh", "classes", "show"},
+ moh_classes_show, NULL,
+ NULL };
+
+static struct ast_cli_entry cli_moh_files_show_deprecated = {
+ { "moh", "files", "show"},
+ cli_files_show, NULL,
+ NULL };
+
+static struct ast_cli_entry cli_moh[] = {
+ { { "moh", "reload"},
+ moh_cli, "Music On Hold",
+ "Music On Hold" },
+
+ { { "moh", "list", "classes"},
+ moh_classes_show, "List MOH classes",
+ "Lists all MOH classes", NULL, &cli_moh_classes_show_deprecated },
+
+ { { "moh", "list", "files"},
+ cli_files_show, "List MOH file-based classes",
+ "Lists all loaded file-based MOH classes and their files", NULL, &cli_moh_files_show_deprecated },
+};
static int init_classes(int reload)
{
@@ -1212,9 +1230,7 @@ static int load_module(void)
res = ast_register_application(app0, moh0_exec, synopsis0, descrip0);
ast_register_atexit(ast_moh_destroy);
- ast_cli_register(&cli_moh);
- ast_cli_register(&cli_moh_files_show);
- ast_cli_register(&cli_moh_classes_show);
+ ast_cli_register_multiple(cli_moh, sizeof(cli_moh) / sizeof(struct ast_cli_entry));
if (!res)
res = ast_register_application(app1, moh1_exec, synopsis1, descrip1);
if (!res)