mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
cleanup tab completion more and introduce new callback based expansion functions to do real time tab completion in some areas, needs people to add more funcs etc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15952 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -76,6 +76,16 @@ SWITCH_DECLARE_NONSTD(switch_status_t) switch_console_stream_write(switch_stream
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_stream_write_file_contents(switch_stream_handle_t *stream, const char *path);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_init(switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_shutdown(void);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_add_complete_func(const char *name, switch_console_complete_callback_t cb);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_del_complete_func(const char *name);
|
||||
SWITCH_DECLARE(switch_status_t) switch_console_run_complete_func(const char *func, const char *line,
|
||||
const char *cursor, switch_console_callback_match_t **matches);
|
||||
SWITCH_DECLARE(void) switch_console_push_match(switch_console_callback_match_t **matches, const char *new_val);
|
||||
SWITCH_DECLARE(void) switch_console_free_matches(switch_console_callback_match_t **matches);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
@@ -1484,6 +1484,21 @@ typedef struct switch_chat_interface switch_chat_interface_t;
|
||||
typedef struct switch_management_interface switch_management_interface_t;
|
||||
typedef struct switch_core_port_allocator switch_core_port_allocator_t;
|
||||
typedef struct switch_media_bug switch_media_bug_t;
|
||||
|
||||
struct switch_console_callback_match_node {
|
||||
char *val;
|
||||
struct switch_console_callback_match_node *next;
|
||||
};
|
||||
typedef struct switch_console_callback_match_node switch_console_callback_match_node_t;
|
||||
|
||||
struct switch_console_callback_match {
|
||||
struct switch_console_callback_match_node *head;
|
||||
struct switch_console_callback_match_node *end;
|
||||
switch_memory_pool_t *pool;
|
||||
};
|
||||
typedef struct switch_console_callback_match switch_console_callback_match_t;
|
||||
|
||||
typedef switch_status_t (*switch_console_complete_callback_t) (const char *, const char *, switch_console_callback_match_t **matches);
|
||||
typedef switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void *, switch_abc_type_t);
|
||||
typedef switch_bool_t (*switch_tone_detect_callback_t) (switch_core_session_t *, const char *, const char *);
|
||||
typedef struct switch_xml_binding switch_xml_binding_t;
|
||||
|
||||
@@ -89,8 +89,12 @@ static inline switch_bool_t switch_is_moh(const char *s)
|
||||
return SWITCH_TRUE;
|
||||
}
|
||||
|
||||
#define switch_arraylen(_a) (sizeof(_a) / sizeof(_a[0]))
|
||||
#define switch_split(_data, _delim, _array) switch_separate_string(_data, _delim, _array, switch_arraylen(_array))
|
||||
|
||||
#define switch_is_valid_rate(_tmp) (_tmp == 8000 || _tmp == 16000 || _tmp == 32000 || _tmp == 11025 || _tmp == 22050 || _tmp == 44100 || _tmp == 48000)
|
||||
|
||||
|
||||
static inline int switch_string_has_escaped_data(const char *in)
|
||||
{
|
||||
const char *i = strchr(in, '\\');
|
||||
|
||||
Reference in New Issue
Block a user