summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjsip_cli.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2014-02-06 17:55:45 +0000
committerRichard Mudgett <rmudgett@digium.com>2014-02-06 17:55:45 +0000
commitb5ca213e34055724a5cd669938e356569847edcb (patch)
treeae81ec8dc3add7c1ed3cb94c361a205e94a3bcd7 /include/asterisk/res_pjsip_cli.h
parent8ff02ac951c979b1e5e340b3b1cc05736780be20 (diff)
res_pjsip: Updates and adds more PJSIP CLI commands.
* Adds identify, transport, and registration support to the PJSIP CLI. * Creates three additional callbacks, one for an iterator, one for a comparator, and one for a container. This eliminates the link dependency from higher level modules to lower level ones. * Eliminates duplicate sorting in PJSIP CLI commands. * Cleans up PJSIP CLI output formatting. * Pushes CLI command registration down to the implementing source file. * Adds several ast_sip_destroy_sorcery functions to complement existing ast_sip_sorcery_initialize functions. The destroy functions unregister PJSIP CLI commands and PJSIP CLI formatters. Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3104/ ........ Merged revisions 407568 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/res_pjsip_cli.h')
-rw-r--r--include/asterisk/res_pjsip_cli.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asterisk/res_pjsip_cli.h b/include/asterisk/res_pjsip_cli.h
index cd7d81ed2..fa832cadc 100644
--- a/include/asterisk/res_pjsip_cli.h
+++ b/include/asterisk/res_pjsip_cli.h
@@ -19,6 +19,8 @@
#ifndef RES_PJSIP_CLI_H_
#define RES_PJSIP_CLI_H_
+#include "asterisk/cli.h"
+
#define CLI_HEADER_FILLER ".........................................................................................."
#define CLI_DETAIL_FILLER " "
#define CLI_MAX_WIDTH 90
@@ -54,7 +56,9 @@ struct ast_sip_cli_formatter_entry {
const char *name;
ao2_callback_fn *print_header;
ao2_callback_fn *print_body;
- struct ao2_container *(* get_container)(struct ast_sorcery *);
+ struct ao2_container *(* get_container)(void);
+ int (* iterator)(const void *container, ao2_callback_fn callback, void *args);
+ ao2_sort_fn *comparator;
};
/*!
@@ -91,5 +95,7 @@ struct ast_sip_cli_formatter_entry *ast_sip_lookup_cli_formatter(const char *nam
*/
int ast_sip_cli_print_sorcery_objectset(void *obj, void *arg, int flags);
+char *ast_sip_cli_traverse_objects(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
+
#endif /* RES_PJSIP_CLI_H_ */