mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 14:28:34 +00:00
part 2 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1294 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
e92ca062aa
commit
73a3adac8f
53 files changed
+959
-956
No files matched your search
@@ -80,12 +80,12 @@ static struct {
|
||||
|
||||
struct private_object {
|
||||
unsigned int flags;
|
||||
switch_codec read_codec;
|
||||
switch_codec write_codec;
|
||||
struct switch_frame read_frame;
|
||||
switch_codec_t read_codec;
|
||||
switch_codec_t write_codec;
|
||||
switch_frame_t read_frame;
|
||||
unsigned char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||
switch_core_session *session;
|
||||
switch_caller_profile *caller_profile;
|
||||
switch_core_session_t *session;
|
||||
switch_caller_profile_t *caller_profile;
|
||||
char call_id[50];
|
||||
PaError err;
|
||||
PABLIO_Stream *audio_in;
|
||||
@@ -98,19 +98,19 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
|
||||
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_name, globals.cid_name)
|
||||
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_cid_num, globals.cid_num)
|
||||
|
||||
static switch_status channel_on_init(switch_core_session *session);
|
||||
static switch_status channel_on_hangup(switch_core_session *session);
|
||||
static switch_status channel_on_ring(switch_core_session *session);
|
||||
static switch_status channel_on_loopback(switch_core_session *session);
|
||||
static switch_status channel_on_transmit(switch_core_session *session);
|
||||
static switch_status channel_outgoing_channel(switch_core_session *session,
|
||||
switch_caller_profile *outbound_profile,
|
||||
switch_core_session **new_session, switch_memory_pool_t *pool);
|
||||
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
|
||||
static switch_status channel_on_init(switch_core_session_t *session);
|
||||
static switch_status channel_on_hangup(switch_core_session_t *session);
|
||||
static switch_status channel_on_ring(switch_core_session_t *session);
|
||||
static switch_status channel_on_loopback(switch_core_session_t *session);
|
||||
static switch_status channel_on_transmit(switch_core_session_t *session);
|
||||
static switch_status channel_outgoing_channel(switch_core_session_t *session,
|
||||
switch_caller_profile_t *outbound_profile,
|
||||
switch_core_session_t **new_session, switch_memory_pool_t *pool);
|
||||
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
|
||||
switch_io_flag flags, int stream_id);
|
||||
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
|
||||
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
|
||||
switch_io_flag flags, int stream_id);
|
||||
static switch_status channel_kill_channel(switch_core_session *session, int sig);
|
||||
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
|
||||
static switch_status engage_device(struct private_object *tech_pvt);
|
||||
static int dump_info(void);
|
||||
static switch_status load_config(void);
|
||||
@@ -126,9 +126,9 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
|
||||
returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
|
||||
so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
|
||||
*/
|
||||
static switch_status channel_on_init(switch_core_session *session)
|
||||
static switch_status channel_on_init(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel *channel;
|
||||
switch_channel_t *channel;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
tech_pvt = switch_core_session_get_private(session);
|
||||
@@ -148,9 +148,9 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_on_ring(switch_core_session *session)
|
||||
static switch_status channel_on_ring(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
@@ -164,10 +164,10 @@ static switch_status channel_on_ring(switch_core_session *session)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_on_execute(switch_core_session *session)
|
||||
static switch_status channel_on_execute(switch_core_session_t *session)
|
||||
{
|
||||
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
@@ -196,9 +196,9 @@ static void deactivate_audio_device(struct private_object *tech_pvt)
|
||||
switch_mutex_unlock(globals.device_lock);
|
||||
}
|
||||
|
||||
static switch_status channel_on_hangup(switch_core_session *session)
|
||||
static switch_status channel_on_hangup(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
@@ -220,9 +220,9 @@ static switch_status channel_on_hangup(switch_core_session *session)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_kill_channel(switch_core_session *session, int sig)
|
||||
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
@@ -241,15 +241,15 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_on_loopback(switch_core_session *session)
|
||||
static switch_status channel_on_loopback(switch_core_session_t *session)
|
||||
{
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_on_transmit(switch_core_session *session)
|
||||
static switch_status channel_on_transmit(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_time_t last;
|
||||
int waitsec = 5 * 1000000;
|
||||
@@ -291,7 +291,7 @@ static switch_status channel_on_transmit(switch_core_session *session)
|
||||
}
|
||||
|
||||
|
||||
static switch_status channel_waitfor_read(switch_core_session *session, int ms, int stream_id)
|
||||
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
@@ -301,7 +301,7 @@ static switch_status channel_waitfor_read(switch_core_session *session, int ms,
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_waitfor_write(switch_core_session *session, int ms, int stream_id)
|
||||
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
@@ -312,7 +312,7 @@ static switch_status channel_waitfor_write(switch_core_session *session, int ms,
|
||||
|
||||
}
|
||||
|
||||
static switch_status channel_send_dtmf(switch_core_session *session, char *dtmf)
|
||||
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
|
||||
@@ -324,10 +324,10 @@ static switch_status channel_send_dtmf(switch_core_session *session, char *dtmf)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status channel_read_frame(switch_core_session *session, switch_frame **frame, int timeout,
|
||||
static switch_status channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
|
||||
switch_io_flag flags, int stream_id)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
int samples;
|
||||
switch_status status = SWITCH_STATUS_FALSE;
|
||||
@@ -358,10 +358,10 @@ static switch_status channel_read_frame(switch_core_session *session, switch_fra
|
||||
return status;
|
||||
}
|
||||
|
||||
static switch_status channel_write_frame(switch_core_session *session, switch_frame *frame, int timeout,
|
||||
static switch_status channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
|
||||
switch_io_flag flags, int stream_id)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_status status = SWITCH_STATUS_FALSE;
|
||||
channel = switch_core_session_get_channel(session);
|
||||
@@ -384,10 +384,10 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
|
||||
|
||||
}
|
||||
|
||||
static switch_status channel_answer_channel(switch_core_session *session)
|
||||
static switch_status channel_answer_channel(switch_core_session_t *session)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
@@ -434,7 +434,7 @@ static struct switch_api_interface channel_api_interface = {
|
||||
/*.next */ &channel_hup_interface
|
||||
};
|
||||
|
||||
static const switch_state_handler_table channel_event_handlers = {
|
||||
static const switch_state_handler_table_t channel_event_handlers = {
|
||||
/*.on_init */ channel_on_init,
|
||||
/*.on_ring */ channel_on_ring,
|
||||
/*.on_execute */ channel_on_execute,
|
||||
@@ -475,13 +475,13 @@ static const switch_loadable_module_interface channel_module_interface = {
|
||||
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
|
||||
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
|
||||
*/
|
||||
static switch_status channel_outgoing_channel(switch_core_session *session, switch_caller_profile *outbound_profile,
|
||||
switch_core_session **new_session, switch_memory_pool_t *pool)
|
||||
static switch_status channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
|
||||
switch_core_session_t **new_session, switch_memory_pool_t *pool)
|
||||
{
|
||||
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel;
|
||||
switch_caller_profile *caller_profile;
|
||||
switch_channel_t *channel;
|
||||
switch_caller_profile_t *caller_profile;
|
||||
|
||||
switch_core_session_add_stream(*new_session, NULL);
|
||||
if ((tech_pvt =
|
||||
@@ -554,7 +554,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
|
||||
|
||||
static switch_status load_config(void)
|
||||
{
|
||||
switch_config cfg;
|
||||
switch_config_t cfg;
|
||||
char *var, *val;
|
||||
char *cf = "portaudio.conf";
|
||||
|
||||
@@ -715,7 +715,7 @@ static switch_status engage_device(struct private_object *tech_pvt)
|
||||
int sample_rate = globals.sample_rate;
|
||||
int codec_ms = 20;
|
||||
|
||||
switch_channel *channel;
|
||||
switch_channel_t *channel;
|
||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
assert(channel != NULL);
|
||||
|
||||
@@ -782,7 +782,7 @@ static switch_status engage_device(struct private_object *tech_pvt)
|
||||
|
||||
static switch_status place_call(char *dest, char *out, size_t outlen)
|
||||
{
|
||||
switch_core_session *session;
|
||||
switch_core_session_t *session;
|
||||
switch_status status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if (!dest) {
|
||||
@@ -794,7 +794,7 @@ static switch_status place_call(char *dest, char *out, size_t outlen)
|
||||
|
||||
if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel;
|
||||
switch_channel_t *channel;
|
||||
|
||||
switch_core_session_add_stream(session, NULL);
|
||||
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(struct private_object))) != 0) {
|
||||
@@ -834,7 +834,7 @@ static switch_status place_call(char *dest, char *out, size_t outlen)
|
||||
static switch_status hup_call(char *callid, char *out, size_t outlen)
|
||||
{
|
||||
struct private_object *tech_pvt;
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
char tmp[50];
|
||||
|
||||
if (callid && !strcasecmp(callid, "last")) {
|
||||
@@ -878,7 +878,7 @@ static switch_status hup_call(char *callid, char *out, size_t outlen)
|
||||
static switch_status send_dtmf(char *callid, char *out, size_t outlen)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
char *dtmf;
|
||||
|
||||
if ((dtmf = strchr(callid, ' ')) != 0) {
|
||||
@@ -902,7 +902,7 @@ static switch_status send_dtmf(char *callid, char *out, size_t outlen)
|
||||
static switch_status answer_call(char *callid, char *out, size_t outlen)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
|
||||
if ((tech_pvt = switch_core_hash_find(globals.call_hash, callid)) != 0) {
|
||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
@@ -918,7 +918,7 @@ static switch_status answer_call(char *callid, char *out, size_t outlen)
|
||||
|
||||
static void print_info(struct private_object *tech_pvt, char *out, size_t outlen)
|
||||
{
|
||||
switch_channel *channel = NULL;
|
||||
switch_channel_t *channel = NULL;
|
||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
assert(channel != NULL);
|
||||
|
||||
|
||||
Reference in new issue
Block a user