mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
more events and some build changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@188 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -74,7 +74,8 @@ SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel,
|
||||
SWITCH_DECLARE(int) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, size_t len);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode (switch_channel *channel, int freq, int bits, int channels, int ms, int kbps);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode (switch_channel *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state state);
|
||||
SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel *channel, switch_event *event);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -121,6 +121,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_se
|
||||
SWITCH_DECLARE(switch_memory_pool *) switch_core_session_get_pool(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) pbx_core_session_signal_state_change(switch_core_session *session);
|
||||
SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool *pool, char *todup);
|
||||
SWITCH_DECLARE(switch_core_db *) switch_core_db_open_file(char *filename);
|
||||
|
||||
#define SWITCH_CORE_DB "core"
|
||||
#define switch_core_db_handle() switch_core_db_open_file(SWITCH_CORE_DB)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ SWITCH_DECLARE(switch_status) switch_event_bind(char *id, switch_event_t event,
|
||||
SWITCH_DECLARE(char *) switch_event_name(switch_event_t event);
|
||||
SWITCH_DECLARE(switch_status) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name);
|
||||
SWITCH_DECLARE(switch_status) switch_event_serialize(switch_event *event, char *buf, size_t buflen, char *fmt, ...);
|
||||
SWITCH_DECLARE(switch_status) switch_event_running(void);
|
||||
|
||||
#define switch_event_reserve_subclass(subclass_name) switch_event_reserve_subclass_detailed(__FILE__, subclass_name)
|
||||
#define switch_event_create(event, id) switch_event_create_subclass(event, id, SWITCH_EVENT_SUBCLASS_ANY)
|
||||
|
||||
+119
-9
@@ -36,13 +36,6 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <switch.h>
|
||||
//#include <sqlite3.h>
|
||||
//#include <apr_thread_mutex.h>
|
||||
//#include <apr_thread_proc.h>
|
||||
//#include <apr_hash.h>
|
||||
//#include <apr_network_io.h>
|
||||
//#include <apr_poll.h>
|
||||
//#include <sys/types.h>
|
||||
|
||||
#define SWITCH_GLOBAL_VERSION "1"
|
||||
#define SWITCH_MAX_CODECS 30
|
||||
@@ -62,7 +55,8 @@ typedef enum {
|
||||
|
||||
typedef enum {
|
||||
SWITCH_CHANNEL_ID_CONSOLE,
|
||||
SWITCH_CHANNEL_ID_CONSOLE_CLEAN
|
||||
SWITCH_CHANNEL_ID_CONSOLE_CLEAN,
|
||||
SWITCH_CHANNEL_ID_EVENT
|
||||
} switch_text_channel;
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1300
|
||||
@@ -71,9 +65,10 @@ typedef enum {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define SWITCH_CHANNEL_CONSOLE SWITCH_CHANNEL_ID_CONSOLE, __FILE__, __FUNCTION__, __LINE__
|
||||
#define SWITCH_CHANNEL_CONSOLE_CLEAN SWITCH_CHANNEL_ID_CONSOLE_CLEAN, __FILE__, __FUNCTION__, __LINE__
|
||||
#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __FUNCTION__, __LINE__
|
||||
|
||||
typedef enum {
|
||||
CS_NEW,
|
||||
@@ -128,6 +123,9 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
SWITCH_EVENT_CUSTOM,
|
||||
SWITCH_EVENT_CHANNEL_STATE,
|
||||
SWITCH_EVENT_CHANNEL_ANSWER,
|
||||
SWITCH_EVENT_LOG,
|
||||
SWITCH_EVENT_INBOUND_CHAN,
|
||||
SWITCH_EVENT_OUTBOUND_CHAN,
|
||||
SWITCH_EVENT_ANSWER_CHAN,
|
||||
@@ -139,6 +137,7 @@ typedef enum {
|
||||
} switch_event_t;
|
||||
|
||||
|
||||
|
||||
typedef struct switch_event_header switch_event_header;
|
||||
typedef struct switch_event switch_event;
|
||||
typedef struct switch_event_subclass switch_event_subclass;
|
||||
@@ -321,6 +320,117 @@ typedef apr_hash_index_t switch_hash_index_t;
|
||||
#define SWITCH_FPROT_OS_DEFAULT APR_FPROT_OS_DEFAULT
|
||||
#define SWITCH_FPROT_FILE_SOURCE_PERMS APR_FPROT_FILE_SOURCE_PERMS
|
||||
|
||||
/* SQLITE */
|
||||
typedef sqlite3 switch_core_db;
|
||||
#define switch_core_db_aggregate_context sqlite3_aggregate_context
|
||||
#define switch_core_db_aggregate_count sqlite3_aggregate_count
|
||||
#define switch_core_db_bind_blob sqlite3_bind_blob
|
||||
#define switch_core_db_bind_double sqlite3_bind_double
|
||||
#define switch_core_db_bind_int sqlite3_bind_int
|
||||
#define switch_core_db_bind_int64 sqlite3_bind_int64
|
||||
#define switch_core_db_bind_null sqlite3_bind_null
|
||||
#define switch_core_db_bind_parameter_count sqlite3_bind_parameter_count
|
||||
#define switch_core_db_bind_parameter_index sqlite3_bind_parameter_index
|
||||
#define switch_core_db_bind_parameter_name sqlite3_bind_parameter_name
|
||||
#define switch_core_db_bind_text sqlite3_bind_text
|
||||
#define switch_core_db_bind_text16 sqlite3_bind_text16
|
||||
#define switch_core_db_btree_trace sqlite3_btree_trace
|
||||
#define switch_core_db_busy_handler sqlite3_busy_handler
|
||||
#define switch_core_db_busy_timeout sqlite3_busy_timeout
|
||||
#define switch_core_db_changes sqlite3_changes
|
||||
#define switch_core_db_close sqlite3_close
|
||||
#define switch_core_db_collation_needed sqlite3_collation_needed
|
||||
#define switch_core_db_collation_needed16 sqlite3_collation_needed16
|
||||
#define switch_core_db_column_blob sqlite3_column_blob
|
||||
#define switch_core_db_column_bytes sqlite3_column_bytes
|
||||
#define switch_core_db_column_bytes16 sqlite3_column_bytes16
|
||||
#define switch_core_db_column_count sqlite3_column_count
|
||||
#define switch_core_db_column_decltype sqlite3_column_decltype
|
||||
#define switch_core_db_column_decltype16 sqlite3_column_decltype16
|
||||
#define switch_core_db_column_double sqlite3_column_double
|
||||
#define switch_core_db_column_int sqlite3_column_int
|
||||
#define switch_core_db_column_int64 sqlite3_column_int64
|
||||
#define switch_core_db_column_name sqlite3_column_name
|
||||
#define switch_core_db_column_name16 sqlite3_column_name16
|
||||
#define switch_core_db_column_text sqlite3_column_text
|
||||
#define switch_core_db_column_text16 sqlite3_column_text16
|
||||
#define switch_core_db_column_type sqlite3_column_type
|
||||
#define switch_core_db_commit_hook sqlite3_commit_hook
|
||||
#define switch_core_db_complete sqlite3_complete
|
||||
#define switch_core_db_complete16 sqlite3_complete16
|
||||
#define switch_core_db_create_collation sqlite3_create_collation
|
||||
#define switch_core_db_create_collation16 sqlite3_create_collation16
|
||||
#define switch_core_db_create_function sqlite3_create_function
|
||||
#define switch_core_db_create_function16 sqlite3_create_function16
|
||||
#define switch_core_db_data_count sqlite3_data_count
|
||||
#define switch_core_db_db_handle sqlite3_db_handle
|
||||
#define switch_core_db_errcode sqlite3_errcode
|
||||
#define switch_core_db_errmsg sqlite3_errmsg
|
||||
#define switch_core_db_errmsg16 sqlite3_errmsg16
|
||||
#define switch_core_db_exec sqlite3_exec
|
||||
#define switch_core_db_expired sqlite3_expired
|
||||
#define switch_core_db_finalize sqlite3_finalize
|
||||
#define switch_core_db_free sqlite3_free
|
||||
#define switch_core_db_free_table sqlite3_free_table
|
||||
#define switch_core_db_get_autocommit sqlite3_get_autocommit
|
||||
#define switch_core_db_get_auxdata sqlite3_get_auxdata
|
||||
#define switch_core_db_get_table sqlite3_get_table
|
||||
#define switch_core_db_get_table_cb sqlite3_get_table_cb
|
||||
#define switch_core_db_global_recover sqlite3_global_recover
|
||||
#define switch_core_db_interrupt sqlite3_interrupt
|
||||
#define switch_core_db_interrupt_count sqlite3_interrupt_count
|
||||
#define switch_core_db_last_insert_rowid sqlite3_last_insert_rowid
|
||||
#define switch_core_db_libversion sqlite3_libversion
|
||||
#define switch_core_db_libversion_number sqlite3_libversion_number
|
||||
#define switch_core_db_malloc_failed sqlite3_malloc_failed
|
||||
#define switch_core_db_mprintf sqlite3_mprintf
|
||||
#define switch_core_db_open sqlite3_open
|
||||
#define switch_core_db_open16 sqlite3_open16
|
||||
#define switch_core_db_opentemp_count sqlite3_opentemp_count
|
||||
#define switch_core_db_os_trace sqlite3_os_trace
|
||||
#define switch_core_db_prepare sqlite3_prepare
|
||||
#define switch_core_db_prepare16 sqlite3_prepare16
|
||||
#define switch_core_db_profile sqlite3_profile
|
||||
#define switch_core_db_progress_handler sqlite3_progress_handler
|
||||
#define switch_core_db_reset sqlite3_reset
|
||||
#define switch_core_db_result_blob sqlite3_result_blob
|
||||
#define switch_core_db_result_double sqlite3_result_double
|
||||
#define switch_core_db_result_error sqlite3_result_error
|
||||
#define switch_core_db_result_error16 sqlite3_result_error16
|
||||
#define switch_core_db_result_int sqlite3_result_int
|
||||
#define switch_core_db_result_int64 sqlite3_result_int64
|
||||
#define switch_core_db_result_null sqlite3_result_null
|
||||
#define switch_core_db_result_text sqlite3_result_text
|
||||
#define switch_core_db_result_text16 sqlite3_result_text16
|
||||
#define switch_core_db_result_text16be sqlite3_result_text16be
|
||||
#define switch_core_db_result_text16le sqlite3_result_text16le
|
||||
#define switch_core_db_result_value sqlite3_result_value
|
||||
#define switch_core_db_search_count sqlite3_search_count
|
||||
#define switch_core_db_set_authorizer sqlite3_set_authorizer
|
||||
#define switch_core_db_set_auxdata sqlite3_set_auxdata
|
||||
#define switch_core_db_snprintf sqlite3_snprintf
|
||||
#define switch_core_db_sort_count sqlite3_sort_count
|
||||
#define switch_core_db_step sqlite3_step
|
||||
#define switch_core_db_temp_directory sqlite3_temp_directory
|
||||
#define switch_core_db_total_changes sqlite3_total_changes
|
||||
#define switch_core_db_trace sqlite3_trace
|
||||
#define switch_core_db_transfer_bindings sqlite3_transfer_bindings
|
||||
#define switch_core_db_user_data sqlite3_user_data
|
||||
#define switch_core_db_value_blob sqlite3_value_blob
|
||||
#define switch_core_db_value_bytes sqlite3_value_bytes
|
||||
#define switch_core_db_value_bytes16 sqlite3_value_bytes16
|
||||
#define switch_core_db_value_double sqlite3_value_double
|
||||
#define switch_core_db_value_int sqlite3_value_int
|
||||
#define switch_core_db_value_int64 sqlite3_value_int64
|
||||
#define switch_core_db_value_text sqlite3_value_text
|
||||
#define switch_core_db_value_text16 sqlite3_value_text16
|
||||
#define switch_core_db_value_text16be sqlite3_value_text16be
|
||||
#define switch_core_db_value_text16le sqlite3_value_text16le
|
||||
#define switch_core_db_value_type sqlite3_value_type
|
||||
#define switch_core_db_version sqlite3_version
|
||||
#define switch_core_db_vmprintf sqlite3_vmprintf
|
||||
|
||||
|
||||
/* things we don't deserve to know about */
|
||||
struct switch_channel;
|
||||
struct switch_core_session;
|
||||
|
||||
Reference in New Issue
Block a user