mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-11 15:18:38 +00:00
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
This commit is contained in:
@@ -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_ */
|
||||
|
Reference in New Issue
Block a user