engine: echo canceller update
[transsip.git] / src / clicmds.h
blob4d22835fde75189968205f2db9ace102098de970
1 /*
2 * transsip - the telephony network
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011, 2012 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
7 */
9 #ifndef CLICMDS_H
10 #define CLICMDS_H
12 #include <readline/readline.h>
14 #define MAX_MENU_ELEMS 100
16 extern int cmd_help(char *args);
17 extern int cmd_quit(char *args);
18 extern int cmd_stat(char *args);
19 extern int cmd_call(char *args);
20 extern int cmd_hangup(char *args);
21 extern int cmd_take(char *arg);
23 struct shell_cmd {
24 char *name;
25 rl_icpfunc_t *callback;
26 char *doc;
27 struct shell_cmd *sub_cmd;
30 static struct shell_cmd show_node[] = {
31 { "settings", cmd_help, "Show settings", NULL, },
32 { "pubkey", cmd_help, "Show my public key", NULL, },
33 { "contacts", cmd_help, "Show my contacts", NULL, },
34 { NULL, NULL, NULL, NULL, },
37 static struct shell_cmd import_node[] = {
38 { "contact", cmd_help, "Import a contact user/pubkey", NULL, },
39 { NULL, NULL, NULL, NULL, },
42 static struct shell_cmd cmd_tree[] = {
43 { "help", cmd_help, "Show help", NULL, },
44 { "quit", cmd_quit, "Exit shell", NULL, },
45 { "call", cmd_call, "Perform a call", NULL, },
46 { "hangup", cmd_hangup, "Hangup the current call", NULL, },
47 { "take", cmd_take, "Take a call", NULL, },
48 { "show", NULL, "Show information", show_node, },
49 { "import", NULL, "Import things", import_node, },
50 { NULL, NULL, NULL, NULL, },
53 #endif /* CLICMDS_H */