part 3 of 3 standardizing typedefed types to end in _t.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1300 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-04-29 23:43:28 +00:00
parent 76f4a10a18
commit 14fee78470
60 changed files with 957 additions and 957 deletions

View File

@ -1390,7 +1390,7 @@ typedef apr_thread_mutex_t switch_mutex_t;
* most optimial mutex based on a given platform's performance charateristics,
* it will behave as either a nested or an unnested lock.
*
SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t **lock,
switch_lock_flag flags,
switch_memory_pool_t *pool);
*/
@ -1399,7 +1399,7 @@ SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
* Destroy the mutex and free the memory associated with the lock.
* @param lock the mutex to destroy.
*/
//SWITCH_DECLARE(switch_status) switch_mutex_destroy(switch_mutex_t *lock);
//SWITCH_DECLARE(switch_status_t) switch_mutex_destroy(switch_mutex_t *lock);
#define switch_mutex_destroy apr_thread_mutex_destroy
/**
@ -1407,14 +1407,14 @@ SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
* the current thread will be put to sleep until the lock becomes available.
* @param lock the mutex on which to acquire the lock.
*/
//SWITCH_DECLARE(switch_status) switch_mutex_lock(switch_mutex_t *lock);
//SWITCH_DECLARE(switch_status_t) switch_mutex_lock(switch_mutex_t *lock);
#define switch_mutex_lock apr_thread_mutex_lock
/**
* Release the lock for the given mutex.
* @param lock the mutex from which to release the lock.
*/
//SWITCH_DECLARE(switch_status) switch_mutex_unlock(switch_mutex_t *lock);
//SWITCH_DECLARE(switch_status_t) switch_mutex_unlock(switch_mutex_t *lock);
#define switch_mutex_unlock apr_thread_mutex_unlock
/**
@ -1424,7 +1424,7 @@ SWITCH_DECLARE(switch_status) switch_mutex_init(switch_mutex_t **lock,
* if the return value was APR_EBUSY, for portability reasons.
* @param lock the mutex on which to attempt the lock acquiring.
*/
//SWITCH_DECLARE(switch_status) switch_mutex_trylock(switch_mutex_t *lock);
//SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t *lock);
#define switch_mutex_trylock apr_thread_mutex_trylock
/** @} */

View File

@ -60,7 +60,7 @@ struct switch_buffer;
* \param max_len length required by the buffer
* \return status
*/
SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len);
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len);
/*! \brief Get the length of a switch_buffer_t
* \param buffer any buffer of type switch_buffer_t

View File

@ -94,7 +94,7 @@ struct switch_caller_application {
/*! An optional argument string to pass to the application */
char *application_data;
/*! A function pointer to the application */
switch_application_function application_function;
switch_application_function_t application_function;
struct switch_caller_application *next;
};

View File

@ -64,7 +64,7 @@ typedef struct switch_channel_timetable switch_channel_timetable_t;
\param channel channel to retrieve state from
\return current state of channel
*/
SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel_t *channel);
SWITCH_DECLARE(switch_channel_state_t) switch_channel_get_state(switch_channel_t *channel);
/*!
\brief Determine if a channel is ready for io
@ -74,11 +74,11 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel_t *
SWITCH_DECLARE(unsigned int) switch_channel_ready(switch_channel_t *channel);
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_set_state(switch_channel_t *channel,
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_channel_t *channel,
const char *file,
const char *func,
int line,
switch_channel_state state);
switch_channel_state_t state);
/*!
\brief Set the current state of a channel
@ -122,7 +122,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch
\param pool memory_pool to use for allocation
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool);
/*!
\brief Connect a newly allocated channel to a session object and setup it's initial state
@ -131,9 +131,9 @@ SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel_t **channel, s
\param state the initial state of the channel
\param flags the initial channel flags
*/
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel,
switch_core_session_t *session,
switch_channel_state state,
switch_channel_state_t state,
uint32_t flags);
/*!
@ -193,7 +193,7 @@ SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel);
\param value the vaule of the variable
\returns SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value);
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value);
/*!
\brief Retrieve a variable from a given channel
@ -223,23 +223,23 @@ SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(
\param flags or'd list of channel flags to test
\return TRUE if flags were present
*/
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag flags);
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag_t flags);
/*!
\brief Set given flag(s) on a given channel
\param channel channel on which to set flag(s)
\param flags or'd list of flags to set
*/
SWITCH_DECLARE(void) switch_channel_set_flag(switch_channel_t *channel, switch_channel_flag flags);
SWITCH_DECLARE(void) switch_channel_set_flag(switch_channel_t *channel, switch_channel_flag_t flags);
/*!
\brief Clear given flag(s) from a channel
\param channel channel to clear flags from
\param flags or'd list of flags to clear
*/
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag flags);
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag_t flags);
SWITCH_DECLARE(switch_status) switch_channel_perform_answer(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel,
const char *file,
const char *func,
int line);
@ -252,7 +252,7 @@ SWITCH_DECLARE(switch_status) switch_channel_perform_answer(switch_channel_t *ch
SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel,
const char *file,
const char *func,
int line);
@ -292,7 +292,7 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_channel_get_state_ha
\param private_info void pointer to private data
\return SWITCH_STATUS_SUCCESS if data was set
*/
SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel_t *channel, void *private_info);
SWITCH_DECLARE(switch_status_t) switch_channel_set_private(switch_channel_t *channel, void *private_info);
/*!
\brief Retrieve private from a given channel
@ -307,7 +307,7 @@ SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel_t *channel);
\param name name to assign
\return SWITCH_STATUS_SUCCESS if name was assigned
*/
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel_t *channel, char *name);
SWITCH_DECLARE(switch_status_t) switch_channel_set_name(switch_channel_t *channel, char *name);
/*!
\brief Retrieve the name of a given channel
@ -317,7 +317,7 @@ SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel_t *channel,
SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel_t *channel);
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channel_t *channel,
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_channel_t *channel,
const char *file,
const char *func,
int line,
@ -344,7 +344,7 @@ SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel)
\param dtmf string of digits to queue
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel_t *channel, char *dtmf);
SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *channel, char *dtmf);
/*!
\brief Retrieve DTMF digits from a given channel
@ -360,7 +360,7 @@ SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel_t *chan
\param state state to get name of
\return the string representation of the state
*/
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state state);
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t state);
/*!
\brief Add information about a given channel to an event object
@ -371,8 +371,8 @@ SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, sw
// These may go away
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode (switch_channel_t *channel, int freq, int bits, int channels, int ms, int kbps);
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode (switch_channel_t *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode (switch_channel_t *channel, int freq, int bits, int channels, int ms, int kbps);
SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode (switch_channel_t *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
/** @} */
END_EXTERN_C

View File

@ -51,7 +51,7 @@ SWITCH_DECLARE(void) switch_console_loop(void);
/*!
\brief A method akin to printf that allows you to redirect output to a specific console "channel"
*/
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line, char *fmt, ...);
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, char *file, const char *func, int line, char *fmt, ...);
END_EXTERN_C

View File

@ -103,13 +103,13 @@ struct switch_core_runtime;
\param console optional FILE stream for output
\note to be called at application startup
*/
SWITCH_DECLARE(switch_status) switch_core_init(char *console);
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console);
/*!
\brief Destroy the core
\note to be called at application shutdown
*/
SWITCH_DECLARE(switch_status) switch_core_destroy(void);
SWITCH_DECLARE(switch_status_t) switch_core_destroy(void);
///\}
@ -121,7 +121,7 @@ SWITCH_DECLARE(switch_status) switch_core_destroy(void);
\param session the session to acquire from
\return success if it is safe to read from the session
*/
SWITCH_DECLARE(switch_status) switch_core_session_read_lock(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session);
/*!
\brief Acquire a write lock on the session
@ -162,13 +162,13 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl
\brief Create a new sub memory pool from the core's master pool
\return SWITCH_STATUS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_core_new_memory_pool(switch_memory_pool_t **pool);
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool);
/*!
\brief Returns a subpool back to the main pool
\return SWITCH_STATUS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_core_destroy_memory_pool(switch_memory_pool_t **pool);
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool);
/*!
\brief Start the session's state machine
@ -248,7 +248,7 @@ SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_
\param pool the pool to use for the allocation (a new one will be used if NULL)
\return the newly created session
*/
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface *endpoint_interface, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t *endpoint_interface, switch_memory_pool_t *pool);
/*!
\brief Destroy a session and return the memory pool to the core
@ -304,7 +304,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_st
\param message the switch_core_session_message_t object to send
\return the status returned by the message handler
*/
SWITCH_DECLARE (switch_status) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message);
SWITCH_DECLARE (switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message);
/*!
\brief Queue an event on another session using its uuid
@ -312,7 +312,7 @@ SWITCH_DECLARE (switch_status) switch_core_session_message_send(char *uuid_str,
\param event the event to send
\return the status returned by the message handler
*/
SWITCH_DECLARE(switch_status) switch_core_session_event_send(char *uuid_str, switch_event_t *event);
SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t *event);
/*!
\brief Retrieve private user data from a session
@ -327,7 +327,7 @@ SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session_t *se
\param private_info the used data to add
\return SWITCH_STATUS_SUCCESS if data is added
*/
SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session_t *session, void *private_info);
SWITCH_DECLARE(switch_status_t) switch_core_session_set_private(switch_core_session_t *session, void *private_info);
/*!
\brief Add a logical stream to a session
@ -383,7 +383,7 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session,
\param pool optional existing memory pool to donate to the session
\return SWITCH_STATUS_SUCCESS if the session was created
*/
SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name,
switch_caller_profile_t *caller_profile,
switch_core_session_t **new_session,
@ -394,7 +394,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_s
\param session the session to answer the channel of
\return SWITCH_STATUS_SUCCESS if the channel was answered
*/
SWITCH_DECLARE(switch_status) switch_core_session_answer_channel(switch_core_session_t *session);
SWITCH_DECLARE(switch_status_t) switch_core_session_answer_channel(switch_core_session_t *session);
/*!
\brief Receive a message on a given session
@ -402,7 +402,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_answer_channel(switch_core_ses
\param message the message to recieve
\return the status returned by the message handler
*/
SWITCH_DECLARE(switch_status) switch_core_session_receive_message(switch_core_session_t *session, switch_core_session_message_t *message);
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_message(switch_core_session_t *session, switch_core_session_message_t *message);
/*!
\brief Queue an event on a given session
@ -410,7 +410,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_receive_message(switch_core_se
\param event the event to queue
\return the status returned by the message handler
*/
SWITCH_DECLARE(switch_status) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event);
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event);
/*!
\brief Read a frame from a session
@ -420,7 +420,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_queue_event(switch_core_sessio
\param stream_id which logical media channel to use
\return SWITCH_STATUS_SUCCESS a the frame was read
*/
SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout, int stream_id);
/*!
\brief Write a frame to a session
@ -430,14 +430,14 @@ SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session
\param stream_id which logical media channel to use
\return SWITCH_STATUS_SUCCESS a the frame was written
*/
SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_core_session_t *session,
const char *file,
const char *func,
int line,
switch_signal sig);
switch_signal_t sig);
/*!
\brief Send a signal to a channel
\param session session to send signal to
@ -453,7 +453,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_co
\param stream_id which logical media channel to use
\return SWITCH_STATUS_SUCCESS if data is available for read within timeframe specified
*/
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout, int stream_id);
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout, int stream_id);
/*!
\brief Wait for a session to be ready for output
@ -462,7 +462,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_waitfor_read(switch_core_sessi
\param stream_id which logical media channel to use
\return SWITCH_STATUS_SUCCESS if the session is available for write within timeframe specified
*/
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout, int stream_id);
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout, int stream_id);
/*!
\brief Send DTMF to a session
@ -470,7 +470,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_sess
\param dtmf string to send to the session
\return SWITCH_STATUS_SUCCESS if the dtmf was written
*/
SWITCH_DECLARE(switch_status) switch_core_session_send_dtmf(switch_core_session_t *session, char *dtmf);
SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_session_t *session, char *dtmf);
/*!
\brief Add an event hook to be executed when a session requests an outgoing extension
@ -478,7 +478,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_send_dtmf(switch_core_session_
\param outgoing_channel hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch_core_session_t *session, switch_outgoing_channel_hook outgoing_channel);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_outgoing(switch_core_session_t *session, switch_outgoing_channel_hook_t outgoing_channel);
///\}
///\defgroup shooks Session Hook Callbacks
@ -490,7 +490,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch
\param answer_channel hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(switch_core_session_t *session, switch_answer_channel_hook answer_channel);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_answer_channel(switch_core_session_t *session, switch_answer_channel_hook_t answer_channel);
/*!
\brief Add an event hook to be executed when a session sends a message
@ -498,7 +498,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(
\param receive_message hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_receive_message(switch_core_session_t *session, switch_receive_message_hook receive_message);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_receive_message(switch_core_session_t *session, switch_receive_message_hook_t receive_message);
/*!
\brief Add an event hook to be executed when a session reads a frame
@ -506,7 +506,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_receive_message
\param read_frame hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(switch_core_session_t *session, switch_read_frame_hook read_frame);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_read_frame(switch_core_session_t *session, switch_read_frame_hook_t read_frame);
/*!
\brief Add an event hook to be executed when a session writes a frame
@ -514,7 +514,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(swit
\param write_frame hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(switch_core_session_t *session, switch_write_frame_hook write_frame);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_write_frame(switch_core_session_t *session, switch_write_frame_hook_t write_frame);
/*!
\brief Add an event hook to be executed when a session kills a channel
@ -522,7 +522,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(swi
\param kill_channel hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(switch_core_session_t *session, switch_kill_channel_hook kill_channel);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_kill_channel(switch_core_session_t *session, switch_kill_channel_hook_t kill_channel);
/*!
\brief Add an event hook to be executed when a session waits for a read event
@ -530,7 +530,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(sw
\param waitfor_read hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(switch_core_session_t *session, switch_waitfor_read_hook waitfor_read);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_waitfor_read(switch_core_session_t *session, switch_waitfor_read_hook_t waitfor_read);
/*!
\brief Add an event hook to be executed when a session waits for a write event
@ -538,7 +538,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(sw
\param waitfor_write hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(switch_core_session_t *session, switch_waitfor_write_hook waitfor_write);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_waitfor_write(switch_core_session_t *session, switch_waitfor_write_hook_t waitfor_write);
/*!
\brief Add an event hook to be executed when a session sends dtmf
@ -546,7 +546,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(s
\param send_dtmf hook to bind
\return SWITCH_STATUS_SUCCESS on suceess
*/
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_send_dtmf(switch_core_session_t *session, switch_send_dtmf_hook send_dtmf);
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_send_dtmf(switch_core_session_t *session, switch_send_dtmf_hook_t send_dtmf);
///\}
///\defgroup hashf Hash Functions
@ -558,14 +558,14 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_send_dtmf(switc
\param pool the pool to use for the new hash
\return SWITCH_STATUS_SUCCESS if the hash is created
*/
SWITCH_DECLARE(switch_status) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool);
/*!
\brief Destroy an existing hash table
\param hash the hash to destroy
\return SWITCH_STATUS_SUCCESS if the hash is destroyed
*/
SWITCH_DECLARE(switch_status) switch_core_hash_destroy(switch_hash_t *hash);
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t *hash);
/*!
\brief Insert data into a hash
@ -575,7 +575,7 @@ SWITCH_DECLARE(switch_status) switch_core_hash_destroy(switch_hash_t *hash);
\return SWITCH_STATUS_SUCCESS if the data is added
\note the string key must be a constant or a dynamic string
*/
SWITCH_DECLARE(switch_status) switch_core_hash_insert(switch_hash_t *hash, char *key, void *data);
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t *hash, char *key, void *data);
/*!
\brief Insert data into a hash with dynamicly allocated key name
@ -584,7 +584,7 @@ SWITCH_DECLARE(switch_status) switch_core_hash_insert(switch_hash_t *hash, char
\param data the data to add
\return SWITCH_STATUS_SUCCESS if the data is added
*/
SWITCH_DECLARE(switch_status) switch_core_hash_insert_dup(switch_hash_t *hash, char *key, void *data);
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_dup(switch_hash_t *hash, char *key, void *data);
/*!
\brief Delete data from a hash based on desired key
@ -592,7 +592,7 @@ SWITCH_DECLARE(switch_status) switch_core_hash_insert_dup(switch_hash_t *hash, c
\param key the key from which to delete the data
\return SWITCH_STATUS_SUCCESS if the data is deleted
*/
SWITCH_DECLARE(switch_status) switch_core_hash_delete(switch_hash_t *hash, char *key);
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, char *key);
/*!
\brief Retrieve data from a given hash
@ -615,7 +615,7 @@ SWITCH_DECLARE(void *) switch_core_hash_find(switch_hash_t *hash, char *key);
\param pool the memory pool to use for allocation
\return
*/
SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool);
/*!
\brief Wait for one cycle on an existing timer
@ -629,7 +629,7 @@ SWITCH_DECLARE(int) switch_core_timer_next(switch_timer_t *timer);
\param timer timer to destroy
\return SWITCH_STATUS_SUCCESS after destruction
*/
SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer_t *timer);
SWITCH_DECLARE(switch_status_t) switch_core_timer_destroy(switch_timer_t *timer);
///\}
///\defgroup codecs Codec Functions
@ -647,7 +647,7 @@ SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer_t *timer);
\param pool the memory pool to use
\return SWITCH_STATUS_SUCCESS if the handle is allocated
*/
SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec_t *codec,
SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec,
char *codec_name,
uint32_t rate,
int ms,
@ -670,7 +670,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec_t *codec,
\return SWITCH_STATUS_SUCCESS if the data was encoded
\note encoded_data_len will be rewritten to the in-use size of encoded_data
*/
SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec_t *codec,
SWITCH_DECLARE(switch_status_t) switch_core_codec_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -694,7 +694,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec_t *codec,
\return SWITCH_STATUS_SUCCESS if the data was decoded
\note decoded_data_len will be rewritten to the in-use size of decoded_data
*/
SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec_t *codec,
SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -709,7 +709,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec_t *codec,
\param codec the codec handle to destroy
\return SWITCH_STATUS_SUCCESS if the codec was destroyed
*/
SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec_t *codec);
SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec);
/*!
\brief Assign the read codec to a given session
@ -717,7 +717,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec_t *codec);
\param codec the codec to add
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec);
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec);
/*!
\brief Retrieve the read codec from a given session
@ -732,7 +732,7 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_read_codec(switch_core_
\param codec the codec to add
\return SWITCH_STATUS_SUCCESS if successful
*/
SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec);
SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec);
/*!
\brief Retrieve the write codec from a given session
@ -772,7 +772,7 @@ SWITCH_DECLARE(switch_core_db *) switch_core_db_open_file(char *filename);
\return SWITCH_STATUS_SUCCESS if the file is opened
\note the loadable module used is chosen based on the file extension
*/
SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle_t *fh, char *file_path, unsigned int flags, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, char *file_path, unsigned int flags, switch_memory_pool_t *pool);
/*!
\brief Read media from a file handle
@ -781,7 +781,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle_t *fh, ch
\param len the max size of the buffer
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes read if successful
*/
SWITCH_DECLARE(switch_status) switch_core_file_read(switch_file_handle_t *fh, void *data, switch_size_t *len);
SWITCH_DECLARE(switch_status_t) switch_core_file_read(switch_file_handle_t *fh, void *data, switch_size_t *len);
/*!
\brief Write media to a file handle
@ -790,7 +790,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_read(switch_file_handle_t *fh, vo
\param len the amount of data to write from the buffer
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes written if successful
*/
SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle_t *fh, void *data, switch_size_t *len);
SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh, void *data, switch_size_t *len);
/*!
\brief Seek a position in a file
@ -800,14 +800,14 @@ SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle_t *fh, v
\param whence the indicator (see traditional seek)
\return SWITCH_STATUS_SUCCESS with cur_pos adjusted to new position
*/
SWITCH_DECLARE(switch_status) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples, int whence);
SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples, int whence);
/*!
\brief Close an open file handle
\param fh the file handle to close
\return SWITCH_STATUS_SUCCESS if the file handle was closed
*/
SWITCH_DECLARE(switch_status) switch_core_file_close(switch_file_handle_t *fh);
SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh);
///\}
///\defgroup speech ASR/TTS Functions
@ -823,11 +823,11 @@ SWITCH_DECLARE(switch_status) switch_core_file_close(switch_file_handle_t *fh);
\param pool the pool to use (NULL for new pool)
\return SWITCH_STATUS_SUCCESS if the handle is opened
*/
SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh,
char *module_name,
char *voice_name,
unsigned int rate,
switch_speech_flag *flags,
switch_speech_flag_t *flags,
switch_memory_pool_t *pool);
/*!
@ -839,7 +839,7 @@ SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
\param flags flags in/out for fine tuning
\return SWITCH_STATUS_SUCCESS with possible new flags on success
*/
SWITCH_DECLARE(switch_status) switch_core_speech_feed_asr(switch_speech_handle *sh, void *data, unsigned int *len, int rate, switch_speech_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_asr(switch_speech_handle_t *sh, void *data, unsigned int *len, int rate, switch_speech_flag_t *flags);
/*!
\brief Get text back from the ASR module
@ -849,7 +849,7 @@ SWITCH_DECLARE(switch_status) switch_core_speech_feed_asr(switch_speech_handle *
\param flags flags in/out for fine tuning
\return SWITCH_STATUS_SUCCESS with possible new flags on success
*/
SWITCH_DECLARE(switch_status) switch_core_speech_interpret_asr(switch_speech_handle *sh, char *buf, unsigned int buflen, switch_speech_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_core_speech_interpret_asr(switch_speech_handle_t *sh, char *buf, unsigned int buflen, switch_speech_flag_t *flags);
/*!
\brief Feed text to the TTS module
@ -858,7 +858,7 @@ SWITCH_DECLARE(switch_status) switch_core_speech_interpret_asr(switch_speech_han
\param flags flags in/out for fine tuning
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes written if successful
*/
SWITCH_DECLARE(switch_status) switch_core_speech_feed_tts(switch_speech_handle *sh, char *text, switch_speech_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
/*!
\brief Read rendered audio from the TTS module
@ -869,18 +869,18 @@ SWITCH_DECLARE(switch_status) switch_core_speech_feed_tts(switch_speech_handle *
\param flags flags in/out for fine tuning
\return SWITCH_STATUS_SUCCESS with len adjusted to the bytes written if successful
*/
SWITCH_DECLARE(switch_status) switch_core_speech_read_tts(switch_speech_handle *sh,
SWITCH_DECLARE(switch_status_t) switch_core_speech_read_tts(switch_speech_handle_t *sh,
void *data,
switch_size_t *datalen,
uint32_t *rate,
switch_speech_flag *flags);
switch_speech_flag_t *flags);
/*!
\brief Close an open speech handle
\param sh the speech handle to close
\param flags flags in/out for fine tuning
\return SWITCH_STATUS_SUCCESS if the file handle was closed
*/
SWITCH_DECLARE(switch_status) switch_core_speech_close(switch_speech_handle *sh, switch_speech_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags);
///\}
@ -897,7 +897,7 @@ SWITCH_DECLARE(switch_status) switch_core_speech_close(switch_speech_handle *sh,
\param pool the pool to use (NULL for new pool)
\return SWITCH_STATUS_SUCCESS if the handle is opened
*/
SWITCH_DECLARE(switch_status) switch_core_directory_open(switch_directory_handle *dh,
SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh,
char *module_name,
char *source,
char *dsn,
@ -911,14 +911,14 @@ SWITCH_DECLARE(switch_status) switch_core_directory_open(switch_directory_handle
\param query a string of filters or query data
\return SWITCH_STATUS_SUCCESS if the query is successful
*/
SWITCH_DECLARE(switch_status) switch_core_directory_query(switch_directory_handle *dh, char *base, char *query);
SWITCH_DECLARE(switch_status_t) switch_core_directory_query(switch_directory_handle_t *dh, char *base, char *query);
/*!
\brief Obtain the next record in a lookup
\param dh a direcotry handle to use
\return SWITCH_STATUS_SUCCESS if another record exists
*/
SWITCH_DECLARE(switch_status) switch_core_directory_next(switch_directory_handle *dh);
SWITCH_DECLARE(switch_status_t) switch_core_directory_next(switch_directory_handle_t *dh);
/*!
\brief Obtain the next name/value pair in the current record
@ -927,14 +927,14 @@ SWITCH_DECLARE(switch_status) switch_core_directory_next(switch_directory_handle
\param val a pointer to poinbter of the value to fill in
\return SWITCH_STATUS_SUCCESS if an item exists
*/
SWITCH_DECLARE(switch_status) switch_core_directory_next_pair(switch_directory_handle *dh, char **var, char **val);
SWITCH_DECLARE(switch_status_t) switch_core_directory_next_pair(switch_directory_handle_t *dh, char **var, char **val);
/*!
\brief Close an open directory handle
\param dh a direcotry handle to close
\return SWITCH_STATUS_SUCCESS if handle was closed
*/
SWITCH_DECLARE(switch_status) switch_core_directory_close(switch_directory_handle *dh);
SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_handle_t *dh);
///\}
@ -946,13 +946,13 @@ SWITCH_DECLARE(switch_status) switch_core_directory_close(switch_directory_handl
\param channel text channel enumeration
\return a FILE stream
*/
SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel channel);
SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel_t channel);
/*!
\brief Set the output console to the desired file
\param console the file path
*/
SWITCH_DECLARE(switch_status) switch_core_set_console(char *console);
SWITCH_DECLARE(switch_status_t) switch_core_set_console(char *console);
/*!
\brief Get the output console

View File

@ -122,13 +122,13 @@ struct switch_event_node {
\param pool the memory pool to use for the event system (creates a new one if NULL)
\return SWITCH_STATUS_SUCCESS when complete
*/
SWITCH_DECLARE(switch_status) switch_event_init(switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool);
/*!
\brief Stop the eventing system
\return SWITCH_STATUS_SUCCESS when complete
*/
SWITCH_DECLARE(switch_status) switch_event_shutdown(void);
SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void);
/*!
\brief Create an event
@ -137,7 +137,7 @@ SWITCH_DECLARE(switch_status) switch_event_shutdown(void);
\param subclass_name the subclass name for custom event (only valid when event_id is SWITCH_EVENT_CUSTOM)
\return SWITCH_STATUS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, char *subclass_name);
SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event, switch_event_types_t event_id, char *subclass_name);
/*!
\brief Set the priority of an event
@ -145,7 +145,7 @@ SWITCH_DECLARE(switch_status) switch_event_create_subclass(switch_event_t **even
\param priority the event priority
\return SWITCH_STATUS_SUCCESS
*/
SWITCH_DECLARE(switch_status) switch_event_set_priority(switch_event_t *event, switch_priority_t priority);
SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event, switch_priority_t priority);
/*!
\brief Retrieve a header value from an event
@ -163,7 +163,7 @@ SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *head
\param fmt the value of the header (varargs see standard sprintf family)
\return SWITCH_STATUS_SUCCESS if the header was added
*/
SWITCH_DECLARE(switch_status) switch_event_add_header(switch_event_t *event, switch_stack_t stack, char *header_name, char *fmt, ...);
SWITCH_DECLARE(switch_status_t) switch_event_add_header(switch_event_t *event, switch_stack_t stack, char *header_name, char *fmt, ...);
/*!
\brief Destroy an event
@ -177,7 +177,7 @@ SWITCH_DECLARE(void) switch_event_destroy(switch_event_t **event);
\param todup an event to duplicate
\return SWITCH_STATUS_SUCCESS if the event was duplicated
*/
SWITCH_DECLARE(switch_status) switch_event_dup(switch_event_t **event, switch_event_t *todup);
SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_event_t *todup);
/*!
\brief Fire an event with full arguement list
@ -188,7 +188,7 @@ SWITCH_DECLARE(switch_status) switch_event_dup(switch_event_t **event, switch_ev
\param user_data optional private data to pass to the event handlers
\return
*/
SWITCH_DECLARE(switch_status) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data);
SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event, void *user_data);
/*!
\brief Bind an event callback to a specific event
@ -199,7 +199,7 @@ SWITCH_DECLARE(switch_status) switch_event_fire_detailed(char *file, char *func,
\param user_data optional user specific data to pass whenever the callback is invoked
\return SWITCH_STATUS_SUCCESS if the event was binded
*/
SWITCH_DECLARE(switch_status) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data);
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name, switch_event_callback_t callback, void *user_data);
/*!
\brief Render the name of an event id enumeration
@ -216,7 +216,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event);
\note There is nothing to enforce this but I reccommend using module::event_name for the subclass names
*/
SWITCH_DECLARE(switch_status) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name);
SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name);
/*!
\brief Render a string representation of an event sutable for printing or network transport
@ -227,13 +227,13 @@ SWITCH_DECLARE(switch_status) switch_event_reserve_subclass_detailed(char *owner
\return SWITCH_STATUS_SUCCESS if the operation was successful
\note the body supplied by this function will supersede an existing body the event may have
*/
SWITCH_DECLARE(switch_status) switch_event_serialize(switch_event_t *event, char *buf, switch_size_t buflen, char *fmt, ...);
SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, char *buf, switch_size_t buflen, char *fmt, ...);
/*!
\brief Determine if the event system has been initilized
\return SWITCH_STATUS_SUCCESS if the system is running
*/
SWITCH_DECLARE(switch_status) switch_event_running(void);
SWITCH_DECLARE(switch_status_t) switch_event_running(void);
/*!
\brief Add a body to an event
@ -242,7 +242,7 @@ SWITCH_DECLARE(switch_status) switch_event_running(void);
\return SWITCH_STATUS_SUCCESS if the body was added to the event
\note the body parameter can be shadowed by the switch_event_reserve_subclass_detailed function
*/
SWITCH_DECLARE(switch_status) switch_event_add_body(switch_event_t *event, char *fmt, ...);
SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, char *fmt, ...);
/*!

View File

@ -65,7 +65,7 @@ struct switch_frame {
/*! the timestamp of the frame */
uint32_t timestamp;
/*! frame flags */
switch_frame_flag flags;
switch_frame_flag_t flags;
};
END_EXTERN_C

View File

@ -58,8 +58,8 @@ BEGIN_EXTERN_C
\param buflen the size of buf
\return SWITCH_STATUS_SUCCESS to keep the collection moving.
*/
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_callback(switch_core_session_t *session,
switch_dtmf_callback_function dtmf_callback,
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@ -75,7 +75,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_callback(switch_core_ses
\param poll_channel flag to specify if you want the function to poll the channel while running
\return SWITCH_STATUS_SUCCESS to keep the collection moving.
*/
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session,
char *buf,
unsigned int buflen,
unsigned int maxdigits,
@ -96,11 +96,11 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
\return SWITCH_STATUS_SUCCESS if all is well
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop playback.
*/
SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
char *timer_name,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@ -117,10 +117,10 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *sessio
\return SWITCH_STATUS_SUCCESS if all is well
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop recording.
*/
SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen);
@ -138,12 +138,12 @@ SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *sess
\param buflen the len of buf
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session,
char *tts_name,
char *voice_name,
char *timer_name,
uint32_t rate,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
char *text,
void *buf,
unsigned int buflen);
@ -158,10 +158,10 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *sessi
\param peer_session_data data to pass to the DTMF callback for peer_session
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_session,
unsigned int timelimit,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *session_data,
void *peer_session_data);
@ -173,7 +173,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
\param dialplan the new dialplan (OPTIONAL, may be NULL)
\param context the new context (OPTIONAL, may be NULL)
*/
SWITCH_DECLARE(switch_status) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context);
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context);
/** @} */

View File

@ -56,30 +56,30 @@ struct switch_loadable_module_interface {
/*! the name of the module */
const char *module_name;
/*! the table of endpoints the module has implmented */
const switch_endpoint_interface *endpoint_interface;
const switch_endpoint_interface_t *endpoint_interface;
/*! the table of timers the module has implmented */
const switch_timer_interface *timer_interface;
const switch_timer_interface_t *timer_interface;
/*! the table of dialplans the module has implmented */
const switch_dialplan_interface *dialplan_interface;
const switch_dialplan_interface_t *dialplan_interface;
/*! the table of codecs the module has implmented */
const switch_codec_interface *codec_interface;
const switch_codec_interface_t *codec_interface;
/*! the table of applications the module has implmented */
const switch_application_interface *application_interface;
const switch_application_interface_t *application_interface;
/*! the table of api functions the module has implmented */
const switch_api_interface *api_interface;
const switch_api_interface_t *api_interface;
/*! the table of file formats the module has implmented */
const switch_file_interface *file_interface;
const switch_file_interface_t *file_interface;
/*! the table of speech interfaces the module has implmented */
const switch_speech_interface *speech_interface;
const switch_speech_interface_t *speech_interface;
/*! the table of directory interfaces the module has implmented */
const switch_directory_interface *directory_interface;
const switch_directory_interface_t *directory_interface;
};
/*!
\brief Initilize the module backend and load all the modules
\return SWITCH_STATUS_SUCCESS when complete
*/
SWITCH_DECLARE(switch_status) switch_loadable_module_init(void);
SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(void);
/*!
\brief Shutdown the module backend and call the shutdown routine in all loaded modules
@ -91,21 +91,21 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void);
\param name the name of the endpoint
\return the desired endpoint interface
*/
SWITCH_DECLARE(switch_endpoint_interface *) switch_loadable_module_get_endpoint_interface(char *name);
SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(char *name);
/*!
\brief Retrieve the codec interface by it's registered name
\param name the name of the codec
\return the desired codec interface
*/
SWITCH_DECLARE(switch_codec_interface *) switch_loadable_module_get_codec_interface(char *name);
SWITCH_DECLARE(switch_codec_interface_t *) switch_loadable_module_get_codec_interface(char *name);
/*!
\brief Retrieve the dialplan interface by it's registered name
\param name the name of the dialplan
\return the desired dialplan interface
*/
SWITCH_DECLARE(switch_dialplan_interface *) switch_loadable_module_get_dialplan_interface(char *name);
SWITCH_DECLARE(switch_dialplan_interface_t *) switch_loadable_module_get_dialplan_interface(char *name);
/*!
\brief build a dynamic module object and register it (for use in double embeded modules)
@ -116,7 +116,7 @@ SWITCH_DECLARE(switch_dialplan_interface *) switch_loadable_module_get_dialplan_
\return the resulting status
\note only use this function if you are making a module that in turn gateways module loading to another technology
*/
SWITCH_DECLARE(switch_status) switch_loadable_module_build_dynamic(char *filename,
SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filename,
switch_module_load_t switch_module_load,
switch_module_runtime_t switch_module_runtime,
switch_module_shutdown_t switch_module_shutdown);
@ -126,42 +126,42 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_build_dynamic(char *filenam
\param name the name of the timer
\return the desired timer interface
*/
SWITCH_DECLARE(switch_timer_interface *) switch_loadable_module_get_timer_interface(char *name);
SWITCH_DECLARE(switch_timer_interface_t *) switch_loadable_module_get_timer_interface(char *name);
/*!
\brief Retrieve the application interface by it's registered name
\param name the name of the application
\return the desired application interface
*/
SWITCH_DECLARE(switch_application_interface *) switch_loadable_module_get_application_interface(char *name);
SWITCH_DECLARE(switch_application_interface_t *) switch_loadable_module_get_application_interface(char *name);
/*!
\brief Retrieve the API interface by it's registered name
\param name the name of the API
\return the desired API interface
*/
SWITCH_DECLARE(switch_api_interface *) switch_loadable_module_get_api_interface(char *name);
SWITCH_DECLARE(switch_api_interface_t *) switch_loadable_module_get_api_interface(char *name);
/*!
\brief Retrieve the file format interface by it's registered name
\param name the name of the file format
\return the desired file format interface
*/
SWITCH_DECLARE(switch_file_interface *) switch_loadable_module_get_file_interface(char *name);
SWITCH_DECLARE(switch_file_interface_t *) switch_loadable_module_get_file_interface(char *name);
/*!
\brief Retrieve the speech interface by it's registered name
\param name the name of the speech interface
\return the desired speech interface
*/
SWITCH_DECLARE(switch_speech_interface *) switch_loadable_module_get_speech_interface(char *name);
SWITCH_DECLARE(switch_speech_interface_t *) switch_loadable_module_get_speech_interface(char *name);
/*!
\brief Retrieve the directory interface by it's registered name
\param name the name of the directory interface
\return the desired directory interface
*/
SWITCH_DECLARE(switch_directory_interface *) switch_loadable_module_get_directory_interface(char *name);
SWITCH_DECLARE(switch_directory_interface_t *) switch_loadable_module_get_directory_interface(char *name);
/*!
@ -172,7 +172,7 @@ SWITCH_DECLARE(switch_directory_interface *) switch_loadable_module_get_director
\return the number of elements added to the array
*/
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool,
switch_codec_interface **array,
switch_codec_interface_t **array,
int arraylen);
/*!
@ -184,7 +184,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool
\return the number of elements added to the array
\note this function only considers codecs that are listed in the "prefs" array and ignores the rest.
*/
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface **array,
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array,
int arraylen,
char **prefs,
int preflen);
@ -197,7 +197,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interf
\param len the length in bytes of retbuf
\return the status returned by the API call
*/
SWITCH_DECLARE(switch_status) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len);
SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len);
/*!
@ -206,7 +206,7 @@ SWITCH_DECLARE(switch_status) switch_api_execute(char *cmd, char *arg, char *ret
\param fname the file name of the module
\return the status
*/
SWITCH_DECLARE(switch_status) switch_loadable_module_load_module(char *dir, char *fname);
SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname);
/* Prototypes of module interface functions */
@ -216,19 +216,19 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_load_module(char *dir, char
\param filename the path to the module's dll or so file
\return SWITCH_STATUS_SUCCESS on a successful load
*/
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename);
SWITCH_MOD_DECLARE(switch_status) switch_module_reload(void);
SWITCH_MOD_DECLARE(switch_status) switch_module_pause(void);
SWITCH_MOD_DECLARE(switch_status) switch_module_resume(void);
SWITCH_MOD_DECLARE(switch_status) switch_module_status(void);
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_reload(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_pause(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_resume(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_status(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void);
/*!
\brief Shutdown a module
\return SWITCH_STATUS_SUCCESS on a successful shutdown
*/
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void);
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void);
///\}
END_EXTERN_C

View File

@ -59,14 +59,14 @@ typedef struct {
/*! The function where the message originated */
char *func;
/*! The log level of the message */
switch_log_level level;
switch_log_level_t level;
/*! The time when the log line was sent */
switch_time_t timestamp;
/*! A pointer to where the actual content of the message starts (skipping past the preformatted portion) */
char *content;
} switch_log_node;
} switch_log_node_t;
typedef switch_status (*switch_log_function)(const switch_log_node *node, switch_log_level level);
typedef switch_status_t (*switch_log_function_t)(const switch_log_node_t *node, switch_log_level_t level);
/*!
@ -74,13 +74,13 @@ typedef switch_status (*switch_log_function)(const switch_log_node *node, switch
\param pool the memory pool to use
\note to be called at application startup by the core
*/
SWITCH_DECLARE(switch_status) switch_log_init(switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool);
/*!
\brief Shut down the logging engine
\note to be called at application termination by the core
*/
SWITCH_DECLARE(switch_status) switch_log_shutdown(void);
SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void);
/*!
@ -94,27 +94,27 @@ SWITCH_DECLARE(switch_status) switch_log_shutdown(void);
\param ... variable args
\note there are channel macros to supply the first 4 parameters
*/
SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file, const char *func, int line, switch_log_level level, char *fmt, ...);
SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file, const char *func, int line, switch_log_level_t level, char *fmt, ...);
/*!
\brief Shut down the logging engine
\note to be called at application termination by the core
*/
SWITCH_DECLARE(switch_status) switch_log_bind_logger(switch_log_function function, switch_log_level level);
SWITCH_DECLARE(switch_status_t) switch_log_bind_logger(switch_log_function_t function, switch_log_level_t level);
/*!
\brief Return the name of the specified log level
\param level the level
\return the name of the log level
*/
SWITCH_DECLARE(const char *) switch_log_level2str(switch_log_level level);
SWITCH_DECLARE(const char *) switch_log_level2str(switch_log_level_t level);
/*!
\brief Return the level number of the specified log level name
\param str the name of the level
\return the log level
*/
SWITCH_DECLARE(switch_log_level) switch_log_str2level(const char *str);
SWITCH_DECLARE(switch_log_level_t) switch_log_str2level(const char *str);
///\}
END_EXTERN_C

View File

@ -47,137 +47,137 @@ BEGIN_EXTERN_C
*/
struct switch_state_handler_table {
/*! executed when the state changes to init */
switch_state_handler on_init;
switch_state_handler_t on_init;
/*! executed when the state changes to ring */
switch_state_handler on_ring;
switch_state_handler_t on_ring;
/*! executed when the state changes to execute */
switch_state_handler on_execute;
switch_state_handler_t on_execute;
/*! executed when the state changes to hangup */
switch_state_handler on_hangup;
switch_state_handler_t on_hangup;
/*! executed when the state changes to loopback*/
switch_state_handler on_loopback;
switch_state_handler_t on_loopback;
/*! executed when the state changes to transmit*/
switch_state_handler on_transmit;
switch_state_handler_t on_transmit;
/*! executed when the state changes to hold*/
switch_state_handler on_hold;
switch_state_handler_t on_hold;
};
/*! \brief Node in which to store custom outgoing channel callback hooks */
struct switch_io_event_hook_outgoing_channel {
/*! the outgoing channel callback hook*/
switch_outgoing_channel_hook outgoing_channel;
switch_outgoing_channel_hook_t outgoing_channel;
struct switch_io_event_hook_outgoing_channel *next;
};
/*! \brief Node in which to store custom answer channel callback hooks */
struct switch_io_event_hook_answer_channel {
/*! the answer channel callback hook*/
switch_answer_channel_hook answer_channel;
switch_answer_channel_hook_t answer_channel;
struct switch_io_event_hook_answer_channel *next;
};
/*! \brief Node in which to store custom receive message callback hooks */
struct switch_io_event_hook_receive_message {
/*! the answer channel callback hook*/
switch_receive_message_hook receive_message;
switch_receive_message_hook_t receive_message;
struct switch_io_event_hook_receive_message *next;
};
/*! \brief Node in which to store custom receive message callback hooks */
struct switch_io_event_hook_queue_event {
/*! the answer channel callback hook*/
switch_queue_event_hook queue_event;
switch_queue_event_hook_t queue_event;
struct switch_io_event_hook_queue_event *next;
};
/*! \brief Node in which to store custom read frame channel callback hooks */
struct switch_io_event_hook_read_frame {
/*! the read frame channel callback hook*/
switch_read_frame_hook read_frame;
switch_read_frame_hook_t read_frame;
struct switch_io_event_hook_read_frame *next;
};
/*! \brief Node in which to store custom write_frame channel callback hooks */
struct switch_io_event_hook_write_frame {
/*! the write_frame channel callback hook*/
switch_write_frame_hook write_frame;
switch_write_frame_hook_t write_frame;
struct switch_io_event_hook_write_frame *next;
};
/*! \brief Node in which to store custom kill channel callback hooks */
struct switch_io_event_hook_kill_channel {
/*! the kill channel callback hook*/
switch_kill_channel_hook kill_channel;
switch_kill_channel_hook_t kill_channel;
struct switch_io_event_hook_kill_channel *next;
};
/*! \brief Node in which to store custom waitfor read channel callback hooks */
struct switch_io_event_hook_waitfor_read {
/*! the waitfor read channel callback hook*/
switch_waitfor_read_hook waitfor_read;
switch_waitfor_read_hook_t waitfor_read;
struct switch_io_event_hook_waitfor_read *next;
};
/*! \brief Node in which to store custom waitfor write channel callback hooks */
struct switch_io_event_hook_waitfor_write {
/*! the waitfor write channel callback hook*/
switch_waitfor_write_hook waitfor_write;
switch_waitfor_write_hook_t waitfor_write;
struct switch_io_event_hook_waitfor_write *next;
};
/*! \brief Node in which to store custom send dtmf channel callback hooks */
struct switch_io_event_hook_send_dtmf {
/*! the send dtmf channel callback hook*/
switch_send_dtmf_hook send_dtmf;
switch_send_dtmf_hook_t send_dtmf;
struct switch_io_event_hook_send_dtmf *next;
};
/*! \brief A table of lists of io_event_hooks to store the event hooks associated with a session */
struct switch_io_event_hooks {
/*! a list of outgoing channel hooks */
struct switch_io_event_hook_outgoing_channel *outgoing_channel;
switch_io_event_hook_outgoing_channel_t *outgoing_channel;
/*! a list of answer channel hooks */
struct switch_io_event_hook_answer_channel *answer_channel;
switch_io_event_hook_answer_channel_t *answer_channel;
/*! a list of receive message hooks */
struct switch_io_event_hook_receive_message *receive_message;
switch_io_event_hook_receive_message_t *receive_message;
/*! a list of queue message hooks */
struct switch_io_event_hook_queue_event *queue_event;
switch_io_event_hook_queue_event_t *queue_event;
/*! a list of read frame hooks */
struct switch_io_event_hook_read_frame *read_frame;
switch_io_event_hook_read_frame_t *read_frame;
/*! a list of write frame hooks */
struct switch_io_event_hook_write_frame *write_frame;
switch_io_event_hook_write_frame_t *write_frame;
/*! a list of kill channel hooks */
struct switch_io_event_hook_kill_channel *kill_channel;
switch_io_event_hook_kill_channel_t *kill_channel;
/*! a list of wait for read hooks */
struct switch_io_event_hook_waitfor_read *waitfor_read;
switch_io_event_hook_waitfor_read_t *waitfor_read;
/*! a list of wait for write hooks */
struct switch_io_event_hook_waitfor_write *waitfor_write;
switch_io_event_hook_waitfor_write_t *waitfor_write;
/*! a list of send dtmf hooks */
struct switch_io_event_hook_send_dtmf *send_dtmf;
switch_io_event_hook_send_dtmf_t *send_dtmf;
};
/*! \brief A table of i/o routines that an endpoint interface can implement */
struct switch_io_routines {
/*! creates an outgoing session from given session, caller profile */
switch_status (*outgoing_channel)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t *);
switch_status_t (*outgoing_channel)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t *);
/*! answers the given session's channel */
switch_status (*answer_channel)(switch_core_session_t *);
switch_status_t (*answer_channel)(switch_core_session_t *);
/*! read a frame from a session */
switch_status (*read_frame)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag, int);
switch_status_t (*read_frame)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
/*! write a frame to a session */
switch_status (*write_frame)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag, int);
switch_status_t (*write_frame)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
/*! send a kill signal to the session's channel */
switch_status (*kill_channel)(switch_core_session_t *, int);
switch_status_t (*kill_channel)(switch_core_session_t *, int);
/*! wait for the session's channel to be ready to read audio */
switch_status (*waitfor_read)(switch_core_session_t *, int, int);
switch_status_t (*waitfor_read)(switch_core_session_t *, int, int);
/*! wait for the session's channel to be ready to write audio */
switch_status (*waitfor_write)(switch_core_session_t *, int, int);
switch_status_t (*waitfor_write)(switch_core_session_t *, int, int);
/*! send a string of DTMF digits to a session's channel */
switch_status (*send_dtmf)(switch_core_session_t *, char *);
switch_status_t (*send_dtmf)(switch_core_session_t *, char *);
/*! receive a message from another session*/
switch_status (*receive_message)(switch_core_session_t *, switch_core_session_message_t *);
switch_status_t (*receive_message)(switch_core_session_t *, switch_core_session_message_t *);
/*! queue a message for another session*/
switch_status (*queue_event)(switch_core_session_t *, switch_event_t *);
switch_status_t (*queue_event)(switch_core_session_t *, switch_event_t *);
};
/*! \brief Abstraction of an module endpoint interface
@ -191,7 +191,7 @@ struct switch_endpoint_interface {
const char *interface_name;
/*! channel abstraction methods */
const switch_io_routines *io_routines;
const switch_io_routines_t *io_routines;
/*! state machine methods */
const switch_state_handler_table_t *state_handler;
@ -214,7 +214,7 @@ struct switch_timer {
/*! current sample count based on samples parameter */
unsigned int samplecount;
/*! the timer interface provided from a loadable module */
struct switch_timer_interface *timer_interface;
switch_timer_interface_t *timer_interface;
/*! the timer's memory pool */
switch_memory_pool_t *memory_pool;
/*! private data for loadable modules to store information */
@ -226,11 +226,11 @@ struct switch_timer_interface {
/*! the name of the interface */
const char *interface_name;
/*! function to allocate the timer */
switch_status (*timer_init)(switch_timer_t *);
switch_status_t (*timer_init)(switch_timer_t *);
/*! function to wait for one cycle to pass */
switch_status (*timer_next)(switch_timer_t *);
switch_status_t (*timer_next)(switch_timer_t *);
/*! function to deallocate the timer */
switch_status (*timer_destroy)(switch_timer_t *);
switch_status_t (*timer_destroy)(switch_timer_t *);
const struct switch_timer_interface *next;
};
@ -239,7 +239,7 @@ struct switch_dialplan_interface {
/*! the name of the interface */
const char *interface_name;
/*! the function to read an extension and set a channels dialpan */
switch_dialplan_hunt_function hunt_function;
switch_dialplan_hunt_function_t hunt_function;
const struct switch_dialplan_interface *next;
};
@ -248,15 +248,15 @@ struct switch_file_interface {
/*! the name of the interface */
const char *interface_name;
/*! function to open the file */
switch_status (*file_open)(switch_file_handle_t *, char *file_path);
switch_status_t (*file_open)(switch_file_handle_t *, char *file_path);
/*! function to close the file */
switch_status (*file_close)(switch_file_handle_t *);
switch_status_t (*file_close)(switch_file_handle_t *);
/*! function to read from the file */
switch_status (*file_read)(switch_file_handle_t *, void *data, switch_size_t *len);
switch_status_t (*file_read)(switch_file_handle_t *, void *data, switch_size_t *len);
/*! function to write from the file */
switch_status (*file_write)(switch_file_handle_t *, void *data, switch_size_t *len);
switch_status_t (*file_write)(switch_file_handle_t *, void *data, switch_size_t *len);
/*! function to seek to a certian position in the file */
switch_status (*file_seek)(switch_file_handle_t *, unsigned int *cur_pos, int64_t samples, int whence);
switch_status_t (*file_seek)(switch_file_handle_t *, unsigned int *cur_pos, int64_t samples, int whence);
/*! list of supported file extensions */
char **extens;
const struct switch_file_interface *next;
@ -265,7 +265,7 @@ struct switch_file_interface {
/*! an abstract representation of a file handle (some parameters based on compat with libsndfile) */
struct switch_file_handle {
/*! the interface of the module that implemented the current file type */
const struct switch_file_interface *file_interface;
const switch_file_interface_t *file_interface;
/*! flags to control behaviour */
uint32_t flags;
/*! a file descriptor if neceessary */
@ -300,24 +300,24 @@ struct switch_speech_interface {
/*! the name of the interface */
const char *interface_name;
/*! function to open the speech interface */
switch_status (*speech_open)(switch_speech_handle *sh,
switch_status_t (*speech_open)(switch_speech_handle_t *sh,
char *voice_name,
int rate,
switch_speech_flag *flags);
switch_speech_flag_t *flags);
/*! function to close the speech interface */
switch_status (*speech_close)(switch_speech_handle *, switch_speech_flag *flags);
switch_status_t (*speech_close)(switch_speech_handle_t *, switch_speech_flag_t *flags);
/*! function to feed audio to the ASR*/
switch_status (*speech_feed_asr)(switch_speech_handle *sh, void *data, unsigned int *len, int rate, switch_speech_flag *flags);
switch_status_t (*speech_feed_asr)(switch_speech_handle_t *sh, void *data, unsigned int *len, int rate, switch_speech_flag_t *flags);
/*! function to read text from the ASR*/
switch_status (*speech_interpret_asr)(switch_speech_handle *sh, char *buf, unsigned int buflen, switch_speech_flag *flags);
switch_status_t (*speech_interpret_asr)(switch_speech_handle_t *sh, char *buf, unsigned int buflen, switch_speech_flag_t *flags);
/*! function to feed text to the TTS*/
switch_status (*speech_feed_tts)(switch_speech_handle *sh, char *text, switch_speech_flag *flags);
switch_status_t (*speech_feed_tts)(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags);
/*! function to read audio from the TTS*/
switch_status (*speech_read_tts)(switch_speech_handle *sh,
switch_status_t (*speech_read_tts)(switch_speech_handle_t *sh,
void *data,
switch_size_t *datalen,
uint32_t *rate,
switch_speech_flag *flags);
switch_speech_flag_t *flags);
const struct switch_speech_interface *next;
};
@ -326,7 +326,7 @@ struct switch_speech_interface {
/*! an abstract representation of a asr/tts speech interface. */
struct switch_speech_handle {
/*! the interface of the module that implemented the current speech interface */
const struct switch_speech_interface *speech_interface;
const switch_speech_interface_t *speech_interface;
/*! flags to control behaviour */
uint32_t flags;
@ -343,15 +343,15 @@ struct switch_directory_interface {
/*! the name of the interface */
const char *interface_name;
/*! function to open the directory interface */
switch_status (*directory_open)(switch_directory_handle *dh, char *source, char *dsn, char *passwd);
switch_status_t (*directory_open)(switch_directory_handle_t *dh, char *source, char *dsn, char *passwd);
/*! function to close the directory interface */
switch_status (*directory_close)(switch_directory_handle *dh);
switch_status_t (*directory_close)(switch_directory_handle_t *dh);
/*! function to query the directory interface */
switch_status (*directory_query)(switch_directory_handle *dh, char *base, char *query);
switch_status_t (*directory_query)(switch_directory_handle_t *dh, char *base, char *query);
/*! function to advance to the next record */
switch_status (*directory_next)(switch_directory_handle *dh);
switch_status_t (*directory_next)(switch_directory_handle_t *dh);
/*! function to advance to the next name/value pair in the current record */
switch_status (*directory_next_pair)(switch_directory_handle *dh, char **var, char **val);
switch_status_t (*directory_next_pair)(switch_directory_handle_t *dh, char **var, char **val);
const struct switch_directory_interface *next;
};
@ -359,7 +359,7 @@ struct switch_directory_interface {
/*! an abstract representation of a directory interface. */
struct switch_directory_handle {
/*! the interface of the module that implemented the current directory interface */
const struct switch_directory_interface *directory_interface;
const switch_directory_interface_t *directory_interface;
/*! flags to control behaviour */
uint32_t flags;
@ -410,7 +410,7 @@ struct switch_codec_settings {
/*! an abstract handle to a codec module */
struct switch_codec {
/*! the codec interface table this handle uses */
const struct switch_codec_interface *codec_interface;
const switch_codec_interface_t *codec_interface;
/*! the specific implementation of the above codec */
const switch_codec_implementation_t *implementation;
/*! codec settings for this handle */
@ -444,9 +444,9 @@ struct switch_codec_implementation {
/*! max number of frames to send in one network packet */
int max_frames_per_packet;
/*! function to initialize a codec handle using this implementation */
switch_status (*init)(switch_codec_t *, switch_codec_flag, const switch_codec_settings_t *codec_settings);
switch_status_t (*init)(switch_codec_t *, switch_codec_flag_t, const switch_codec_settings_t *codec_settings);
/*! function to encode raw data into encoded data */
switch_status (*encode)(switch_codec_t *codec,
switch_status_t (*encode)(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -456,7 +456,7 @@ struct switch_codec_implementation {
uint32_t *encoded_rate,
unsigned int *flag);
/*! function to decode encoded data into raw data */
switch_status (*decode)(switch_codec_t *codec,
switch_status_t (*decode)(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -466,7 +466,7 @@ struct switch_codec_implementation {
uint32_t *decoded_rate,
unsigned int *flag);
/*! deinitalize a codec handle using this implementation */
switch_status (*destroy)(switch_codec_t *);
switch_status_t (*destroy)(switch_codec_t *);
const struct switch_codec_implementation *next;
};
@ -475,7 +475,7 @@ struct switch_codec_interface {
/*! the name of the interface */
const char *interface_name;
/*! enumeration defining the type of the codec */
const switch_codec_type codec_type;
const switch_codec_type_t codec_type;
/*! the IANA code number */
switch_payload_t ianacode;
/*! the IANA code name */
@ -490,7 +490,7 @@ struct switch_application_interface {
/*! the name of the interface */
const char *interface_name;
/*! function the application implements */
switch_application_function application_function;
switch_application_function_t application_function;
/*! the long winded description of the application */
const char *long_desc;
/*! the short and sweet description of the application */
@ -507,7 +507,7 @@ struct switch_api_interface {
/*! a description of the api function */
const char *desc;
/*! function the api call uses */
switch_api_function function;
switch_api_function_t function;
const struct switch_api_interface *next;
};

View File

@ -86,7 +86,7 @@ typedef struct {
\param pool the memory pool to use for buffer allocation
\return SWITCH_STATUS_SUCCESS if the handle was created
*/
SWITCH_DECLARE(switch_status) switch_resample_create(switch_audio_resampler_t **new_resampler,
SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler,
int from_rate,
switch_size_t from_size,
int to_rate,

View File

@ -45,7 +45,7 @@ BEGIN_EXTERN_C
///\defgroup rtp RTP (RealTime Transport Protocol)
///\ingroup core1
///\{
typedef void (*switch_rtp_invalid_handler)(switch_rtp_t *rtp_session,
typedef void (*switch_rtp_invalid_handler_t)(switch_rtp_t *rtp_session,
switch_socket_t *sock,
void *data,
switch_size_t datalen,
@ -76,7 +76,7 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_request_port(void);
\param pool a memory pool to use for the session
\return the new RTP session or NULL on failure
*/
SWITCH_DECLARE(switch_status)switch_rtp_create(switch_rtp_t **new_rtp_session,
SWITCH_DECLARE(switch_status_t)switch_rtp_create(switch_rtp_t **new_rtp_session,
switch_payload_t payload,
uint32_t packet_size,
uint32_t ms_per_packet,
@ -121,7 +121,7 @@ SWITCH_DECLARE(switch_rtp_t *)switch_rtp_new(char *rx_host,
\param port the remote port
\param err pointer for error messages
*/
SWITCH_DECLARE(switch_status) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
/*!
\brief Assign a local address to the RTP session
@ -131,7 +131,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_set_remote_address(switch_rtp_t *rtp_se
\param err pointer for error messages
\note this call also binds the RTP session's socket to the new address
*/
SWITCH_DECLARE(switch_status) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err);
/*!
\brief Kill the socket on an existing RTP session
@ -149,7 +149,7 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session);
\brief Acvite ICE on an RTP session
\return SWITCH_STATUS_SUCCESS
*/
SWITCH_DECLARE(switch_status) switch_rtp_activate_ice(switch_rtp_t *rtp_session, char *login, char *rlogin);
SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_session, char *login, char *rlogin);
/*!
\brief Set an RTP Flag
@ -215,7 +215,7 @@ SWITCH_DECLARE(uint32_t) switch_rtp_get_default_payload(switch_rtp_t *rtp_sessio
\param on_invalid the function to set
\return
*/
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, switch_rtp_invalid_handler on_invalid);
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, switch_rtp_invalid_handler_t on_invalid);
/*!
\brief Read data from a given RTP session
@ -226,7 +226,7 @@ SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, sw
\param flags flags
\return the number of bytes read
*/
SWITCH_DECLARE(switch_status) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags);
/*!
\brief Read data from a given RTP session without copying
@ -237,7 +237,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_read(switch_rtp_t *rtp_session, void *d
\param flags flags
\return the number of bytes read
*/
SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session, void **data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag *flags);
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session, void **data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags);
/*!
\brief Read data from a given RTP session without copying
@ -245,7 +245,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session
\param frame a frame to populate with information
\return the number of bytes read
*/
SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame);
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame);
/*!
\brief Write data to a given RTP session
@ -256,7 +256,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_s
\param flags frame flags
\return the number of bytes written
*/
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag *flags);
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag_t *flags);
/*!
\brief Enable VAD on an RTP Session
@ -266,14 +266,14 @@ SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint
\param flags flags for control
\return SWITCH_STAUTS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags);
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags);
/*!
\brief Disable VAD on an RTP Session
\param rtp_session the RTP session
\return SWITCH_STAUTS_SUCCESS on success
*/
SWITCH_DECLARE(switch_status) switch_rtp_disable_vad(switch_rtp_t *rtp_session);
SWITCH_DECLARE(switch_status_t) switch_rtp_disable_vad(switch_rtp_t *rtp_session);
/*!
\brief Write data to a given RTP session
@ -296,7 +296,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
\param flags frame flags
\return the number of bytes written
*/
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session, void *data, uint16_t datalen, uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, switch_frame_flag *flags);
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session, void *data, uint16_t datalen, uint8_t m, switch_payload_t payload, uint32_t ts, uint16_t mseq, switch_frame_flag_t *flags);
/*!
\brief Retrieve the SSRC from a given RTP session

View File

@ -209,7 +209,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_binded_address(switch_s
\param pool the memory pool to use
\return SUCCESS or FAIL
*/
SWITCH_DECLARE(switch_status) switch_stun_lookup (char **ip,
SWITCH_DECLARE(switch_status_t) switch_stun_lookup (char **ip,
switch_port_t *port,
char *stunip,
switch_port_t stunport,

View File

@ -197,7 +197,7 @@ typedef enum {
} switch_stack_t;
/*!
\enum switch_status
\enum switch_status_t
\brief Common return values
<pre>
SWITCH_STATUS_SUCCESS - General Success (common return value for most functions)
@ -229,12 +229,12 @@ typedef enum {
SWITCH_STATUS_INUSE,
SWITCH_STATUS_BREAK,
SWITCH_STATUS_SOCKERR
} switch_status;
} switch_status_t;
/*!
\enum switch_log_level
\enum switch_log_level_t
\brief Log Level Enumeration
<pre>
SWITCH_LOG_CONSOLE - Console
@ -258,11 +258,11 @@ typedef enum {
SWITCH_LOG_CRIT = 2,
SWITCH_LOG_ALERT = 1,
SWITCH_LOG_EMERG = 0
} switch_log_level;
} switch_log_level_t;
/*!
\enum switch_text_channel
\enum switch_text_channel_t
\brief A target to write log/debug info to
<pre>
SWITCH_CHANNEL_ID_LOG - Write to the currently defined log
@ -274,7 +274,7 @@ typedef enum {
SWITCH_CHANNEL_ID_LOG,
SWITCH_CHANNEL_ID_LOG_CLEAN,
SWITCH_CHANNEL_ID_EVENT
} switch_text_channel;
} switch_text_channel_t;
#define SWITCH_UUID_FORMATTED_LENGTH APR_UUID_FORMATTED_LENGTH
#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __FUNCTION__, __LINE__
@ -282,7 +282,7 @@ typedef enum {
#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __FUNCTION__, __LINE__
/*!
\enum switch_channel_state
\enum switch_channel_state_t
\brief Channel States
<pre>
CS_NEW - Channel is newly created
@ -306,11 +306,11 @@ typedef enum {
CS_HOLD,
CS_HANGUP,
CS_DONE
} switch_channel_state;
} switch_channel_state_t;
/*!
\enum switch_channel_flag
\enum switch_channel_flag_t
\brief Channel Flags
<pre>
@ -336,11 +336,11 @@ typedef enum {
CF_LOCK_THREAD = (1 << 6),
CF_BRIDGED = (1 << 7),
CF_HOLD = (1 << 8)
} switch_channel_flag;
} switch_channel_flag_t;
/*!
\enum switch_frame_flag
\enum switch_frame_flag_t
\brief Frame Flags
<pre>
@ -351,11 +351,11 @@ SFF_RAW_RTP = (1 << 1) - Frame has raw rtp accessible
typedef enum {
SFF_CNG = (1 << 0),
SFF_RAW_RTP = (1 << 1)
} switch_frame_flag;
} switch_frame_flag_t;
/*!
\enum switch_signal
\enum switch_signal_t
\brief Signals to send to channels
<pre>
SWITCH_SIG_KILL - Kill the channel
@ -367,10 +367,10 @@ typedef enum {
SWITCH_SIG_NONE,
SWITCH_SIG_KILL,
SWITCH_SIG_XFER
} switch_signal;
} switch_signal_t;
/*!
\enum switch_codec_flag
\enum switch_codec_flag_t
\brief Codec related flags
<pre>
SWITCH_CODEC_FLAG_ENCODE = (1 << 0) - Codec can encode
@ -389,11 +389,11 @@ typedef enum {
SWITCH_CODEC_FLAG_SILENCE = (1 << 4),
SWITCH_CODEC_FLAG_FREE_POOL = (1 << 5),
} switch_codec_flag;
} switch_codec_flag_t;
/*!
\enum switch_speech_flag
\enum switch_speech_flag_t
\brief Speech related flags
<pre>
SWITCH_SPEECH_FLAG_TTS = (1 << 0) - Interface can/should convert text to speech.
@ -412,11 +412,11 @@ typedef enum {
SWITCH_SPEECH_FLAG_FREE_POOL = (1 << 4),
SWITCH_SPEECH_FLAG_BLOCKING = (1 << 5),
} switch_speech_flag;
} switch_speech_flag_t;
/*!
\enum switch_directory_flag
\enum switch_directory_flag_t
\brief Directory Handle related flags
<pre>
SWITCH_DIRECTORY_FLAG_FREE_POOL = (1 << 0) - Free interface's pool on destruction.
@ -425,10 +425,10 @@ SWITCH_DIRECTORY_FLAG_FREE_POOL = (1 << 0) - Free interface's pool on destruct
typedef enum {
SWITCH_DIRECTORY_FLAG_FREE_POOL = (1 << 0),
} switch_directory_flag;
} switch_directory_flag_t;
/*!
\enum switch_codec_type
\enum switch_codec_type_t
\brief Codec types
<pre>
SWITCH_CODEC_TYPE_AUDIO - Audio Codec
@ -442,11 +442,11 @@ typedef enum {
SWITCH_CODEC_TYPE_VIDEO,
SWITCH_CODEC_TYPE_T38,
SWITCH_CODEC_TYPE_APP
} switch_codec_type;
} switch_codec_type_t;
/*!
\enum switch_timer_flag
\enum switch_timer_flag_t
\brief Timer related flags
<pre>
SWITCH_TIMER_FLAG_FREE_POOL = (1 << 0) - Free timer's pool on destruction
@ -454,10 +454,10 @@ SWITCH_TIMER_FLAG_FREE_POOL = (1 << 0) - Free timer's pool on destruction
*/
typedef enum {
SWITCH_TIMER_FLAG_FREE_POOL = (1 << 0),
} switch_timer_flag;
} switch_timer_flag_t;
/*!
\enum switch_file_flag
\enum switch_file_flag_t
\brief File flags
<pre>
SWITCH_FILE_FLAG_READ = (1 << 0) - Open for read
@ -481,11 +481,11 @@ typedef enum {
SWITCH_FILE_DATA_DOUBLE = (1 << 6),
SWITCH_FILE_DATA_RAW = (1 << 7),
SWITCH_FILE_PAUSE = (1 << 8)
} switch_file_flag;
} switch_file_flag_t;
typedef enum {
SWITCH_IO_FLAG_NOOP = 0,
} switch_io_flag;
} switch_io_flag_t;
/* make sure this is synced with the EVENT_NAMES array in switch_event.c
also never put any new ones before EVENT_ALL
@ -617,57 +617,57 @@ typedef struct switch_buffer switch_buffer_t;
typedef struct switch_codec_settings switch_codec_settings_t;
typedef struct switch_config switch_config_t;
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel;
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel;
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message;
typedef struct switch_io_event_hook_queue_event switch_io_event_hook_queue_event;
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame;
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame;
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel;
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read;
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write;
typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf;
typedef struct switch_io_routines switch_io_routines;
typedef struct switch_io_event_hooks switch_io_event_hooks;
typedef struct switch_io_event_hook_outgoing_channel switch_io_event_hook_outgoing_channel_t;
typedef struct switch_io_event_hook_answer_channel switch_io_event_hook_answer_channel_t;
typedef struct switch_io_event_hook_receive_message switch_io_event_hook_receive_message_t;
typedef struct switch_io_event_hook_queue_event switch_io_event_hook_queue_event_t;
typedef struct switch_io_event_hook_read_frame switch_io_event_hook_read_frame_t;
typedef struct switch_io_event_hook_write_frame switch_io_event_hook_write_frame_t;
typedef struct switch_io_event_hook_kill_channel switch_io_event_hook_kill_channel_t;
typedef struct switch_io_event_hook_waitfor_read switch_io_event_hook_waitfor_read_t;
typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_write_t;
typedef struct switch_io_event_hook_send_dtmf switch_io_event_hook_send_dtmf_t;
typedef struct switch_io_routines switch_io_routines_t;
typedef struct switch_io_event_hooks switch_io_event_hooks_t;
typedef struct switch_speech_handle switch_speech_handle;
typedef struct switch_directory_handle switch_directory_handle;
typedef struct switch_speech_handle switch_speech_handle_t;
typedef struct switch_directory_handle switch_directory_handle_t;
typedef struct switch_loadable_module_interface switch_loadable_module_interface;
typedef struct switch_endpoint_interface switch_endpoint_interface;
typedef struct switch_timer_interface switch_timer_interface;
typedef struct switch_dialplan_interface switch_dialplan_interface;
typedef struct switch_codec_interface switch_codec_interface;
typedef struct switch_application_interface switch_application_interface;
typedef struct switch_api_interface switch_api_interface;
typedef struct switch_file_interface switch_file_interface;
typedef struct switch_speech_interface switch_speech_interface;
typedef struct switch_directory_interface switch_directory_interface;
typedef struct switch_loadable_module_interface switch_loadable_module_interface_t;
typedef struct switch_endpoint_interface switch_endpoint_interface_t;
typedef struct switch_timer_interface switch_timer_interface_t;
typedef struct switch_dialplan_interface switch_dialplan_interface_t;
typedef struct switch_codec_interface switch_codec_interface_t;
typedef struct switch_application_interface switch_application_interface_t;
typedef struct switch_api_interface switch_api_interface_t;
typedef struct switch_file_interface switch_file_interface_t;
typedef struct switch_speech_interface switch_speech_interface_t;
typedef struct switch_directory_interface switch_directory_interface_t;
typedef void (*switch_application_function)(switch_core_session_t *, char *);
typedef void (*switch_application_function_t)(switch_core_session_t *, char *);
typedef void (*switch_event_callback_t)(switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function)(switch_core_session_t *);
typedef switch_status (*switch_state_handler)(switch_core_session_t *);
typedef switch_status (*switch_outgoing_channel_hook)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
typedef switch_status (*switch_answer_channel_hook)(switch_core_session_t *);
typedef switch_status (*switch_receive_message_hook)(switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status (*switch_queue_event_hook)(switch_core_session_t *, switch_event_t *);
typedef switch_status (*switch_read_frame_hook)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag, int);
typedef switch_status (*switch_write_frame_hook)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag, int);
typedef switch_status (*switch_kill_channel_hook)(switch_core_session_t *, int);
typedef switch_status (*switch_waitfor_read_hook)(switch_core_session_t *, int, int);
typedef switch_status (*switch_waitfor_write_hook)(switch_core_session_t *, int, int);
typedef switch_status (*switch_send_dtmf_hook)(switch_core_session_t *, char *);
typedef switch_status (*switch_api_function)(char *in, char *out, switch_size_t outlen);
typedef switch_status (*switch_dtmf_callback_function)(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen);
typedef int (*switch_core_db_callback_func)(void *pArg, int argc, char **argv, char **columnNames);
typedef switch_status (*switch_module_load_t) (switch_loadable_module_interface **, char *);
typedef switch_status (*switch_module_reload_t) (void);
typedef switch_status (*switch_module_pause_t) (void);
typedef switch_status (*switch_module_resume_t) (void);
typedef switch_status (*switch_module_status_t) (void);
typedef switch_status (*switch_module_runtime_t) (void);
typedef switch_status (*switch_module_shutdown_t) (void);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t)(switch_core_session_t *);
typedef switch_status_t (*switch_state_handler_t)(switch_core_session_t *);
typedef switch_status_t (*switch_outgoing_channel_hook_t)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t *);
typedef switch_status_t (*switch_answer_channel_hook_t)(switch_core_session_t *);
typedef switch_status_t (*switch_receive_message_hook_t)(switch_core_session_t *, switch_core_session_message_t *);
typedef switch_status_t (*switch_queue_event_hook_t)(switch_core_session_t *, switch_event_t *);
typedef switch_status_t (*switch_read_frame_hook_t)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_write_frame_hook_t)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
typedef switch_status_t (*switch_kill_channel_hook_t)(switch_core_session_t *, int);
typedef switch_status_t (*switch_waitfor_read_hook_t)(switch_core_session_t *, int, int);
typedef switch_status_t (*switch_waitfor_write_hook_t)(switch_core_session_t *, int, int);
typedef switch_status_t (*switch_send_dtmf_hook_t)(switch_core_session_t *, char *);
typedef switch_status_t (*switch_api_function_t)(char *in, char *out, switch_size_t outlen);
typedef switch_status_t (*switch_dtmf_callback_function_t)(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen);
typedef int (*switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames);
typedef switch_status_t (*switch_module_load_t) (switch_loadable_module_interface_t **, char *);
typedef switch_status_t (*switch_module_reload_t) (void);
typedef switch_status_t (*switch_module_pause_t) (void);
typedef switch_status_t (*switch_module_resume_t) (void);
typedef switch_status_t (*switch_module_status_t) (void);
typedef switch_status_t (*switch_module_runtime_t) (void);
typedef switch_status_t (*switch_module_shutdown_t) (void);
/* things we don't deserve to know about */

View File

@ -62,7 +62,7 @@ BEGIN_EXTERN_C
atoi(expr))) ? SWITCH_TRUE : SWITCH_FALSE
SWITCH_DECLARE(switch_status) switch_socket_recvfrom(switch_sockaddr_t *from, switch_socket_t *sock, int32_t flags, char *buf, switch_size_t *len);
SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t *from, switch_socket_t *sock, int32_t flags, char *buf, switch_size_t *len);
/*!
\brief Return a printable name of a switch_priority_t
@ -157,7 +157,7 @@ SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char
\param pool the memory pool to use
\return SWITCH_STATUS_SUCCESS when successful
*/
SWITCH_DECLARE(switch_status) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock, switch_int16_t flags, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock, switch_int16_t flags, switch_memory_pool_t *pool);
/*!
\brief Wait for a socket
@ -174,7 +174,7 @@ SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
SWITCH_DECLARE(char *) switch_cut_path(char *in);
SWITCH_DECLARE(char *) switch_string_replace(const char *string, const char *search, const char *replace);
SWITCH_DECLARE(switch_status) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len);
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len);
#define SWITCH_READ_ACCEPTABLE(status) status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK

View File

@ -80,13 +80,13 @@ static void audio_bridge_function(switch_core_session_t *session, char *data)
}
static const switch_application_interface bridge_application_interface = {
static const switch_application_interface_t bridge_application_interface = {
/*.interface_name */ "bridge",
/*.application_function */ audio_bridge_function
};
static const switch_loadable_module_interface mod_bridgecall_module_interface = {
static const switch_loadable_module_interface_t mod_bridgecall_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -95,7 +95,7 @@ static const switch_loadable_module_interface mod_bridgecall_module_interface =
/*.application_interface */ &bridge_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */

View File

@ -34,14 +34,14 @@
static const char modname[] = "mod_commands";
static switch_status load_function(char *mod, char *out, size_t outlen)
static switch_status_t load_function(char *mod, char *out, size_t outlen)
{
switch_loadable_module_load_module((char *) SWITCH_GLOBAL_dirs.mod_dir, (char *) mod);
snprintf(out, outlen, "OK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status kill_function(char *dest, char *out, size_t outlen)
static switch_status_t kill_function(char *dest, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
@ -59,7 +59,7 @@ static switch_status kill_function(char *dest, char *out, size_t outlen)
}
static switch_status transfer_function(char *cmd, char *out, size_t outlen)
static switch_status_t transfer_function(char *cmd, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
char *argv[4] = {0};
@ -96,7 +96,7 @@ static switch_status transfer_function(char *cmd, char *out, size_t outlen)
static switch_status pause_function(char *cmd, char *out, size_t outlen)
static switch_status_t pause_function(char *cmd, char *out, size_t outlen)
{
switch_core_session_t *session = NULL;
char *argv[4] = {0};
@ -130,21 +130,21 @@ static switch_status pause_function(char *cmd, char *out, size_t outlen)
}
static struct switch_api_interface pause_api_interface = {
static switch_api_interface_t pause_api_interface = {
/*.interface_name */ "pause",
/*.desc */ "Pause",
/*.function */ pause_function,
/*.next */ NULL
};
static struct switch_api_interface transfer_api_interface = {
static switch_api_interface_t transfer_api_interface = {
/*.interface_name */ "transfer",
/*.desc */ "Transfer",
/*.function */ transfer_function,
/*.next */ &pause_api_interface
};
static struct switch_api_interface load_api_interface = {
static switch_api_interface_t load_api_interface = {
/*.interface_name */ "load",
/*.desc */ "Load Modile",
/*.function */ load_function,
@ -152,7 +152,7 @@ static struct switch_api_interface load_api_interface = {
};
static struct switch_api_interface commands_api_interface = {
static switch_api_interface_t commands_api_interface = {
/*.interface_name */ "killchan",
/*.desc */ "Kill Channel",
/*.function */ kill_function,
@ -160,7 +160,7 @@ static struct switch_api_interface commands_api_interface = {
};
static const switch_loadable_module_interface mod_commands_module_interface = {
static const switch_loadable_module_interface_t mod_commands_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -171,7 +171,7 @@ static const switch_loadable_module_interface mod_commands_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */

View File

@ -45,13 +45,13 @@ static void echo_function(switch_core_session_t *session, char *data)
switch_channel_set_state(channel, CS_LOOPBACK);
}
static const switch_application_interface echo_application_interface = {
static const switch_application_interface_t echo_application_interface = {
/*.interface_name */ "echo",
/*.application_function */ echo_function,
NULL,NULL,NULL,NULL
};
static switch_loadable_module_interface echo_module_interface = {
static switch_loadable_module_interface_t echo_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -64,7 +64,7 @@ static switch_loadable_module_interface echo_module_interface = {
/*.directory_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &echo_module_interface;

View File

@ -39,7 +39,7 @@ static const char modname[] = "mod_ivrtest";
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
static switch_status on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@ -61,7 +61,7 @@ static void dirtest_function(switch_core_session_t *session, char *data)
{
char *var, *val;
switch_channel_t *channel;
switch_directory_handle dh;
switch_directory_handle_t dh;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -90,7 +90,7 @@ static void dirtest_function(switch_core_session_t *session, char *data)
}
static switch_status show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@ -137,7 +137,7 @@ static void tts_function(switch_core_session_t *session, char *data)
static void ivrtest_function(switch_core_session_t *session, char *data)
{
switch_channel_t *channel;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_codec_t *codec;
char buf[10] = "";
char term;
@ -182,7 +182,7 @@ static void ivrtest_function(switch_core_session_t *session, char *data)
}
static switch_status my_on_hangup(switch_core_session_t *session)
static switch_status_t my_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel;
@ -204,35 +204,35 @@ static const switch_state_handler_table_t state_handlers = {
};
static const switch_application_interface disast_application_interface = {
static const switch_application_interface_t disast_application_interface = {
/*.interface_name */ "disast",
/*.application_function */ disast_function,
NULL, NULL, NULL,
/*.next*/ NULL
};
static const switch_application_interface tts_application_interface = {
static const switch_application_interface_t tts_application_interface = {
/*.interface_name */ "tts",
/*.application_function */ tts_function,
NULL, NULL, NULL,
/*.next*/ &disast_application_interface
};
static const switch_application_interface dirtest_application_interface = {
static const switch_application_interface_t dirtest_application_interface = {
/*.interface_name */ "dirtest",
/*.application_function */ dirtest_function,
NULL, NULL, NULL,
/*.next*/ &tts_application_interface
};
static const switch_application_interface ivrtest_application_interface = {
static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "ivrtest",
/*.application_function */ ivrtest_function,
NULL, NULL, NULL,
/*.next*/ &dirtest_application_interface
};
static const switch_loadable_module_interface mod_ivrtest_module_interface = {
static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -241,7 +241,7 @@ static const switch_loadable_module_interface mod_ivrtest_module_interface = {
/*.application_interface */ &ivrtest_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@ -259,4 +259,4 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
*/
//switch_status switch_module_runtime(void)
//switch_status_t switch_module_runtime(void)

View File

@ -37,7 +37,7 @@ static const char modname[] = "mod_playback";
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
static switch_status on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
@ -85,19 +85,19 @@ static void record_function(switch_core_session_t *session, char *data)
}
static const switch_application_interface record_application_interface = {
static const switch_application_interface_t record_application_interface = {
/*.interface_name */ "record",
/*.application_function */ record_function
};
static const switch_application_interface playback_application_interface = {
static const switch_application_interface_t playback_application_interface = {
/*.interface_name */ "playback",
/*.application_function */ playback_function,
NULL,NULL,NULL,
/*.next*/ &record_application_interface
};
static const switch_loadable_module_interface mod_playback_module_interface = {
static const switch_loadable_module_interface_t mod_playback_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -106,7 +106,7 @@ static const switch_loadable_module_interface mod_playback_module_interface = {
/*.application_interface */ &playback_application_interface
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
@ -122,4 +122,4 @@ if it returns anything but SWITCH_STATUS_TERM it will be called again automaticl
*/
//switch_status switch_module_runtime(void)
//switch_status_t switch_module_runtime(void)

View File

@ -78,7 +78,7 @@ static swift_result_t write_audio(swift_event *event, swift_event_t type, void *
return rv;
}
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, int rate, switch_speech_flag *flags)
static switch_status_t cepstral_speech_open(switch_speech_handle_t *sh, char *voice_name, int rate, switch_speech_flag_t *flags)
{
if (*flags & SWITCH_SPEECH_FLAG_ASR) {
return SWITCH_STATUS_FALSE;
@ -142,7 +142,7 @@ static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_
return SWITCH_STATUS_FALSE;
}
static switch_status cepstral_speech_close(switch_speech_handle *sh, switch_speech_flag *flags)
static switch_status_t cepstral_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
@ -160,7 +160,7 @@ static switch_status cepstral_speech_close(switch_speech_handle *sh, switch_spee
return SWITCH_STATUS_SUCCESS;
}
static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *text, switch_speech_flag *flags)
static switch_status_t cepstral_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
@ -176,15 +176,15 @@ static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *te
return SWITCH_STATUS_FALSE;
}
static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
static switch_status_t cepstral_speech_read_tts(switch_speech_handle_t *sh,
void *data,
size_t *datalen,
uint32_t *rate,
switch_speech_flag *flags)
switch_speech_flag_t *flags)
{
cepstral_t *cepstral;
size_t desired = *datalen;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
size_t used, padding = 0;
assert(sh != NULL);
@ -245,7 +245,7 @@ static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
return status;
}
static const switch_speech_interface cepstral_speech_interface = {
static const switch_speech_interface_t cepstral_speech_interface = {
/*.interface_name*/ "cepstral",
/*.speech_open*/ cepstral_speech_open,
/*.speech_close*/ cepstral_speech_close,
@ -256,7 +256,7 @@ static const switch_speech_interface cepstral_speech_interface = {
};
static const switch_loadable_module_interface cepstral_module_interface = {
static const switch_loadable_module_interface_t cepstral_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -269,7 +269,7 @@ static const switch_loadable_module_interface cepstral_module_interface = {
/*.directory_interface */ NULL
};
switch_status switch_module_load(const switch_loadable_module_interface **interface, char *filename)
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* Open the Swift TTS Engine */

View File

@ -36,7 +36,7 @@
static const char modname[] = "mod_g711codec";
static switch_status switch_g711u_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g711u_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@ -52,7 +52,7 @@ static switch_status switch_g711u_init(switch_codec_t *codec, switch_codec_flag
}
static switch_status switch_g711u_encode(switch_codec_t *codec,
static switch_status_t switch_g711u_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -76,7 +76,7 @@ static switch_status switch_g711u_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711u_decode(switch_codec_t *codec,
static switch_status_t switch_g711u_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -105,13 +105,13 @@ static switch_status switch_g711u_decode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711u_destroy(switch_codec_t *codec)
static switch_status_t switch_g711u_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g711a_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@ -127,7 +127,7 @@ static switch_status switch_g711a_init(switch_codec_t *codec, switch_codec_flag
}
static switch_status switch_g711a_encode(switch_codec_t *codec,
static switch_status_t switch_g711a_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -151,7 +151,7 @@ static switch_status switch_g711a_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_decode(switch_codec_t *codec,
static switch_status_t switch_g711a_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -180,7 +180,7 @@ static switch_status switch_g711a_decode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_g711a_destroy(switch_codec_t *codec)
static switch_status_t switch_g711a_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
}
@ -275,7 +275,7 @@ static const switch_codec_implementation_t g711a_8k_implementation = {
};
static const switch_codec_interface g711a_codec_interface = {
static const switch_codec_interface_t g711a_codec_interface = {
/*.interface_name */ "g711 alaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 8,
@ -283,7 +283,7 @@ static const switch_codec_interface g711a_codec_interface = {
/*.implementations */ &g711a_8k_implementation
};
static const switch_codec_interface g711u_codec_interface = {
static const switch_codec_interface_t g711u_codec_interface = {
/*.interface_name */ "g711 ulaw",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 0,
@ -292,7 +292,7 @@ static const switch_codec_interface g711u_codec_interface = {
/*.next */ &g711a_codec_interface
};
static switch_loadable_module_interface g711_module_interface = {
static switch_loadable_module_interface_t g711_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -302,7 +302,7 @@ static switch_loadable_module_interface g711_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &g711_module_interface;

View File

@ -42,7 +42,7 @@ struct g729_context {
};
static switch_status switch_g729_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_g729_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
@ -72,7 +72,7 @@ static switch_status switch_g729_init(switch_codec_t *codec, switch_codec_flag f
}
static switch_status switch_g729_destroy(switch_codec_t *codec)
static switch_status_t switch_g729_destroy(switch_codec_t *codec)
{
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
@ -80,7 +80,7 @@ static switch_status switch_g729_destroy(switch_codec_t *codec)
static switch_status switch_g729_encode(switch_codec_t *codec,
static switch_status_t switch_g729_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
@ -127,7 +127,7 @@ static switch_status switch_g729_encode(switch_codec_t *codec,
static switch_status switch_g729_decode(switch_codec_t *codec,
static switch_status_t switch_g729_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
@ -252,7 +252,7 @@ static const switch_codec_implementation_t g729_8k_implementation = {
};
static const switch_codec_interface g729_codec_interface = {
static const switch_codec_interface_t g729_codec_interface = {
/*.interface_name */ "g729",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 18,
@ -261,7 +261,7 @@ static const switch_codec_interface g729_codec_interface = {
};
static switch_loadable_module_interface g729_module_interface = {
static switch_loadable_module_interface_t g729_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -272,7 +272,7 @@ static switch_loadable_module_interface g729_module_interface = {
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{

View File

@ -36,7 +36,7 @@ struct gsm_context {
gsm encoder;
gsm decoder;
};
static switch_status switch_gsm_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_gsm_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct gsm_context *context;
@ -55,7 +55,7 @@ static switch_status switch_gsm_init(switch_codec_t *codec, switch_codec_flag fl
codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_destroy(switch_codec_t *codec)
static switch_status_t switch_gsm_destroy(switch_codec_t *codec)
{
struct gsm_context *context = codec->private_info;
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
@ -67,7 +67,7 @@ static switch_status switch_gsm_destroy(switch_codec_t *codec)
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data,
static switch_status_t switch_gsm_encode(switch_codec_t *codec, switch_codec_t *other_codec, void *decoded_data,
uint32_t decoded_data_len, uint32_t decoded_rate, void *encoded_data,
uint32_t *encoded_data_len, uint32_t *encoded_rate, unsigned int *flag)
{
@ -96,7 +96,7 @@ static switch_status switch_gsm_encode(switch_codec_t *codec, switch_codec_t *ot
}
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data,
static switch_status_t switch_gsm_decode(switch_codec_t *codec, switch_codec_t *other_codec, void *encoded_data,
uint32_t encoded_data_len, uint32_t encoded_rate, void *decoded_data,
uint32_t *decoded_data_len, uint32_t *decoded_rate, unsigned int *flag)
{
@ -147,14 +147,14 @@ static const switch_codec_implementation_t gsm_8k_implementation = {
/*.decode */ switch_gsm_decode,
/*.destroy */ switch_gsm_destroy,
};
static const switch_codec_interface gsm_codec_interface = {
static const switch_codec_interface_t gsm_codec_interface = {
/*.interface_name */ "gsm",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 3,
/*.iananame */ "gsm",
/*.implementations */ &gsm_8k_implementation,
};
static switch_loadable_module_interface gsm_module_interface = {
static switch_loadable_module_interface_t gsm_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -162,7 +162,7 @@ static switch_loadable_module_interface gsm_module_interface = {
/*.codec_interface */ &gsm_codec_interface,
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{

View File

@ -44,7 +44,7 @@ struct ilbc_context {
uint16_t dbytes;
};
static switch_status switch_ilbc_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_ilbc_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct ilbc_context *context;
@ -86,14 +86,14 @@ static switch_status switch_ilbc_init(switch_codec_t *codec, switch_codec_flag f
}
static switch_status switch_ilbc_destroy(switch_codec_t *codec)
static switch_status_t switch_ilbc_destroy(switch_codec_t *codec)
{
codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_ilbc_encode(switch_codec_t *codec,
static switch_status_t switch_ilbc_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -136,7 +136,7 @@ static switch_status switch_ilbc_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_ilbc_decode(switch_codec_t *codec,
static switch_status_t switch_ilbc_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -236,7 +236,7 @@ static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation =
};
static const switch_codec_interface ilbc_20ms_codec_interface = {
static const switch_codec_interface_t ilbc_20ms_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
@ -244,7 +244,7 @@ static const switch_codec_interface ilbc_20ms_codec_interface = {
/*.implementations */ &ilbc_8k_20ms_nonext_implementation
};
static const switch_codec_interface ilbc_102_codec_interface = {
static const switch_codec_interface_t ilbc_102_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 102,
@ -253,7 +253,7 @@ static const switch_codec_interface ilbc_102_codec_interface = {
/*.next*/ &ilbc_20ms_codec_interface
};
static const switch_codec_interface ilbc_codec_interface = {
static const switch_codec_interface_t ilbc_codec_interface = {
/*.interface_name */ "ilbc",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 97,
@ -263,7 +263,7 @@ static const switch_codec_interface ilbc_codec_interface = {
};
static switch_loadable_module_interface ilbc_module_interface = {
static switch_loadable_module_interface_t ilbc_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -274,7 +274,7 @@ static switch_loadable_module_interface ilbc_module_interface = {
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface,
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface,
char *filename)
{

View File

@ -34,7 +34,7 @@
static const char modname[] = "mod_rawaudio";
static switch_status switch_raw_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_raw_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
int encoding, decoding;
@ -49,7 +49,7 @@ static switch_status switch_raw_init(switch_codec_t *codec, switch_codec_flag fl
}
}
static switch_status switch_raw_encode(switch_codec_t *codec,
static switch_status_t switch_raw_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -67,7 +67,7 @@ static switch_status switch_raw_encode(switch_codec_t *codec,
return SWITCH_STATUS_NOOP;
}
static switch_status switch_raw_decode(switch_codec_t *codec,
static switch_status_t switch_raw_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -84,7 +84,7 @@ static switch_status switch_raw_decode(switch_codec_t *codec,
}
static switch_status switch_raw_destroy(switch_codec_t *codec)
static switch_status_t switch_raw_destroy(switch_codec_t *codec)
{
return SWITCH_STATUS_SUCCESS;
@ -176,7 +176,7 @@ static const switch_codec_implementation_t raw_8k_30ms_implementation = {
};
static const switch_codec_interface raw_codec_interface = {
static const switch_codec_interface_t raw_codec_interface = {
/*.interface_name */ "raw signed linear (16 bit)",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 10,
@ -184,7 +184,7 @@ static const switch_codec_interface raw_codec_interface = {
/*.implementations */ &raw_8k_30ms_implementation
};
static switch_loadable_module_interface raw_module_interface = {
static switch_loadable_module_interface_t raw_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -196,7 +196,7 @@ static switch_loadable_module_interface raw_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &raw_module_interface;

View File

@ -72,7 +72,7 @@ struct speex_context {
int decoder_mode;
};
static switch_status switch_speex_init(switch_codec_t *codec, switch_codec_flag flags,
static switch_status_t switch_speex_init(switch_codec_t *codec, switch_codec_flag_t flags,
const switch_codec_settings_t *codec_settings)
{
struct speex_context *context = NULL;
@ -157,7 +157,7 @@ static switch_status switch_speex_init(switch_codec_t *codec, switch_codec_flag
}
}
static switch_status switch_speex_encode(switch_codec_t *codec,
static switch_status_t switch_speex_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -212,7 +212,7 @@ static switch_status switch_speex_encode(switch_codec_t *codec,
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_speex_decode(switch_codec_t *codec,
static switch_status_t switch_speex_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -239,7 +239,7 @@ static switch_status switch_speex_decode(switch_codec_t *codec,
}
static switch_status switch_speex_destroy(switch_codec_t *codec)
static switch_status_t switch_speex_destroy(switch_codec_t *codec)
{
int encoding, decoding;
struct speex_context *context = codec->private_info;
@ -317,7 +317,7 @@ static const switch_codec_implementation_t speex_8k_implementation = {
/*.next */ &speex_16k_implementation
};
static const switch_codec_interface speex_codec_interface = {
static const switch_codec_interface_t speex_codec_interface = {
/*.interface_name */ "speex",
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 98,
@ -325,7 +325,7 @@ static const switch_codec_interface speex_codec_interface = {
/*.implementations */ &speex_8k_implementation
};
static switch_loadable_module_interface speex_module_interface = {
static switch_loadable_module_interface_t speex_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -334,7 +334,7 @@ static switch_loadable_module_interface speex_module_interface = {
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &speex_module_interface;

View File

@ -102,13 +102,13 @@ static switch_caller_extension_t *demo_dialplan_hunt(switch_core_session_t *sess
}
static const switch_dialplan_interface demo_dialplan_interface = {
static const switch_dialplan_interface_t demo_dialplan_interface = {
/*.interface_name = */ "demo",
/*.hunt_function = */ demo_dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface demo_dialplan_module_interface = {
static const switch_loadable_module_interface_t demo_dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -117,7 +117,7 @@ static const switch_loadable_module_interface demo_dialplan_module_interface = {
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */

View File

@ -89,7 +89,7 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
switch_channel_t *channel;
char *var, *val;
char filter[256];
switch_directory_handle dh;
switch_directory_handle_t dh;
char app[512];
char *data;
@ -153,13 +153,13 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
}
static const switch_dialplan_interface directory_dialplan_interface = {
static const switch_dialplan_interface_t directory_dialplan_interface = {
/*.interface_name = */ "directory",
/*.hunt_function = */ directory_dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface directory_dialplan_module_interface = {
static const switch_loadable_module_interface_t directory_dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -168,7 +168,7 @@ static const switch_loadable_module_interface directory_dialplan_module_interfac
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
load_config();

View File

@ -198,13 +198,13 @@ static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session)
}
static const switch_dialplan_interface dialplan_interface = {
static const switch_dialplan_interface_t dialplan_interface = {
/*.interface_name = */ "pcre",
/*.hunt_function = */ dialplan_hunt
/*.next = NULL */
};
static const switch_loadable_module_interface dialplan_module_interface = {
static const switch_loadable_module_interface_t dialplan_module_interface = {
/*.module_name = */ modname,
/*.endpoint_interface = */ NULL,
/*.timer_interface = */ NULL,
@ -213,7 +213,7 @@ static const switch_loadable_module_interface dialplan_module_interface = {
/*.application_interface = */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */

View File

@ -57,7 +57,7 @@ struct ldap_context {
};
static switch_status mod_ldap_open(switch_directory_handle *dh, char *source, char *dsn, char *passwd)
static switch_status_t mod_ldap_open(switch_directory_handle_t *dh, char *source, char *dsn, char *passwd)
{
struct ldap_context *context;
int auth_method = LDAP_AUTH_SIMPLE;
@ -86,7 +86,7 @@ static switch_status mod_ldap_open(switch_directory_handle *dh, char *source, ch
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_close(switch_directory_handle *dh)
static switch_status_t mod_ldap_close(switch_directory_handle_t *dh)
{
struct ldap_context *context;
@ -98,7 +98,7 @@ static switch_status mod_ldap_close(switch_directory_handle *dh)
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_query(switch_directory_handle *dh, char *base, char *query)
static switch_status_t mod_ldap_query(switch_directory_handle_t *dh, char *base, char *query)
{
struct ldap_context *context;
@ -116,7 +116,7 @@ static switch_status mod_ldap_query(switch_directory_handle *dh, char *base, cha
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_next(switch_directory_handle *dh)
static switch_status_t mod_ldap_next(switch_directory_handle_t *dh)
{
struct ldap_context *context;
@ -140,7 +140,7 @@ static switch_status mod_ldap_next(switch_directory_handle *dh)
return SWITCH_STATUS_SUCCESS;
}
static switch_status mod_ldap_next_pair(switch_directory_handle *dh, char **var, char **val)
static switch_status_t mod_ldap_next_pair(switch_directory_handle_t *dh, char **var, char **val)
{
struct ldap_context *context;
@ -197,7 +197,7 @@ static switch_status mod_ldap_next_pair(switch_directory_handle *dh, char **var,
}
static const switch_directory_interface ldap_directory_interface = {
static const switch_directory_interface_t ldap_directory_interface = {
/*.interface_name */ "ldap",
/*.directory_open*/ mod_ldap_open,
/*.directory_close*/ mod_ldap_close,
@ -207,7 +207,7 @@ static const switch_directory_interface ldap_directory_interface = {
};
static switch_loadable_module_interface skel_module_interface = {
static switch_loadable_module_interface_t skel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -220,7 +220,7 @@ static switch_loadable_module_interface skel_module_interface = {
/*.directory_interface */ &ldap_directory_interface
};
switch_status switch_module_load(const switch_loadable_module_interface **interface, char *filename)
switch_status_t switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &skel_module_interface;

View File

@ -104,7 +104,7 @@ struct private_object {
switch_caller_profile_t *caller_profile;
unsigned short samprate;
switch_mutex_t *mutex;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
unsigned int num_codecs;
int codec_index;
switch_rtp_t *rtp_session;
@ -149,21 +149,21 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string, globals.codec_rates_string)
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,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t 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_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsession, ldl_signal_t signal, char *msg);
static ldl_status handle_response(ldl_handle_t *handle, char *id);
static switch_status load_config(void);
static switch_status_t load_config(void);
static void dl_logger(char *file, const char *func, int line, int level, char *fmt, ...)
{
@ -548,7 +548,7 @@ static void negotiate_thread_launch(switch_core_session_t *session)
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_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@ -567,7 +567,7 @@ static switch_status channel_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -583,7 +583,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -601,7 +601,7 @@ static switch_status channel_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_hangup(switch_core_session_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -640,7 +640,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -664,19 +664,19 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t 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_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -686,7 +686,7 @@ static switch_status channel_waitfor_read(switch_core_session_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -697,7 +697,7 @@ static switch_status channel_waitfor_write(switch_core_session_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
//char *digit;
@ -709,15 +709,15 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
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_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt = NULL;
uint32_t bytes = 0;
switch_size_t samples = 0, frames = 0, ms = 0;
switch_channel_t *channel = NULL;
switch_payload_t payload = 0;
switch_status status;
switch_status_t status;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -806,12 +806,12 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return SWITCH_STATUS_SUCCESS;
}
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_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int bytes = 0, samples = 0, frames = 0;
@ -914,7 +914,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
return status;
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -934,7 +934,7 @@ static switch_status channel_answer_channel(switch_core_session_t *session)
}
static switch_status channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
{
switch_channel_t *channel;
struct private_object *tech_pvt;
@ -975,7 +975,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@ -987,7 +987,7 @@ static const switch_io_routines channel_io_routines = {
/*.receive_message*/ channel_receive_message
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "dingaling",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@ -995,7 +995,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@ -1008,7 +1008,7 @@ 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_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t 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) {
@ -1105,7 +1105,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@ -1161,7 +1161,7 @@ static void init_profile(struct mdl_profile *profile)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.running) {
int x = 0;
@ -1179,7 +1179,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@ -1506,7 +1506,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
case LDL_SIGNAL_ERROR:
case LDL_SIGNAL_TERMINATE:
if (channel) {
switch_channel_state state = switch_channel_get_state(channel);
switch_channel_state_t state = switch_channel_get_state(channel);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "hungup %s %u %d\n", switch_channel_get_name(channel), state, CS_INIT);
switch_set_flag(tech_pvt, TFLAG_BYE);
switch_clear_flag(tech_pvt, TFLAG_IO);

View File

@ -145,20 +145,20 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_rtpip, globals.rtpip)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_sipip, globals.sipip)
static switch_status exosip_on_init(switch_core_session_t *session);
static switch_status exosip_on_hangup(switch_core_session_t *session);
static switch_status exosip_on_loopback(switch_core_session_t *session);
static switch_status exosip_on_transmit(switch_core_session_t *session);
static switch_status exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t exosip_on_init(switch_core_session_t *session);
static switch_status_t exosip_on_hangup(switch_core_session_t *session);
static switch_status_t exosip_on_loopback(switch_core_session_t *session);
static switch_status_t exosip_on_transmit(switch_core_session_t *session);
static switch_status_t exosip_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 exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static int config_exosip(int reload);
static switch_status parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload);
static switch_status exosip_kill_channel(switch_core_session_t *session, int sig);
static switch_status activate_rtp(struct private_object *tech_pvt);
static switch_status_t parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload);
static switch_status_t exosip_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t activate_rtp(struct private_object *tech_pvt);
static void deactivate_rtp(struct private_object *tech_pvt);
static void sdp_add_rfc2833(struct osip_rfc3264 *cnf, int rate);
@ -173,7 +173,7 @@ static struct private_object *get_pvt_by_call_id(int id)
return tech_pvt;
}
static switch_status exosip_on_execute(switch_core_session_t *session)
static switch_status_t exosip_on_execute(switch_core_session_t *session)
{
return SWITCH_STATUS_SUCCESS;
}
@ -223,7 +223,7 @@ State methods they get called when the state changes to the specific state
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 exosip_on_init(switch_core_session_t *session)
static switch_status_t exosip_on_init(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -244,7 +244,7 @@ static switch_status exosip_on_init(switch_core_session_t *session)
char *dest_uri;
char *ip, *err;
switch_port_t sdp_port;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
/* do SIP Goodies... */
@ -382,7 +382,7 @@ static switch_status exosip_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_ring(switch_core_session_t *session)
static switch_status_t exosip_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -398,7 +398,7 @@ static switch_status exosip_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_hangup(switch_core_session_t *session)
static switch_status_t exosip_on_hangup(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -427,13 +427,13 @@ static switch_status exosip_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_loopback(switch_core_session_t *session)
static switch_status_t exosip_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXOSIP LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_on_transmit(switch_core_session_t *session)
static switch_status_t exosip_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "EXOSIP TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
@ -459,7 +459,7 @@ static void deactivate_rtp(struct private_object *tech_pvt)
}
}
static switch_status activate_rtp(struct private_object *tech_pvt)
static switch_status_t activate_rtp(struct private_object *tech_pvt)
{
int bw, ms;
switch_channel_t *channel;
@ -537,7 +537,7 @@ static switch_status activate_rtp(struct private_object *tech_pvt)
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_answer_channel(switch_core_session_t *session)
static switch_status_t exosip_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -571,8 +571,8 @@ static switch_status exosip_answer_channel(switch_core_session_t *session)
}
static switch_status exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t exosip_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt = NULL;
size_t bytes = 0, samples = 0, frames = 0, ms = 0;
@ -607,7 +607,7 @@ static switch_status exosip_read_frame(switch_core_session_t *session, switch_fr
}
if (switch_test_flag(tech_pvt, TFLAG_IO)) {
switch_status status;
switch_status_t status;
if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
return SWITCH_STATUS_GENERR;
@ -699,12 +699,12 @@ static switch_status exosip_read_frame(switch_core_session_t *session, switch_fr
}
static switch_status exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t exosip_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
int bytes = 0, samples = 0, frames = 0;
channel = switch_core_session_get_channel(session);
@ -811,7 +811,7 @@ static switch_status exosip_write_frame(switch_core_session_t *session, switch_f
static switch_status exosip_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t exosip_kill_channel(switch_core_session_t *session, int sig)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -833,7 +833,7 @@ static switch_status exosip_kill_channel(switch_core_session_t *session, int sig
}
static switch_status exosip_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t exosip_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -848,7 +848,7 @@ static switch_status exosip_waitfor_read(switch_core_session_t *session, int ms,
}
static switch_status exosip_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t exosip_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -863,7 +863,7 @@ static switch_status exosip_waitfor_write(switch_core_session_t *session, int ms
}
static switch_status exosip_send_dtmf(switch_core_session_t *session, char *digits)
static switch_status_t exosip_send_dtmf(switch_core_session_t *session, char *digits)
{
struct private_object *tech_pvt;
char *c;
@ -891,7 +891,7 @@ static switch_status exosip_send_dtmf(switch_core_session_t *session, char *digi
return SWITCH_STATUS_SUCCESS;
}
static switch_status exosip_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
static switch_status_t exosip_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
{
switch_channel_t *channel;
struct private_object *tech_pvt;
@ -957,7 +957,7 @@ static switch_status exosip_receive_message(switch_core_session_t *session, swit
return SWITCH_STATUS_SUCCESS;
}
static const switch_io_routines exosip_io_routines = {
static const switch_io_routines_t exosip_io_routines = {
/*.outgoing_channel */ exosip_outgoing_channel,
/*.answer_channel */ exosip_answer_channel,
/*.read_frame */ exosip_read_frame,
@ -978,7 +978,7 @@ static const switch_state_handler_table_t exosip_event_handlers = {
/*.on_transmit */ exosip_on_transmit
};
static const switch_endpoint_interface exosip_endpoint_interface = {
static const switch_endpoint_interface_t exosip_endpoint_interface = {
/*.interface_name */ "exosip",
/*.io_routines */ &exosip_io_routines,
/*.event_handlers */ &exosip_event_handlers,
@ -986,7 +986,7 @@ static const switch_endpoint_interface exosip_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface exosip_module_interface = {
static const switch_loadable_module_interface_t exosip_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &exosip_endpoint_interface,
/*.timer_interface */ NULL,
@ -995,7 +995,7 @@ static const switch_loadable_module_interface exosip_module_interface = {
/*.application_interface */ NULL
};
static switch_status exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t exosip_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(&exosip_endpoint_interface, pool)) != 0) {
@ -1060,7 +1060,7 @@ static switch_status exosip_outgoing_channel(switch_core_session_t *session, swi
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.running) {
globals.running = -1;
@ -1071,7 +1071,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* NOTE: **interface is **_interface because the common lib redefines interface to struct in some situations */
@ -1111,7 +1111,7 @@ static void sdp_add_rfc2833(struct osip_rfc3264 *cnf, int rate)
}
static switch_status exosip_create_call(eXosip_event_t * event)
static switch_status_t exosip_create_call(eXosip_event_t * event)
{
switch_core_session_t *session;
sdp_message_t *remote_sdp = NULL;
@ -1126,7 +1126,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
if ((session = switch_core_session_request(&exosip_endpoint_interface, NULL)) != 0) {
struct private_object *tech_pvt;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
switch_port_t sdp_port;
char *ip, *err;
@ -1434,12 +1434,12 @@ static void destroy_call_by_event(eXosip_event_t *event)
}
static switch_status parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload)
static switch_status_t parse_sdp_media(sdp_media_t * media, char **dname, char **drate, char **dpayload)
{
int pos = 0;
sdp_attribute_t *attr = NULL;
char *name, *rate, *payload;
switch_status status = SWITCH_STATUS_GENERR;
switch_status_t status = SWITCH_STATUS_GENERR;
while (osip_list_eol(media->a_attributes, pos) == 0) {
attr = (sdp_attribute_t *) osip_list_get(media->a_attributes, pos);
@ -1805,7 +1805,7 @@ static int config_exosip(int reload)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
eXosip_event_t *event = NULL;
switch_event_t *s_event;

View File

@ -204,7 +204,7 @@ typedef enum {
IAX_QUERY = 2
} iax_io_t;
static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_session *iax_session,
static switch_status_t iax_set_codec(struct private_object *tech_pvt, struct iax_session *iax_session,
unsigned int *format, unsigned int *cababilities, unsigned short *samprate,
iax_io_t io)
{
@ -212,7 +212,7 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
//int rate = 8000;
//int codec_ms = 20;
switch_channel_t *channel;
switch_codec_interface *codecs[SWITCH_MAX_CODECS];
switch_codec_interface_t *codecs[SWITCH_MAX_CODECS];
int num_codecs = 0;
unsigned int local_cap = 0, mixed_cap = 0, chosen = 0, leading = 0;
int x, srate = 8000;
@ -390,18 +390,18 @@ static switch_status iax_set_codec(struct private_object *tech_pvt, struct iax_s
return SWITCH_STATUS_SUCCESS;
}
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,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t 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_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static void iax_err_cb(const char *s)
@ -422,7 +422,7 @@ State methods they get called when the state changes to the specific state
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_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@ -449,7 +449,7 @@ static switch_status channel_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -465,7 +465,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -483,7 +483,7 @@ static switch_status channel_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_hangup(switch_core_session_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -519,7 +519,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -541,19 +541,19 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t 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_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -563,7 +563,7 @@ static switch_status channel_waitfor_read(switch_core_session_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -574,7 +574,7 @@ static switch_status channel_waitfor_write(switch_core_session_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
char *digit;
@ -590,8 +590,8 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
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_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -636,8 +636,8 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return SWITCH_STATUS_FALSE;
}
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_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -665,7 +665,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -691,7 +691,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@ -702,7 +702,7 @@ static const switch_io_routines channel_io_routines = {
/*.send_dtmf */ channel_send_dtmf
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "iax",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@ -710,7 +710,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@ -723,7 +723,7 @@ 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_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t 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) {
@ -790,7 +790,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@ -815,7 +815,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
#define REGISTERED 1
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@ -867,7 +867,7 @@ static switch_status load_config(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
//int refresh;
struct iax_event *iaxevent = NULL;
@ -1115,7 +1115,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;

View File

@ -98,35 +98,35 @@ 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_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,
static switch_status_t channel_on_init(switch_core_session_t *session);
static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t 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_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status engage_device(struct private_object *tech_pvt);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t engage_device(struct private_object *tech_pvt);
static int dump_info(void);
static switch_status load_config(void);
static switch_status_t load_config(void);
static int get_dev_by_name(char *name, int in);
static switch_status place_call(char *dest, char *out, size_t outlen);
static switch_status hup_call(char *callid, char *out, size_t outlen);
static switch_status call_info(char *callid, char *out, size_t outlen);
static switch_status send_dtmf(char *callid, char *out, size_t outlen);
static switch_status answer_call(char *callid, char *out, size_t outlen);
static switch_status_t place_call(char *dest, char *out, size_t outlen);
static switch_status_t hup_call(char *callid, char *out, size_t outlen);
static switch_status_t call_info(char *callid, char *out, size_t outlen);
static switch_status_t send_dtmf(char *callid, char *out, size_t outlen);
static switch_status_t answer_call(char *callid, char *out, size_t outlen);
/*
State methods they get called when the state changes to the specific state
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_t *session)
static switch_status_t channel_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@ -148,7 +148,7 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_ring(switch_core_session_t *session)
static switch_status_t channel_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -164,7 +164,7 @@ static switch_status channel_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_execute(switch_core_session_t *session)
static switch_status_t channel_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -196,7 +196,7 @@ 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_t *session)
static switch_status_t channel_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -220,7 +220,7 @@ static switch_status channel_on_hangup(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -241,13 +241,13 @@ static switch_status channel_kill_channel(switch_core_session_t *session, int si
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_on_loopback(switch_core_session_t *session)
static switch_status_t 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_t *session)
static switch_status_t channel_on_transmit(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -291,7 +291,7 @@ static switch_status channel_on_transmit(switch_core_session_t *session)
}
static switch_status channel_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t 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_t *session, int ms
return SWITCH_STATUS_SUCCESS;
}
static switch_status channel_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t 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_t *session, int m
}
static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtmf)
static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct private_object *tech_pvt = NULL;
@ -324,13 +324,13 @@ static switch_status channel_send_dtmf(switch_core_session_t *session, char *dtm
return SWITCH_STATUS_SUCCESS;
}
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_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
int samples;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -358,12 +358,12 @@ static switch_status channel_read_frame(switch_core_session_t *session, switch_f
return status;
}
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_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -384,7 +384,7 @@ static switch_status channel_write_frame(switch_core_session_t *session, switch_
}
static switch_status channel_answer_channel(switch_core_session_t *session)
static switch_status_t channel_answer_channel(switch_core_session_t *session)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -399,35 +399,35 @@ static switch_status channel_answer_channel(switch_core_session_t *session)
}
static struct switch_api_interface send_dtmf_interface = {
static switch_api_interface_t send_dtmf_interface = {
/*.interface_name */ "padtmf",
/*.desc */ "PortAudio Dial DTMF",
/*.function */ send_dtmf,
/*.next */ NULL
};
static struct switch_api_interface answer_call_interface = {
static switch_api_interface_t answer_call_interface = {
/*.interface_name */ "paoffhook",
/*.desc */ "PortAudio Answer Call",
/*.function */ answer_call,
/*.next */ &send_dtmf_interface
};
static struct switch_api_interface channel_info_interface = {
static switch_api_interface_t channel_info_interface = {
/*.interface_name */ "painfo",
/*.desc */ "PortAudio Call Info",
/*.function */ call_info,
/*.next */ &answer_call_interface
};
static struct switch_api_interface channel_hup_interface = {
static switch_api_interface_t channel_hup_interface = {
/*.interface_name */ "pahup",
/*.desc */ "PortAudio Hangup Call",
/*.function */ hup_call,
/*.next */ &channel_info_interface
};
static struct switch_api_interface channel_api_interface = {
static switch_api_interface_t channel_api_interface = {
/*.interface_name */ "pacall",
/*.desc */ "PortAudio Call",
/*.function */ place_call,
@ -443,7 +443,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
/*.on_transmit */ channel_on_transmit
};
static const switch_io_routines channel_io_routines = {
static const switch_io_routines_t channel_io_routines = {
/*.outgoing_channel */ channel_outgoing_channel,
/*.answer_channel */ channel_answer_channel,
/*.read_frame */ channel_read_frame,
@ -454,7 +454,7 @@ static const switch_io_routines channel_io_routines = {
/*.send_dtmf */ channel_send_dtmf
};
static const switch_endpoint_interface channel_endpoint_interface = {
static const switch_endpoint_interface_t channel_endpoint_interface = {
/*.interface_name */ "portaudio",
/*.io_routines */ &channel_io_routines,
/*.event_handlers */ &channel_event_handlers,
@ -462,7 +462,7 @@ static const switch_endpoint_interface channel_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface channel_module_interface = {
static const switch_loadable_module_interface_t channel_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &channel_endpoint_interface,
/*.timer_interface */ NULL,
@ -475,7 +475,7 @@ 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_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t 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) {
@ -523,7 +523,7 @@ static switch_status channel_outgoing_channel(switch_core_session_t *session, sw
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
@ -552,7 +552,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
char *var, *val;
@ -607,7 +607,7 @@ static switch_status load_config(void)
}
/*
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
switch_yield(50000);
@ -616,7 +616,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
}
*/
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
Pa_Terminate();
@ -710,7 +710,7 @@ static int dump_info(void)
return err;
}
static switch_status engage_device(struct private_object *tech_pvt)
static switch_status_t engage_device(struct private_object *tech_pvt)
{
int sample_rate = globals.sample_rate;
int codec_ms = 20;
@ -780,10 +780,10 @@ static switch_status engage_device(struct private_object *tech_pvt)
return SWITCH_STATUS_FALSE;
}
static switch_status place_call(char *dest, char *out, size_t outlen)
static switch_status_t place_call(char *dest, char *out, size_t outlen)
{
switch_core_session_t *session;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
if (!dest) {
strncpy(out, "Usage: pacall <exten>", outlen - 1);
@ -831,7 +831,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)
static switch_status_t hup_call(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt;
switch_channel_t *channel = NULL;
@ -875,7 +875,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)
static switch_status_t send_dtmf(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt = NULL;
switch_channel_t *channel = NULL;
@ -899,7 +899,7 @@ static switch_status send_dtmf(char *callid, char *out, size_t outlen)
return SWITCH_STATUS_SUCCESS;
}
static switch_status answer_call(char *callid, char *out, size_t outlen)
static switch_status_t answer_call(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt = NULL;
switch_channel_t *channel = NULL;
@ -931,7 +931,7 @@ static void print_info(struct private_object *tech_pvt, char *out, size_t outlen
}
static switch_status call_info(char *callid, char *out, size_t outlen)
static switch_status_t call_info(char *callid, char *out, size_t outlen)
{
struct private_object *tech_pvt;
switch_hash_index_t *hi;

View File

@ -163,18 +163,18 @@ typedef struct woomera_event_queue woomera_event_queue;
static woomera_profile default_profile;
static switch_status woomerachan_on_init(switch_core_session_t *session);
static switch_status woomerachan_on_hangup(switch_core_session_t *session);
static switch_status woomerachan_on_ring(switch_core_session_t *session);
static switch_status woomerachan_on_loopback(switch_core_session_t *session);
static switch_status woomerachan_on_transmit(switch_core_session_t *session);
static switch_status woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t woomerachan_on_init(switch_core_session_t *session);
static switch_status_t woomerachan_on_hangup(switch_core_session_t *session);
static switch_status_t woomerachan_on_ring(switch_core_session_t *session);
static switch_status_t woomerachan_on_loopback(switch_core_session_t *session);
static switch_status_t woomerachan_on_transmit(switch_core_session_t *session);
static switch_status_t woomerachan_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 woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id);
static switch_status woomerachan_kill_channel(switch_core_session_t *session, int sig);
static switch_status_t woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t woomerachan_kill_channel(switch_core_session_t *session, int sig);
static void tech_destroy(private_object * tech_pvt);
static void woomera_printf(woomera_profile * profile, switch_socket_t *socket, char *fmt, ...);
static char *woomera_message_header(woomera_message * wmsg, char *key);
@ -195,7 +195,7 @@ static int tech_activate(private_object * tech_pvt);
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 woomerachan_on_init(switch_core_session_t *session)
static switch_status_t woomerachan_on_init(switch_core_session_t *session)
{
switch_channel_t *channel;
struct private_object *tech_pvt = NULL;
@ -239,7 +239,7 @@ static switch_status woomerachan_on_init(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_ring(switch_core_session_t *session)
static switch_status_t woomerachan_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -255,7 +255,7 @@ static switch_status woomerachan_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_execute(switch_core_session_t *session)
static switch_status_t woomerachan_on_execute(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -273,7 +273,7 @@ static switch_status woomerachan_on_execute(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_hangup(switch_core_session_t *session)
static switch_status_t woomerachan_on_hangup(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -311,7 +311,7 @@ static void udp_socket_close(struct private_object *tech_pvt)
}
static switch_status woomerachan_kill_channel(switch_core_session_t *session, int sig)
static switch_status_t woomerachan_kill_channel(switch_core_session_t *session, int sig)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -336,19 +336,19 @@ static switch_status woomerachan_kill_channel(switch_core_session_t *session, in
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_loopback(switch_core_session_t *session)
static switch_status_t woomerachan_on_loopback(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WOOMERACHAN LOOPBACK\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_on_transmit(switch_core_session_t *session)
static switch_status_t woomerachan_on_transmit(switch_core_session_t *session)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "WOOMERACHAN TRANSMIT\n");
return SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t woomerachan_waitfor_read(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -358,7 +358,7 @@ static switch_status woomerachan_waitfor_read(switch_core_session_t *session, in
return switch_socket_waitfor(&tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
}
static switch_status woomerachan_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
static switch_status_t woomerachan_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
{
struct private_object *tech_pvt = NULL;
@ -369,8 +369,8 @@ static switch_status woomerachan_waitfor_write(switch_core_session_t *session, i
// return switch_socket_waitfor(&tech_pvt->write_poll, ms);
}
static switch_status woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t woomerachan_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -404,8 +404,8 @@ static switch_status woomerachan_read_frame(switch_core_session_t *session, swit
return SWITCH_STATUS_FALSE;
}
static switch_status woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag flags, int stream_id)
static switch_status_t woomerachan_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
switch_io_flag_t flags, int stream_id)
{
switch_channel_t *channel = NULL;
struct private_object *tech_pvt = NULL;
@ -441,7 +441,7 @@ static const switch_state_handler_table_t woomerachan_event_handlers = {
/*.on_transmit */ woomerachan_on_transmit
};
static const switch_io_routines woomerachan_io_routines = {
static const switch_io_routines_t woomerachan_io_routines = {
/*.outgoing_channel */ woomerachan_outgoing_channel,
/*.answer_channel */ NULL,
/*.read_frame */ woomerachan_read_frame,
@ -451,7 +451,7 @@ static const switch_io_routines woomerachan_io_routines = {
/*.waitfor_write */ woomerachan_waitfor_write
};
static const switch_endpoint_interface woomerachan_endpoint_interface = {
static const switch_endpoint_interface_t woomerachan_endpoint_interface = {
/*.interface_name */ "woomera",
/*.io_routines */ &woomerachan_io_routines,
/*.event_handlers */ &woomerachan_event_handlers,
@ -459,7 +459,7 @@ static const switch_endpoint_interface woomerachan_endpoint_interface = {
/*.next */ NULL
};
static const switch_loadable_module_interface woomerachan_module_interface = {
static const switch_loadable_module_interface_t woomerachan_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ &woomerachan_endpoint_interface,
/*.timer_interface */ NULL,
@ -472,7 +472,7 @@ static const switch_loadable_module_interface woomerachan_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 woomerachan_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
static switch_status_t woomerachan_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(&woomerachan_endpoint_interface, pool)) != 0) {
@ -1276,7 +1276,7 @@ static void *woomera_thread_run(void *obj)
return NULL;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
woomera_thread_run(&default_profile);
@ -1284,7 +1284,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
return SWITCH_STATUS_TERM;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;
woomera_profile_thread_running(&default_profile, 1, 0);
@ -1298,7 +1298,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
switch_config_t cfg;

View File

@ -48,10 +48,10 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_address, globals.address)
#define MULTICAST_EVENT "multicast::event"
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *var, *val;
char *cf = "event_multicast.conf";
@ -105,7 +105,7 @@ static void event_handler(switch_event_t *event)
}
static switch_loadable_module_interface event_test_module_interface = {
static switch_loadable_module_interface_t event_test_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -115,7 +115,7 @@ static switch_loadable_module_interface event_test_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
memset(&globals, 0, sizeof(globals));
@ -173,7 +173,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
int x = 0;
@ -187,7 +187,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
switch_event_t *local_event;
char buf[1024];

View File

@ -52,7 +52,7 @@ static void event_handler(switch_event_t *event)
static switch_loadable_module_interface event_test_module_interface = {
static switch_loadable_module_interface_t event_test_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -96,7 +96,7 @@ static void *torture_thread(switch_thread_t *thread, void *obj)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Thread Ended\n");
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
THREADS = -1;
switch_yield(100000);
@ -105,7 +105,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
#endif
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &event_test_module_interface;

View File

@ -95,10 +95,10 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_jid, globals.jid)
SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_passwd, globals.passwd)
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
char *var, *val;
char *cf = "xmpp_event.conf";
int count = 0;
@ -346,7 +346,7 @@ static void xmpp_connect(char *jabber_id, char *pass)
}
static switch_loadable_module_interface xmpp_event_module_interface = {
static switch_loadable_module_interface_t xmpp_event_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -355,7 +355,7 @@ static switch_loadable_module_interface xmpp_event_module_interface = {
/*.application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */
*interface = &xmpp_event_module_interface;
@ -369,7 +369,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (RUNNING) {
@ -382,7 +382,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
RUNNING = 1;
xmpp_connect(globals.jid, globals.passwd);

View File

@ -191,10 +191,10 @@ static void event_handler(switch_event_t *event)
}
static switch_status load_config(void)
static switch_status_t load_config(void)
{
switch_config_t cfg;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *var, *val;
char *cf = "zeroconf.conf";
int count = 0;
@ -240,7 +240,7 @@ static switch_status load_config(void)
}
static switch_loadable_module_interface zeroconf_module_interface = {
static switch_loadable_module_interface_t zeroconf_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -254,7 +254,7 @@ static switch_loadable_module_interface zeroconf_module_interface = {
static int RUNNING = 0;
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (RUNNING == 1) {
RUNNING = -1;
@ -264,7 +264,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
memset(&globals, 0, sizeof(globals));
@ -303,7 +303,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_modul
}
SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
{
RUNNING = 1;

View File

@ -41,7 +41,7 @@ struct sndfile_context {
typedef struct sndfile_context sndfile_context;
static switch_status sndfile_file_open(switch_file_handle_t *handle, char *path)
static switch_status_t sndfile_file_open(switch_file_handle_t *handle, char *path)
{
sndfile_context *context;
int mode = 0;
@ -144,7 +144,7 @@ static switch_status sndfile_file_open(switch_file_handle_t *handle, char *path)
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_close(switch_file_handle_t *handle)
static switch_status_t sndfile_file_close(switch_file_handle_t *handle)
{
sndfile_context *context = handle->private_info;
@ -153,7 +153,7 @@ static switch_status sndfile_file_close(switch_file_handle_t *handle)
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
static switch_status_t sndfile_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
{
sndfile_context *context = handle->private_info;
@ -169,7 +169,7 @@ static switch_status sndfile_file_seek(switch_file_handle_t *handle, unsigned in
}
static switch_status sndfile_file_read(switch_file_handle_t *handle, void *data, size_t *len)
static switch_status_t sndfile_file_read(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
@ -191,7 +191,7 @@ static switch_status sndfile_file_read(switch_file_handle_t *handle, void *data,
return SWITCH_STATUS_SUCCESS;
}
static switch_status sndfile_file_write(switch_file_handle_t *handle, void *data, size_t *len)
static switch_status_t sndfile_file_write(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
@ -217,7 +217,7 @@ static switch_status sndfile_file_write(switch_file_handle_t *handle, void *data
static char **supported_formats;
static switch_file_interface sndfile_file_interface = {
static switch_file_interface_t sndfile_file_interface = {
/*.interface_name */ modname,
/*.file_open */ sndfile_file_open,
/*.file_close */ sndfile_file_close,
@ -228,7 +228,7 @@ static switch_file_interface sndfile_file_interface = {
/*.next */ NULL,
};
static switch_loadable_module_interface sndfile_module_interface = {
static switch_loadable_module_interface_t sndfile_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -239,7 +239,7 @@ static switch_loadable_module_interface sndfile_module_interface = {
/*.file_interface */ &sndfile_file_interface
};
static switch_status setup_formats(void)
static switch_status_t setup_formats(void)
{
SF_FORMAT_INFO info;
SF_INFO sfinfo;
@ -309,7 +309,7 @@ static switch_status setup_formats(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{

View File

@ -80,12 +80,12 @@ static void perl_function(switch_core_session_t *session, char *data)
destroy_perl(&my_perl);
}
static const switch_application_interface perl_application_interface = {
static const switch_application_interface_t perl_application_interface = {
/*.interface_name */ "perl",
/*.application_function */ perl_function
};
static switch_loadable_module_interface perl_module_interface = {
static switch_loadable_module_interface_t perl_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -99,7 +99,7 @@ static switch_loadable_module_interface perl_module_interface = {
};
SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
{
if (globals.my_perl) {
perl_destruct(globals.my_perl);
@ -110,7 +110,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
PerlInterpreter *my_perl;

View File

@ -17,7 +17,7 @@ void fs_core_set_globals(void)
int fs_core_init(char *path)
{
switch_status status;
switch_status_t status;
if (switch_strlen_zero(path)) {
path = NULL;
@ -30,7 +30,7 @@ int fs_core_init(char *path)
int fs_core_destroy(void)
{
switch_status status;
switch_status_t status;
status = switch_core_destroy();
@ -102,7 +102,7 @@ void fs_channel_get_variable(switch_core_session_t *session, char *var)
void fs_channel_set_state(switch_core_session_t *session, char *state)
{
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_state fs_state = switch_channel_get_state(channel);
switch_channel_state_t fs_state = switch_channel_get_state(channel);
if (!strcmp(state, "EXECUTE")) {
fs_state = CS_EXECUTE;
@ -115,7 +115,7 @@ void fs_channel_set_state(switch_core_session_t *session, char *state)
int fs_ivr_play_file(switch_core_session_t *session, char *file, char *timer_name)
{
switch_status status;
switch_status_t status;
if (switch_strlen_zero(timer_name)) {
timer_name = NULL;
}

View File

@ -157,7 +157,7 @@ static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
}
static switch_status init_js(void)
static switch_status_t init_js(void)
{
memset(&globals, 0, sizeof(globals));
globals.gQuitting = JS_FALSE;
@ -175,7 +175,7 @@ static switch_status init_js(void)
return SWITCH_STATUS_SUCCESS;
}
static switch_status js_stream_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_stream_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@ -283,7 +283,7 @@ static switch_status js_stream_dtmf_callback(switch_core_session_t *session, cha
}
static switch_status js_record_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_record_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@ -344,7 +344,7 @@ static switch_status js_record_dtmf_callback(switch_core_session_t *session, cha
}
static switch_status js_speak_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t js_speak_dtmf_callback(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
{
char code[2048];
struct dtmf_callback_state *cb_state = buf;
@ -397,7 +397,7 @@ static JSBool session_recordfile(JSContext *cx, JSObject *obj, uintN argc, jsval
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@ -443,7 +443,7 @@ static JSBool session_streamfile(JSContext *cx, JSObject *obj, uintN argc, jsval
char *dtmf_callback = NULL;
void *bp = NULL;
int len = 0;
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
struct dtmf_callback_state cb_state = {0};
switch_file_handle_t fh;
@ -499,7 +499,7 @@ static JSBool session_speak(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
void *bp = NULL;
int len = 0;
struct dtmf_callback_state cb_state = {0};
switch_dtmf_callback_function dtmf_func = NULL;
switch_dtmf_callback_function_t dtmf_func = NULL;
channel = switch_core_session_get_channel(jss->session);
assert(channel != NULL);
@ -639,7 +639,7 @@ static JSBool session_execute(JSContext *cx, JSObject *obj, uintN argc, jsval *a
{
JSBool retval = JS_FALSE;
if (argc > 1) {
const switch_application_interface *application_interface;
const switch_application_interface_t *application_interface;
char *app_name = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
char *app_arg = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
struct js_session *jss = JS_GetPrivate(cx, obj);
@ -1315,7 +1315,7 @@ static JSBool db_exec(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
char *sql = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
char *err = NULL;
void *arg = NULL;
switch_core_db_callback_func cb_func = NULL;
switch_core_db_callback_func_t cb_func = NULL;
if (argc > 1) {
@ -2149,7 +2149,7 @@ static void js_thread_launch(char *text)
}
static switch_status launch_async(char *text, char *out, size_t outlen)
static switch_status_t launch_async(char *text, char *out, size_t outlen)
{
if (switch_strlen_zero(text)) {
@ -2163,21 +2163,21 @@ static switch_status launch_async(char *text, char *out, size_t outlen)
}
static const switch_application_interface ivrtest_application_interface = {
static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "javascript",
/*.application_function */ js_parse_and_execute,
NULL, NULL, NULL,
/*.next*/ NULL
};
static struct switch_api_interface js_run_interface = {
static switch_api_interface_t js_run_interface = {
/*.interface_name */ "jsrun",
/*.desc */ "run a script",
/*.function */ launch_async,
/*.next */ NULL
};
static switch_loadable_module_interface spidermonkey_module_interface = {
static switch_loadable_module_interface_t spidermonkey_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -2190,9 +2190,9 @@ static switch_loadable_module_interface spidermonkey_module_interface = {
/*.directory_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
switch_status status;
switch_status_t status;
if ((status = init_js()) != SWITCH_STATUS_SUCCESS) {
return status;

View File

@ -34,7 +34,7 @@
static const char modname[] = "mod_console";
static const uint8_t STATIC_LEVELS[] = {0, 1, 2, 3, 4, 5, 6, 7, 8};
static switch_loadable_module_interface console_module_interface = {
static switch_loadable_module_interface_t console_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ NULL,
@ -78,7 +78,7 @@ static void add_mapping(char *var, char *val)
switch_core_hash_insert(log_hash, name, (void *) &STATIC_LEVELS[(uint8_t)switch_log_str2level(val)]);
}
static switch_status config_logger(void)
static switch_status_t config_logger(void)
{
switch_config_t cfg;
char *var, *val;
@ -101,13 +101,13 @@ static switch_status config_logger(void)
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_console_logger(const switch_log_node *node, switch_log_level level)
static switch_status_t switch_console_logger(const switch_log_node_t *node, switch_log_level_t level)
{
FILE *handle;
if ((handle = switch_core_data_channel(SWITCH_CHANNEL_ID_LOG))) {
uint8_t *lookup = NULL;
switch_log_level level = SWITCH_LOG_DEBUG;
switch_log_level_t level = SWITCH_LOG_DEBUG;
if (log_hash) {
lookup = switch_core_hash_find(log_hash, node->file);
@ -118,9 +118,9 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
}
if (lookup) {
level = (switch_log_level) *lookup;
level = (switch_log_level_t) *lookup;
} else if (all_level > -1) {
level = (switch_log_level) all_level;
level = (switch_log_level_t) all_level;
}
if (!log_hash || (((all_level > - 1) || lookup) && level >= node->level)) {
@ -134,7 +134,7 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");

View File

@ -48,7 +48,7 @@ struct timer_private {
#endif
};
static switch_status soft_timer_init(switch_timer_t *timer)
static switch_status_t soft_timer_init(switch_timer_t *timer)
{
struct timer_private *private;
@ -65,7 +65,7 @@ static switch_status soft_timer_init(switch_timer_t *timer)
return SWITCH_STATUS_SUCCESS;
}
static switch_status soft_timer_next(switch_timer_t *timer)
static switch_status_t soft_timer_next(switch_timer_t *timer)
{
struct timer_private *private = timer->private_info;
@ -91,20 +91,20 @@ static switch_status soft_timer_next(switch_timer_t *timer)
return SWITCH_STATUS_SUCCESS;
}
static switch_status soft_timer_destroy(switch_timer_t *timer)
static switch_status_t soft_timer_destroy(switch_timer_t *timer)
{
timer->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static const switch_timer_interface soft_timer_interface = {
static const switch_timer_interface_t soft_timer_interface = {
/*.interface_name */ "soft",
/*.timer_init */ soft_timer_init,
/*.timer_next */ soft_timer_next,
/*.timer_destroy */ soft_timer_destroy
};
static const switch_loadable_module_interface mod_timers_module_interface = {
static const switch_loadable_module_interface_t mod_timers_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
/*.timer_interface */ &soft_timer_interface,
@ -113,7 +113,7 @@ static const switch_loadable_module_interface mod_timers_module_interface = {
/*.switch_application_interface */ NULL
};
SWITCH_MOD_DECLARE(switch_status) switch_module_load(const switch_loadable_module_interface **interface, char *filename)
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **interface, char *filename)
{
/* connect my internal structure to the blank pointer passed to me */

View File

@ -41,7 +41,7 @@ struct switch_buffer {
uint32_t id;
};
SWITCH_DECLARE(switch_status) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len)
SWITCH_DECLARE(switch_status_t) switch_buffer_create(switch_memory_pool_t *pool, switch_buffer_t **buffer, switch_size_t max_len)
{
switch_buffer_t *new_buffer;

View File

@ -92,7 +92,7 @@ struct switch_channel {
switch_mutex_t *dtmf_mutex;
switch_mutex_t *profile_mutex;
switch_core_session_t *session;
switch_channel_state state;
switch_channel_state_t state;
uint32_t flags;
switch_caller_profile_t *caller_profile;
switch_caller_profile_t *originator_caller_profile;
@ -149,7 +149,7 @@ SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch
return channel->times;
}
SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool)
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool)
{
assert(pool != NULL);
@ -166,7 +166,7 @@ SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel_t **channel, s
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode(switch_channel_t *channel, int freq, int bits, int channels,
SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode(switch_channel_t *channel, int freq, int bits, int channels,
int ms, int kbps)
{
@ -182,7 +182,7 @@ SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode(switch_channel_t *chan
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode(switch_channel_t *channel, int *freq, int *bits, int *channels,
SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode(switch_channel_t *channel, int *freq, int *bits, int *channels,
int *ms, int *kbps)
{
if (freq) {
@ -218,9 +218,9 @@ SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel)
return has;
}
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel_t *channel, char *dtmf)
SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *channel, char *dtmf)
{
switch_status status;
switch_status_t status;
register switch_size_t len, inuse;
assert(channel != NULL);
@ -264,9 +264,9 @@ SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel_t *chan
}
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_init(switch_channel_t *channel,
switch_core_session_t *session,
switch_channel_state state, uint32_t flags)
switch_channel_state_t state, uint32_t flags)
{
assert(channel != NULL);
channel->state = state;
@ -281,7 +281,7 @@ SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, ch
return switch_core_hash_find(channel->variables, varname);
}
SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel_t *channel, void *private_info)
SWITCH_DECLARE(switch_status_t) switch_channel_set_private(switch_channel_t *channel, void *private_info)
{
assert(channel != NULL);
channel->private_info = private_info;
@ -294,7 +294,7 @@ SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel_t *channel)
return channel->private_info;
}
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel_t *channel, char *name)
SWITCH_DECLARE(switch_status_t) switch_channel_set_name(switch_channel_t *channel, char *name)
{
assert(channel != NULL);
channel->name = NULL;
@ -313,7 +313,7 @@ SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel_t *channel)
return channel->name;
}
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value)
SWITCH_DECLARE(switch_status_t) switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value)
{
assert(channel != NULL);
switch_core_hash_delete(channel->variables, varname);
@ -323,22 +323,22 @@ SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel_t *chan
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag flags)
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag_t flags)
{
return switch_test_flag(channel, flags) ? 1 : 0;
}
SWITCH_DECLARE(void) switch_channel_set_flag(switch_channel_t *channel, switch_channel_flag flags)
SWITCH_DECLARE(void) switch_channel_set_flag(switch_channel_t *channel, switch_channel_flag_t flags)
{
switch_set_flag(channel, flags);
}
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag flags)
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag_t flags)
{
switch_clear_flag(channel, flags);
}
SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel_t *channel)
SWITCH_DECLARE(switch_channel_state_t) switch_channel_get_state(switch_channel_t *channel)
{
assert(channel != NULL);
return channel->state;
@ -362,18 +362,18 @@ static const char *state_names[] = {
"CS_DONE"
};
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state state)
SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state_t state)
{
return state_names[state];
}
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_set_state(switch_channel_t *channel,
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_set_state(switch_channel_t *channel,
const char *file,
const char *func,
int line,
switch_channel_state state)
switch_channel_state_t state)
{
switch_channel_state last_state;
switch_channel_state_t last_state;
int ok = 0;
@ -754,7 +754,7 @@ SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(
}
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channel_t *channel,
SWITCH_DECLARE(switch_channel_state_t) switch_channel_perform_hangup(switch_channel_t *channel,
const char *file,
const char *func,
int line,
@ -768,7 +768,7 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channe
if (channel->state < CS_HANGUP) {
switch_event_t *event;
switch_channel_state last_state = channel->state;
switch_channel_state_t last_state = channel->state;
channel->state = CS_HANGUP;
channel->hangup_cause = hangup_cause;
@ -786,14 +786,14 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channe
return channel->state;
}
SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel,
const char *file,
const char *func,
int line)
{
switch_core_session_message_t msg;
char *uuid = switch_core_session_get_uuid(channel->session);
switch_status status;
switch_status_t status;
assert(channel != NULL);
@ -813,7 +813,7 @@ SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel_t
return status;
}
SWITCH_DECLARE(switch_status) switch_channel_perform_answer(switch_channel_t *channel,
SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel,
const char *file,
const char *func,
int line)

View File

@ -69,7 +69,7 @@ static int switch_console_process(char *cmd, char *retbuf, int retlen)
return 1;
}
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel channel, char *file, const char *func, int line,
SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, char *file, const char *func, int line,
char *fmt, ...)
{
char *data = NULL;

View File

@ -45,8 +45,8 @@ struct switch_core_session {
switch_memory_pool_t *pool;
switch_channel_t *channel;
switch_thread_t *thread;
const switch_endpoint_interface *endpoint_interface;
struct switch_io_event_hooks event_hooks;
const switch_endpoint_interface_t *endpoint_interface;
switch_io_event_hooks_t event_hooks;
switch_codec_t *read_codec;
switch_codec_t *write_codec;
@ -172,7 +172,7 @@ static void check_table_exists(switch_core_db *db, char *test_sql, char *create_
#endif
SWITCH_DECLARE(switch_status) switch_core_set_console(char *console)
SWITCH_DECLARE(switch_status_t) switch_core_set_console(char *console)
{
if ((runtime.console = fopen(console, "a")) == 0) {
fprintf(stderr, "Cannot open output file %s.\n", console);
@ -187,7 +187,7 @@ SWITCH_DECLARE(FILE *) switch_core_get_console(void)
return runtime.console;
}
SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel channel)
SWITCH_DECLARE(FILE *) switch_core_data_channel(switch_text_channel_t channel)
{
FILE *handle = stdout;
@ -226,9 +226,9 @@ SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handl
return runtime.state_handlers[index];
}
SWITCH_DECLARE(switch_status) switch_core_session_read_lock(switch_core_session_t *session)
SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session)
{
return (switch_status) switch_thread_rwlock_tryrdlock(session->rwlock);
return (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
}
SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *session)
@ -256,10 +256,10 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_st
return session;
}
SWITCH_DECLARE(switch_status) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message)
SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message)
{
switch_core_session_t *session = NULL;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
@ -274,10 +274,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_message_send(char *uuid_str, s
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_event_send(char *uuid_str, switch_event_t *event)
SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(char *uuid_str, switch_event_t *event)
{
switch_core_session_t *session = NULL;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
if ((session = switch_core_hash_find(runtime.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
@ -297,7 +297,7 @@ SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session_t *sessi
return session->uuid_str;
}
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec)
SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec)
{
assert(session != NULL);
@ -310,7 +310,7 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_read_codec(switch_core_
return session->read_codec;
}
SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec)
SWITCH_DECLARE(switch_status_t) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec)
{
assert(session != NULL);
@ -323,12 +323,12 @@ SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_write_codec(switch_core
return session->write_codec;
}
SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec_t *codec, char *codec_name, uint32_t rate, int ms,
SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, char *codec_name, uint32_t rate, int ms,
int channels, uint32_t flags,
const switch_codec_settings_t *codec_settings,
switch_memory_pool_t *pool)
{
const switch_codec_interface *codec_interface;
const switch_codec_interface_t *codec_interface;
const switch_codec_implementation_t *iptr, *implementation = NULL;
assert(codec != NULL);
@ -351,7 +351,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec_t *codec, char
}
if (implementation) {
switch_status status;
switch_status_t status;
codec->codec_interface = codec_interface;
codec->implementation = implementation;
codec->flags = flags;
@ -376,7 +376,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec_t *codec, char
}
SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec_t *codec,
SWITCH_DECLARE(switch_status_t) switch_core_codec_encode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *decoded_data,
uint32_t decoded_data_len,
@ -407,7 +407,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec_t *codec,
}
SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec_t *codec,
SWITCH_DECLARE(switch_status_t) switch_core_codec_decode(switch_codec_t *codec,
switch_codec_t *other_codec,
void *encoded_data,
uint32_t encoded_data_len,
@ -443,7 +443,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec_t *codec,
}
SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec_t *codec)
SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec)
{
assert(codec != NULL);
@ -461,11 +461,11 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec_t *codec)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle_t *fh, char *file_path, unsigned int flags,
SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh, char *file_path, unsigned int flags,
switch_memory_pool_t *pool)
{
char *ext;
switch_status status;
switch_status_t status;
if ((ext = strrchr(file_path, '.')) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Format\n");
@ -491,39 +491,39 @@ SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle_t *fh, ch
return fh->file_interface->file_open(fh, file_path);
}
SWITCH_DECLARE(switch_status) switch_core_file_read(switch_file_handle_t *fh, void *data, switch_size_t *len)
SWITCH_DECLARE(switch_status_t) switch_core_file_read(switch_file_handle_t *fh, void *data, switch_size_t *len)
{
assert(fh != NULL);
return fh->file_interface->file_read(fh, data, len);
}
SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle_t *fh, void *data, switch_size_t *len)
SWITCH_DECLARE(switch_status_t) switch_core_file_write(switch_file_handle_t *fh, void *data, switch_size_t *len)
{
assert(fh != NULL);
return fh->file_interface->file_write(fh, data, len);
}
SWITCH_DECLARE(switch_status) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples,
SWITCH_DECLARE(switch_status_t) switch_core_file_seek(switch_file_handle_t *fh, unsigned int *cur_pos, int64_t samples,
int whence)
{
return fh->file_interface->file_seek(fh, cur_pos, samples, whence);
}
SWITCH_DECLARE(switch_status) switch_core_file_close(switch_file_handle_t *fh)
SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
{
return fh->file_interface->file_close(fh);
}
SWITCH_DECLARE(switch_status) switch_core_directory_open(switch_directory_handle *dh,
SWITCH_DECLARE(switch_status_t) switch_core_directory_open(switch_directory_handle_t *dh,
char *module_name,
char *source,
char *dsn,
char *passwd,
switch_memory_pool_t *pool)
{
switch_status status;
switch_status_t status;
if ((dh->directory_interface = switch_loadable_module_get_directory_interface(module_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid directory module [%s]!\n", module_name);
@ -542,34 +542,34 @@ SWITCH_DECLARE(switch_status) switch_core_directory_open(switch_directory_handle
return dh->directory_interface->directory_open(dh, source, dsn, passwd);
}
SWITCH_DECLARE(switch_status) switch_core_directory_query(switch_directory_handle *dh, char *base, char *query)
SWITCH_DECLARE(switch_status_t) switch_core_directory_query(switch_directory_handle_t *dh, char *base, char *query)
{
return dh->directory_interface->directory_query(dh, base, query);
}
SWITCH_DECLARE(switch_status) switch_core_directory_next(switch_directory_handle *dh)
SWITCH_DECLARE(switch_status_t) switch_core_directory_next(switch_directory_handle_t *dh)
{
return dh->directory_interface->directory_next(dh);
}
SWITCH_DECLARE(switch_status) switch_core_directory_next_pair(switch_directory_handle *dh, char **var, char **val)
SWITCH_DECLARE(switch_status_t) switch_core_directory_next_pair(switch_directory_handle_t *dh, char **var, char **val)
{
return dh->directory_interface->directory_next_pair(dh, var, val);
}
SWITCH_DECLARE(switch_status) switch_core_directory_close(switch_directory_handle *dh)
SWITCH_DECLARE(switch_status_t) switch_core_directory_close(switch_directory_handle_t *dh)
{
return dh->directory_interface->directory_close(dh);
}
SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
SWITCH_DECLARE(switch_status_t) switch_core_speech_open(switch_speech_handle_t *sh,
char *module_name,
char *voice_name,
unsigned int rate,
switch_speech_flag *flags,
switch_speech_flag_t *flags,
switch_memory_pool_t *pool)
{
switch_status status;
switch_status_t status;
if ((sh->speech_interface = switch_loadable_module_get_speech_interface(module_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid speech module [%s]!\n", module_name);
@ -589,32 +589,32 @@ SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
return sh->speech_interface->speech_open(sh, voice_name, rate, flags);
}
SWITCH_DECLARE(switch_status) switch_core_speech_feed_asr(switch_speech_handle *sh, void *data, unsigned int *len, int rate, switch_speech_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_asr(switch_speech_handle_t *sh, void *data, unsigned int *len, int rate, switch_speech_flag_t *flags)
{
assert(sh != NULL);
return sh->speech_interface->speech_feed_asr(sh, data, len, rate, flags);
}
SWITCH_DECLARE(switch_status) switch_core_speech_interpret_asr(switch_speech_handle *sh, char *buf, unsigned int buflen, switch_speech_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_core_speech_interpret_asr(switch_speech_handle_t *sh, char *buf, unsigned int buflen, switch_speech_flag_t *flags)
{
assert(sh != NULL);
return sh->speech_interface->speech_interpret_asr(sh, buf, buflen, flags);
}
SWITCH_DECLARE(switch_status) switch_core_speech_feed_tts(switch_speech_handle *sh, char *text, switch_speech_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_core_speech_feed_tts(switch_speech_handle_t *sh, char *text, switch_speech_flag_t *flags)
{
assert(sh != NULL);
return sh->speech_interface->speech_feed_tts(sh, text, flags);
}
SWITCH_DECLARE(switch_status) switch_core_speech_read_tts(switch_speech_handle *sh,
SWITCH_DECLARE(switch_status_t) switch_core_speech_read_tts(switch_speech_handle_t *sh,
void *data,
switch_size_t *datalen,
uint32_t *rate,
switch_speech_flag *flags)
switch_speech_flag_t *flags)
{
assert(sh != NULL);
@ -622,16 +622,16 @@ SWITCH_DECLARE(switch_status) switch_core_speech_read_tts(switch_speech_handle *
}
SWITCH_DECLARE(switch_status) switch_core_speech_close(switch_speech_handle *sh, switch_speech_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_core_speech_close(switch_speech_handle_t *sh, switch_speech_flag_t *flags)
{
return sh->speech_interface->speech_close(sh, flags);
}
SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples,
SWITCH_DECLARE(switch_status_t) switch_core_timer_init(switch_timer_t *timer, char *timer_name, int interval, int samples,
switch_memory_pool_t *pool)
{
switch_timer_interface *timer_interface;
switch_status status;
switch_timer_interface_t *timer_interface;
switch_status_t status;
memset(timer, 0, sizeof(*timer));
if ((timer_interface = switch_loadable_module_get_timer_interface(timer_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid timer %s!\n", timer_name);
@ -673,7 +673,7 @@ SWITCH_DECLARE(int) switch_core_timer_next(switch_timer_t *timer)
}
SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer_t *timer)
SWITCH_DECLARE(switch_status_t) switch_core_timer_destroy(switch_timer_t *timer)
{
if (!timer->timer_interface) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Timer is not initilized!\n");
@ -859,7 +859,7 @@ SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session_t *se
}
SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session_t *session, void *private_info)
SWITCH_DECLARE(switch_status_t) switch_core_session_set_private(switch_core_session_t *session, void *private_info)
{
assert(session != NULL);
session->private_info = private_info;
@ -883,15 +883,15 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t *
return session->stream_count;
}
SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_core_session_outgoing_channel(switch_core_session_t *session,
char *endpoint_name,
switch_caller_profile_t *caller_profile,
switch_core_session_t **new_session,
switch_memory_pool_t *pool)
{
struct switch_io_event_hook_outgoing_channel *ptr;
switch_status status = SWITCH_STATUS_FALSE;
const switch_endpoint_interface *endpoint_interface;
switch_io_event_hook_outgoing_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
const switch_endpoint_interface_t *endpoint_interface;
if ((endpoint_interface = switch_loadable_module_get_endpoint_interface(endpoint_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate channel type %s\n", endpoint_name);
@ -942,10 +942,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_s
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_answer_channel(switch_core_session_t *session)
SWITCH_DECLARE(switch_status_t) switch_core_session_answer_channel(switch_core_session_t *session)
{
struct switch_io_event_hook_answer_channel *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_answer_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
assert(session != NULL);
if (session->endpoint_interface->io_routines->answer_channel) {
@ -963,11 +963,11 @@ SWITCH_DECLARE(switch_status) switch_core_session_answer_channel(switch_core_ses
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_receive_message(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_core_session_receive_message(switch_core_session_t *session,
switch_core_session_message_t *message)
{
struct switch_io_event_hook_receive_message *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_receive_message_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
assert(session != NULL);
if (session->endpoint_interface->io_routines->receive_message) {
@ -984,11 +984,11 @@ SWITCH_DECLARE(switch_status) switch_core_session_receive_message(switch_core_se
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event)
SWITCH_DECLARE(switch_status_t) switch_core_session_queue_event(switch_core_session_t *session, switch_event_t *event)
{
struct switch_io_event_hook_queue_event *ptr;
switch_status status = SWITCH_STATUS_FALSE, istatus = SWITCH_STATUS_FALSE;;
switch_io_event_hook_queue_event_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE, istatus = SWITCH_STATUS_FALSE;;
assert(session != NULL);
if (session->endpoint_interface->io_routines->queue_event) {
@ -1013,11 +1013,11 @@ SWITCH_DECLARE(switch_status) switch_core_session_queue_event(switch_core_sessio
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame,
SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_session_t *session, switch_frame_t **frame,
int timeout, int stream_id)
{
struct switch_io_event_hook_read_frame *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_read_frame_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
int need_codec = 0, perfect = 0;
assert(session != NULL);
@ -1183,10 +1183,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_read_frame(switch_core_session
return status;
}
static switch_status perform_write(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag flags, int stream_id)
static switch_status_t perform_write(switch_core_session_t *session, switch_frame_t *frame, int timeout, switch_io_flag_t flags, int stream_id)
{
struct switch_io_event_hook_write_frame *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_write_frame_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->endpoint_interface->io_routines->write_frame) {
if ((status =
@ -1202,14 +1202,14 @@ static switch_status perform_write(switch_core_session_t *session, switch_frame_
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame,
SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame,
int timeout, int stream_id)
{
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
switch_frame_t *enc_frame = NULL, *write_frame = frame;
unsigned int flag = 0, need_codec = 0, perfect = 0;
switch_io_flag io_flag = SWITCH_IO_FLAG_NOOP;
switch_io_flag_t io_flag = SWITCH_IO_FLAG_NOOP;
assert(session != NULL);
assert(frame != NULL);
@ -1439,14 +1439,14 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_kill_channel(switch_core_session_t *session,
const char *file,
const char *func,
int line,
switch_signal sig)
switch_signal_t sig)
{
struct switch_io_event_hook_kill_channel *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_kill_channel_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Kill %s [%d]\n", switch_channel_get_name(session->channel), sig);
@ -1464,10 +1464,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_co
}
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout, int stream_id)
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_read(switch_core_session_t *session, int timeout, int stream_id)
{
struct switch_io_event_hook_waitfor_read *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_waitfor_read_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->endpoint_interface->io_routines->waitfor_read) {
if ((status =
@ -1485,11 +1485,11 @@ SWITCH_DECLARE(switch_status) switch_core_session_waitfor_read(switch_core_sessi
}
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout,
SWITCH_DECLARE(switch_status_t) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout,
int stream_id)
{
struct switch_io_event_hook_waitfor_write *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_waitfor_write_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->endpoint_interface->io_routines->waitfor_write) {
if ((status =
@ -1507,10 +1507,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_sess
}
SWITCH_DECLARE(switch_status) switch_core_session_send_dtmf(switch_core_session_t *session, char *dtmf)
SWITCH_DECLARE(switch_status_t) switch_core_session_send_dtmf(switch_core_session_t *session, char *dtmf)
{
struct switch_io_event_hook_send_dtmf *ptr;
switch_status status = SWITCH_STATUS_FALSE;
switch_io_event_hook_send_dtmf_t *ptr;
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->endpoint_interface->io_routines->send_dtmf) {
if ((status = session->endpoint_interface->io_routines->send_dtmf(session, dtmf)) == SWITCH_STATUS_SUCCESS) {
@ -1525,10 +1525,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_send_dtmf(switch_core_session_
return status;
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch_core_session_t *session,
switch_outgoing_channel_hook outgoing_channel)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_outgoing(switch_core_session_t *session,
switch_outgoing_channel_hook_t outgoing_channel)
{
switch_io_event_hook_outgoing_channel *hook, *ptr;
switch_io_event_hook_outgoing_channel_t *hook, *ptr;
assert(outgoing_channel != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1547,11 +1547,11 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch
return SWITCH_STATUS_MEMERR;
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(switch_core_session_t *session,
switch_answer_channel_hook
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_answer_channel(switch_core_session_t *session,
switch_answer_channel_hook_t
answer_channel)
{
switch_io_event_hook_answer_channel *hook, *ptr;
switch_io_event_hook_answer_channel_t *hook, *ptr;
assert(answer_channel != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1571,10 +1571,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(switch_core_session_t *session,
switch_read_frame_hook read_frame)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_read_frame(switch_core_session_t *session,
switch_read_frame_hook_t read_frame)
{
switch_io_event_hook_read_frame *hook, *ptr;
switch_io_event_hook_read_frame_t *hook, *ptr;
assert(read_frame != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1594,10 +1594,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(swit
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(switch_core_session_t *session,
switch_write_frame_hook write_frame)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_write_frame(switch_core_session_t *session,
switch_write_frame_hook_t write_frame)
{
switch_io_event_hook_write_frame *hook, *ptr;
switch_io_event_hook_write_frame_t *hook, *ptr;
assert(write_frame != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1617,10 +1617,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(swi
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(switch_core_session_t *session,
switch_kill_channel_hook kill_channel)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_kill_channel(switch_core_session_t *session,
switch_kill_channel_hook_t kill_channel)
{
switch_io_event_hook_kill_channel *hook, *ptr;
switch_io_event_hook_kill_channel_t *hook, *ptr;
assert(kill_channel != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1640,10 +1640,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(sw
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(switch_core_session_t *session,
switch_waitfor_read_hook waitfor_read)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_waitfor_read(switch_core_session_t *session,
switch_waitfor_read_hook_t waitfor_read)
{
switch_io_event_hook_waitfor_read *hook, *ptr;
switch_io_event_hook_waitfor_read_t *hook, *ptr;
assert(waitfor_read != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1663,10 +1663,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(sw
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(switch_core_session_t *session,
switch_waitfor_write_hook waitfor_write)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_waitfor_write(switch_core_session_t *session,
switch_waitfor_write_hook_t waitfor_write)
{
switch_io_event_hook_waitfor_write *hook, *ptr;
switch_io_event_hook_waitfor_write_t *hook, *ptr;
assert(waitfor_write != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1687,10 +1687,10 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(s
}
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_send_dtmf(switch_core_session_t *session,
switch_send_dtmf_hook send_dtmf)
SWITCH_DECLARE(switch_status_t) switch_core_session_add_event_hook_send_dtmf(switch_core_session_t *session,
switch_send_dtmf_hook_t send_dtmf)
{
switch_io_event_hook_send_dtmf *hook, *ptr;
switch_io_event_hook_send_dtmf_t *hook, *ptr;
assert(send_dtmf != NULL);
if ((hook = switch_core_session_alloc(session, sizeof(*hook))) != 0) {
@ -1711,7 +1711,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_send_dtmf(switc
}
SWITCH_DECLARE(switch_status) switch_core_new_memory_pool(switch_memory_pool_t **pool)
SWITCH_DECLARE(switch_status_t) switch_core_new_memory_pool(switch_memory_pool_t **pool)
{
assert(runtime.memory_pool != NULL);
@ -1723,7 +1723,7 @@ SWITCH_DECLARE(switch_status) switch_core_new_memory_pool(switch_memory_pool_t *
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_core_destroy_memory_pool(switch_memory_pool_t **pool)
SWITCH_DECLARE(switch_status_t) switch_core_destroy_memory_pool(switch_memory_pool_t **pool)
{
apr_pool_destroy(*pool);
return SWITCH_STATUS_SUCCESS;
@ -1748,7 +1748,7 @@ static void switch_core_standard_on_hangup(switch_core_session_t *session)
static void switch_core_standard_on_ring(switch_core_session_t *session)
{
switch_dialplan_interface *dialplan_interface = NULL;
switch_dialplan_interface_t *dialplan_interface = NULL;
switch_caller_profile_t *caller_profile;
switch_caller_extension_t *extension;
@ -1780,7 +1780,7 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
{
switch_caller_extension_t *extension;
switch_event_t *event;
const switch_application_interface *application_interface;
const switch_application_interface_t *application_interface;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Standard EXECUTE\n");
@ -1915,8 +1915,8 @@ static int handle_fatality(int sig)
SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
{
switch_channel_state state = CS_NEW, laststate = CS_HANGUP, midstate = CS_DONE;
const switch_endpoint_interface *endpoint_interface;
switch_channel_state_t state = CS_NEW, laststate = CS_HANGUP, midstate = CS_DONE;
const switch_endpoint_interface_t *endpoint_interface;
const switch_state_handler_table_t *driver_state_handler = NULL;
const switch_state_handler_table_t *application_state_handler = NULL;
switch_thread_id_t thread_id = switch_thread_self();
@ -2275,7 +2275,7 @@ SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session_t **session
}
SWITCH_DECLARE(switch_status) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool)
SWITCH_DECLARE(switch_status_t) switch_core_hash_init(switch_hash_t **hash, switch_memory_pool_t *pool)
{
assert(pool != NULL);
@ -2286,25 +2286,25 @@ SWITCH_DECLARE(switch_status) switch_core_hash_init(switch_hash_t **hash, switch
return SWITCH_STATUS_GENERR;
}
SWITCH_DECLARE(switch_status) switch_core_hash_destroy(switch_hash_t *hash)
SWITCH_DECLARE(switch_status_t) switch_core_hash_destroy(switch_hash_t *hash)
{
assert(hash != NULL);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_core_hash_insert_dup(switch_hash_t *hash, char *key, void *data)
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert_dup(switch_hash_t *hash, char *key, void *data)
{
apr_hash_set(hash, switch_core_strdup(apr_hash_pool_get(hash), key), APR_HASH_KEY_STRING, data);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_core_hash_insert(switch_hash_t *hash, char *key, void *data)
SWITCH_DECLARE(switch_status_t) switch_core_hash_insert(switch_hash_t *hash, char *key, void *data)
{
apr_hash_set(hash, key, APR_HASH_KEY_STRING, data);
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_core_hash_delete(switch_hash_t *hash, char *key)
SWITCH_DECLARE(switch_status_t) switch_core_hash_delete(switch_hash_t *hash, char *key)
{
apr_hash_set(hash, key, APR_HASH_KEY_STRING, NULL);
return SWITCH_STATUS_SUCCESS;
@ -2426,7 +2426,7 @@ SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size
return ptr;
}
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface *endpoint_interface,
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch_endpoint_interface_t *endpoint_interface,
switch_memory_pool_t *pool)
{
switch_memory_pool_t *usepool;
@ -2485,7 +2485,7 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request(const switch
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t *pool)
{
const switch_endpoint_interface *endpoint_interface;
const switch_endpoint_interface_t *endpoint_interface;
if ((endpoint_interface = switch_loadable_module_get_endpoint_interface(endpoint_name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Could not locate channel type %s\n", endpoint_name);
@ -2495,10 +2495,10 @@ SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char
return switch_core_session_request(endpoint_interface, pool);
}
static switch_status switch_core_sql_persistant_execute(switch_core_db *db, char *sql, uint32_t retries)
static switch_status_t switch_core_sql_persistant_execute(switch_core_db *db, char *sql, uint32_t retries)
{
char *errmsg;
switch_status status = SWITCH_STATUS_FALSE;
switch_status_t status = SWITCH_STATUS_FALSE;
while(retries > 0) {
switch_core_db_exec(
@ -2633,7 +2633,7 @@ static void core_event_handler(switch_event_t *event)
case SWITCH_EVENT_CHANNEL_STATE:
if (event) {
char *state = switch_event_get_header(event, "channel-state-number");
switch_channel_state state_i = atoi(state);
switch_channel_state_t state_i = atoi(state);
switch(state_i) {
case CS_HANGUP:
@ -2725,7 +2725,7 @@ SWITCH_DECLARE(void) switch_core_set_globals(void)
#endif
}
SWITCH_DECLARE(switch_status) switch_core_init(char *console)
SWITCH_DECLARE(switch_status_t) switch_core_init(char *console)
{
memset(&runtime, 0, sizeof(runtime));
@ -2818,7 +2818,7 @@ SWITCH_DECLARE(switch_status) switch_core_init(char *console)
}
SWITCH_DECLARE(switch_status) switch_core_destroy(void)
SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Closing Event Engine.\n");

View File

@ -233,7 +233,7 @@ SWITCH_DECLARE(void) switch_event_deliver(switch_event_t **event)
}
SWITCH_DECLARE(switch_status) switch_event_running(void)
SWITCH_DECLARE(switch_status_t) switch_event_running(void)
{
return THREAD_RUNNING ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
}
@ -246,7 +246,7 @@ SWITCH_DECLARE(char *) switch_event_name(switch_event_types_t event)
return EVENT_NAMES[event];
}
SWITCH_DECLARE(switch_status) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name)
SWITCH_DECLARE(switch_status_t) switch_event_reserve_subclass_detailed(char *owner, char *subclass_name)
{
switch_event_subclass_t *subclass;
@ -271,7 +271,7 @@ SWITCH_DECLARE(switch_status) switch_event_reserve_subclass_detailed(char *owner
}
SWITCH_DECLARE(switch_status) switch_event_shutdown(void)
SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
{
int x = 0, last = 0;
@ -289,7 +289,7 @@ SWITCH_DECLARE(switch_status) switch_event_shutdown(void)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_event_init(switch_memory_pool_t *pool)
SWITCH_DECLARE(switch_status_t) switch_event_init(switch_memory_pool_t *pool)
{
switch_thread_t *thread;
switch_threadattr_t *thd_attr;;
@ -329,7 +329,7 @@ SWITCH_DECLARE(switch_status) switch_event_init(switch_memory_pool_t *pool)
}
SWITCH_DECLARE(switch_status) switch_event_create_subclass(switch_event_t **event,
SWITCH_DECLARE(switch_status_t) switch_event_create_subclass(switch_event_t **event,
switch_event_types_t event_id,
char *subclass_name)
{
@ -352,7 +352,7 @@ SWITCH_DECLARE(switch_status) switch_event_create_subclass(switch_event_t **even
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_event_set_priority(switch_event_t *event, switch_priority_t priority)
SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event, switch_priority_t priority)
{
event->priority = priority;
switch_event_add_header(event, SWITCH_STACK_TOP, "priority", switch_priority_name(priority));
@ -372,7 +372,7 @@ SWITCH_DECLARE(char *) switch_event_get_header(switch_event_t *event, char *head
return NULL;
}
SWITCH_DECLARE(switch_status) switch_event_add_header(switch_event_t *event, switch_stack_t stack, char *header_name,
SWITCH_DECLARE(switch_status_t) switch_event_add_header(switch_event_t *event, switch_stack_t stack, char *header_name,
char *fmt, ...)
{
int ret = 0;
@ -414,7 +414,7 @@ SWITCH_DECLARE(switch_status) switch_event_add_header(switch_event_t *event, swi
}
SWITCH_DECLARE(switch_status) switch_event_add_body(switch_event_t *event, char *fmt, ...)
SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, char *fmt, ...)
{
int ret = 0;
char data[2048];
@ -449,7 +449,7 @@ SWITCH_DECLARE(void) switch_event_destroy(switch_event_t **event)
*event = NULL;
}
SWITCH_DECLARE(switch_status) switch_event_dup(switch_event_t **event, switch_event_t *todup)
SWITCH_DECLARE(switch_status_t) switch_event_dup(switch_event_t **event, switch_event_t *todup)
{
switch_event_header_t *header, *hp, *hp2;
@ -483,7 +483,7 @@ SWITCH_DECLARE(switch_status) switch_event_dup(switch_event_t **event, switch_ev
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_event_serialize(switch_event_t *event, char *buf, switch_size_t buflen, char *fmt, ...)
SWITCH_DECLARE(switch_status_t) switch_event_serialize(switch_event_t *event, char *buf, switch_size_t buflen, char *fmt, ...)
{
switch_size_t len = 0;
switch_event_header_t *hp;
@ -536,7 +536,7 @@ SWITCH_DECLARE(switch_status) switch_event_serialize(switch_event_t *event, char
}
SWITCH_DECLARE(switch_status) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event,
SWITCH_DECLARE(switch_status_t) switch_event_fire_detailed(char *file, char *func, int line, switch_event_t **event,
void *user_data)
{
@ -579,7 +579,7 @@ SWITCH_DECLARE(switch_status) switch_event_fire_detailed(char *file, char *func,
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name,
SWITCH_DECLARE(switch_status_t) switch_event_bind(char *id, switch_event_types_t event, char *subclass_name,
switch_event_callback_t callback, void *user_data)
{
switch_event_node_t *event_node;

View File

@ -35,13 +35,13 @@
static const switch_state_handler_table_t audio_bridge_peer_state_handlers;
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_callback(switch_core_session_t *session,
switch_dtmf_callback_function dtmf_callback,
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_callback(switch_core_session_t *session,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen)
{
switch_channel_t *channel;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@ -74,7 +74,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_callback(switch_core_ses
}
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_collect_digits_count(switch_core_session_t *session,
char *buf,
unsigned int buflen,
unsigned int maxdigits,
@ -86,7 +86,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
{
unsigned int i = 0, x = (unsigned int) strlen(buf);
switch_channel_t *channel;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_time_t started = 0;
unsigned int elapsed;
@ -152,10 +152,10 @@ SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_sessio
SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen)
{
@ -165,7 +165,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *sess
switch_frame_t *read_frame;
switch_codec_t codec, *read_codec;
char *codec_name;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
if (!fh) {
fh = &lfh;
@ -250,11 +250,11 @@ SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *sess
return status;
}
SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *session,
switch_file_handle_t *fh,
char *file,
char *timer_name,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *buf,
unsigned int buflen)
{
@ -271,7 +271,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *sessio
switch_memory_pool_t *pool = switch_core_session_get_pool(session);
char *codec_name;
int stream_id;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_file_handle_t lfh;
switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
@ -454,7 +454,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *sessio
}
} else { /* time off the channel (if you must) */
switch_frame_t *read_frame;
switch_status status;
switch_status_t status;
while (switch_channel_test_flag(channel, CF_HOLD)) {
switch_yield(10000);
}
@ -481,12 +481,12 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session_t *sessio
SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *session,
char *tts_name,
char *voice_name,
char *timer_name,
uint32_t rate,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
char *text,
void *buf,
unsigned int buflen)
@ -509,9 +509,9 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *sessi
int done = 0;
int lead_in_out = 10;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_speech_handle sh;
switch_speech_flag flags = SWITCH_SPEECH_FLAG_TTS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_speech_handle_t sh;
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_TTS;
memset(&sh, 0, sizeof(sh));
@ -665,7 +665,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *sessi
}
} else { /* time off the channel (if you must) */
switch_frame_t *read_frame;
switch_status status = switch_core_session_read_frame(session, &read_frame, -1, 0);
switch_status_t status = switch_core_session_read_frame(session, &read_frame, -1, 0);
while (switch_channel_test_flag(channel, CF_HOLD)) {
switch_yield(10000);
@ -705,7 +705,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_core_thread_session_t *his_thread, *data = obj;
int *stream_id_p;
int stream_id = 0, ans_a = 0, ans_b = 0;
switch_dtmf_callback_function dtmf_callback;
switch_dtmf_callback_function_t dtmf_callback;
switch_core_session_message_t msg = {0};
void *user_data;
@ -719,7 +719,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
session_b = data->objs[1];
stream_id_p = data->objs[2];
dtmf_callback = (switch_dtmf_callback_function) data->objs[3];
dtmf_callback = (switch_dtmf_callback_function_t) data->objs[3];
user_data = data->objs[4];
his_thread = data->objs[5];
@ -737,8 +737,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_channel_set_flag(chan_a, CF_BRIDGED);
while (data->running > 0 && his_thread->running > 0) {
switch_channel_state b_state = switch_channel_get_state(chan_b);
switch_status status;
switch_channel_state_t b_state = switch_channel_get_state(chan_b);
switch_status_t status;
switch (b_state) {
case CS_HANGUP:
@ -825,7 +825,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
return NULL;
}
static switch_status audio_bridge_on_loopback(switch_core_session_t *session)
static switch_status_t audio_bridge_on_loopback(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
void *arg;
@ -845,7 +845,7 @@ static switch_status audio_bridge_on_loopback(switch_core_session_t *session)
}
static switch_status audio_bridge_on_ring(switch_core_session_t *session)
static switch_status_t audio_bridge_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -859,7 +859,7 @@ static switch_status audio_bridge_on_ring(switch_core_session_t *session)
return SWITCH_STATUS_FALSE;
}
static switch_status audio_bridge_on_hold(switch_core_session_t *session)
static switch_status_t audio_bridge_on_hold(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@ -883,10 +883,10 @@ static const switch_state_handler_table_t audio_bridge_peer_state_handlers = {
};
SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
switch_core_session_t *peer_session,
unsigned int timelimit,
switch_dtmf_callback_function dtmf_callback,
switch_dtmf_callback_function_t dtmf_callback,
void *session_data,
void *peer_session_data)
@ -898,7 +898,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
time_t start;
int stream_id = 0;
switch_frame_t *read_frame = NULL;
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
caller_channel = switch_core_session_get_channel(session);
@ -965,7 +965,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
/* read from the channel while we wait if the audio is up on it */
if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
switch_status status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
@ -1043,7 +1043,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi
SWITCH_DECLARE(switch_status) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context)
SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context)
{
switch_channel_t *channel;
switch_caller_profile_t *profile, *new_profile;

View File

@ -34,7 +34,7 @@
struct switch_loadable_module {
char *filename;
const switch_loadable_module_interface *interface;
const switch_loadable_module_interface_t *interface;
void *lib;
switch_module_load_t switch_module_load;
switch_module_runtime_t switch_module_runtime;
@ -61,7 +61,7 @@ static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
{
switch_status status = SWITCH_STATUS_SUCCESS;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_core_thread_session_t *ts = obj;
switch_loadable_module_t *module = ts->objs[0];
int restarts;
@ -87,14 +87,14 @@ static void *switch_loadable_module_exec(switch_thread_t *thread, void *obj)
static switch_status switch_loadable_module_process(char *key, switch_loadable_module_t *new_module)
static switch_status_t switch_loadable_module_process(char *key, switch_loadable_module_t *new_module)
{
switch_core_hash_insert(loadable_modules.module_hash, key, new_module);
if (new_module->interface->endpoint_interface) {
const switch_endpoint_interface *ptr;
const switch_endpoint_interface_t *ptr;
for (ptr = new_module->interface->endpoint_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Endpoint '%s'\n", ptr->interface_name);
switch_core_hash_insert(loadable_modules.endpoint_hash, (char *) ptr->interface_name, (void *) ptr);
@ -103,7 +103,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
if (new_module->interface->codec_interface) {
const switch_codec_implementation_t *impl;
const switch_codec_interface *ptr;
const switch_codec_interface_t *ptr;
for (ptr = new_module->interface->codec_interface; ptr; ptr = ptr->next) {
for (impl = ptr->implementations; impl; impl = impl->next) {
@ -119,7 +119,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->dialplan_interface) {
const switch_dialplan_interface *ptr;
const switch_dialplan_interface_t *ptr;
for (ptr = new_module->interface->dialplan_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Dialplan '%s'\n", ptr->interface_name);
@ -128,7 +128,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->timer_interface) {
const switch_timer_interface *ptr;
const switch_timer_interface_t *ptr;
for (ptr = new_module->interface->timer_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Timer '%s'\n", ptr->interface_name);
@ -137,7 +137,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->application_interface) {
const switch_application_interface *ptr;
const switch_application_interface_t *ptr;
for (ptr = new_module->interface->application_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Application '%s'\n", ptr->interface_name);
@ -147,7 +147,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->api_interface) {
const switch_api_interface *ptr;
const switch_api_interface_t *ptr;
for (ptr = new_module->interface->api_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding API Function '%s'\n", ptr->interface_name);
@ -156,7 +156,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->file_interface) {
const switch_file_interface *ptr;
const switch_file_interface_t *ptr;
for (ptr = new_module->interface->file_interface; ptr; ptr = ptr->next) {
int i;
@ -168,7 +168,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->speech_interface) {
const switch_speech_interface *ptr;
const switch_speech_interface_t *ptr;
for (ptr = new_module->interface->speech_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Speech interface '%s'\n", ptr->interface_name);
@ -177,7 +177,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
if (new_module->interface->directory_interface) {
const switch_directory_interface *ptr;
const switch_directory_interface_t *ptr;
for (ptr = new_module->interface->directory_interface; ptr; ptr = ptr->next) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Adding Directory interface '%s'\n", ptr->interface_name);
@ -190,7 +190,7 @@ static switch_status switch_loadable_module_process(char *key, switch_loadable_m
}
static switch_status switch_loadable_module_load_file(char *filename, switch_loadable_module_t **new_module)
static switch_status_t switch_loadable_module_load_file(char *filename, switch_loadable_module_t **new_module)
{
switch_loadable_module_t *module = NULL;
apr_dso_handle_t *dso = NULL;
@ -199,7 +199,7 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_loa
switch_module_load_t load_func_ptr = NULL;
int loading = 1;
const char *err = NULL;
switch_loadable_module_interface *interface = NULL;
switch_loadable_module_interface_t *interface = NULL;
char derr[512] = "";
assert(filename != NULL);
@ -266,13 +266,13 @@ static switch_status switch_loadable_module_load_file(char *filename, switch_loa
}
SWITCH_DECLARE(switch_status) switch_loadable_module_load_module(char *dir, char *fname)
SWITCH_DECLARE(switch_status_t) switch_loadable_module_load_module(char *dir, char *fname)
{
switch_size_t len = 0;
char *path;
char *file;
switch_loadable_module_t *new_module = NULL;
switch_status status;
switch_status_t status;
#ifdef WIN32
const char *ext = ".dll";
@ -312,7 +312,7 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_load_module(char *dir, char
}
}
SWITCH_DECLARE(switch_status) switch_loadable_module_build_dynamic(char *filename,
SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filename,
switch_module_load_t switch_module_load,
switch_module_runtime_t switch_module_runtime,
switch_module_shutdown_t switch_module_shutdown)
@ -321,7 +321,7 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_build_dynamic(char *filenam
switch_module_load_t load_func_ptr = NULL;
int loading = 1;
const char *err = NULL;
switch_loadable_module_interface *interface = NULL;
switch_loadable_module_interface_t *interface = NULL;
if ((module = switch_core_permenant_alloc(sizeof(switch_loadable_module_t))) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Couldn't allocate memory\n");
@ -390,7 +390,7 @@ static void switch_loadable_module_path_init()
}
#endif
SWITCH_DECLARE(switch_status) switch_loadable_module_init()
SWITCH_DECLARE(switch_status_t) switch_loadable_module_init()
{
apr_finfo_t finfo = {0};
@ -522,52 +522,52 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void)
}
SWITCH_DECLARE(switch_endpoint_interface *) switch_loadable_module_get_endpoint_interface(char *name)
SWITCH_DECLARE(switch_endpoint_interface_t *) switch_loadable_module_get_endpoint_interface(char *name)
{
return switch_core_hash_find(loadable_modules.endpoint_hash, name);
}
SWITCH_DECLARE(switch_codec_interface *) switch_loadable_module_get_codec_interface(char *name)
SWITCH_DECLARE(switch_codec_interface_t *) switch_loadable_module_get_codec_interface(char *name)
{
return switch_core_hash_find(loadable_modules.codec_hash, name);
}
SWITCH_DECLARE(switch_dialplan_interface *) switch_loadable_module_get_dialplan_interface(char *name)
SWITCH_DECLARE(switch_dialplan_interface_t *) switch_loadable_module_get_dialplan_interface(char *name)
{
return switch_core_hash_find(loadable_modules.dialplan_hash, name);
}
SWITCH_DECLARE(switch_timer_interface *) switch_loadable_module_get_timer_interface(char *name)
SWITCH_DECLARE(switch_timer_interface_t *) switch_loadable_module_get_timer_interface(char *name)
{
return switch_core_hash_find(loadable_modules.timer_hash, name);
}
SWITCH_DECLARE(switch_application_interface *) switch_loadable_module_get_application_interface(char *name)
SWITCH_DECLARE(switch_application_interface_t *) switch_loadable_module_get_application_interface(char *name)
{
return switch_core_hash_find(loadable_modules.application_hash, name);
}
SWITCH_DECLARE(switch_api_interface *) switch_loadable_module_get_api_interface(char *name)
SWITCH_DECLARE(switch_api_interface_t *) switch_loadable_module_get_api_interface(char *name)
{
return switch_core_hash_find(loadable_modules.api_hash, name);
}
SWITCH_DECLARE(switch_file_interface *) switch_loadable_module_get_file_interface(char *name)
SWITCH_DECLARE(switch_file_interface_t *) switch_loadable_module_get_file_interface(char *name)
{
return switch_core_hash_find(loadable_modules.file_hash, name);
}
SWITCH_DECLARE(switch_speech_interface *) switch_loadable_module_get_speech_interface(char *name)
SWITCH_DECLARE(switch_speech_interface_t *) switch_loadable_module_get_speech_interface(char *name)
{
return switch_core_hash_find(loadable_modules.speech_hash, name);
}
SWITCH_DECLARE(switch_directory_interface *) switch_loadable_module_get_directory_interface(char *name)
SWITCH_DECLARE(switch_directory_interface_t *) switch_loadable_module_get_directory_interface(char *name)
{
return switch_core_hash_find(loadable_modules.directory_hash, name);
}
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, switch_codec_interface **array,
SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool, switch_codec_interface_t **array,
int arraylen)
{
switch_hash_index_t *hi;
@ -586,11 +586,11 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool
}
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface **array,
SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interface_t **array,
int arraylen, char **prefs, int preflen)
{
int x, i = 0;
switch_codec_interface *codec_interface;
switch_codec_interface_t *codec_interface;
for (x = 0; x < preflen; x++) {
if ((codec_interface = switch_loadable_module_get_codec_interface(prefs[x])) != 0 ) {
@ -604,10 +604,10 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(switch_codec_interf
return i;
}
SWITCH_DECLARE(switch_status) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len)
SWITCH_DECLARE(switch_status_t) switch_api_execute(char *cmd, char *arg, char *retbuf, switch_size_t len)
{
switch_api_interface *api;
switch_status status;
switch_api_interface_t *api;
switch_status_t status;
switch_event_t *event;
if ((api = switch_loadable_module_get_api_interface(cmd)) != 0) {

View File

@ -46,8 +46,8 @@ static const char *LEVELS[] = {
};
struct switch_log_binding {
switch_log_function function;
switch_log_level level;
switch_log_function_t function;
switch_log_level_t level;
struct switch_log_binding *next;
};
@ -60,21 +60,21 @@ static switch_queue_t *LOG_QUEUE = NULL;
static int8_t THREAD_RUNNING = 0;
static uint8_t MAX_LEVEL = 0;
SWITCH_DECLARE(const char *) switch_log_level2str(switch_log_level level)
SWITCH_DECLARE(const char *) switch_log_level2str(switch_log_level_t level)
{
return LEVELS[level];
}
SWITCH_DECLARE(switch_log_level) switch_log_str2level(const char *str)
SWITCH_DECLARE(switch_log_level_t) switch_log_str2level(const char *str)
{
int x = 0;
switch_log_level level = SWITCH_LOG_DEBUG;
switch_log_level_t level = SWITCH_LOG_DEBUG;
for(x = 0;;x++) {
if (!LEVELS[x]) {
break;
}
if (!strcasecmp(LEVELS[x], str)) {
level = (switch_log_level) x;
level = (switch_log_level_t) x;
break;
}
}
@ -82,7 +82,7 @@ SWITCH_DECLARE(switch_log_level) switch_log_str2level(const char *str)
return level;
}
SWITCH_DECLARE(switch_status) switch_log_bind_logger(switch_log_function function, switch_log_level level)
SWITCH_DECLARE(switch_status_t) switch_log_bind_logger(switch_log_function_t function, switch_log_level_t level)
{
switch_log_binding *binding = NULL, *ptr = NULL;
assert(function != NULL);
@ -120,7 +120,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *thread, void *obj)
for(;;) {
void *pop = NULL;
switch_log_node *node = NULL;
switch_log_node_t *node = NULL;
switch_log_binding *binding;
if (switch_queue_pop(LOG_QUEUE, &pop) != SWITCH_STATUS_SUCCESS) {
@ -131,7 +131,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *thread, void *obj)
break;
}
node = (switch_log_node *) pop;
node = (switch_log_node_t *) pop;
switch_mutex_lock(BINDLOCK);
for(binding = BINDINGS; binding; binding = binding->next) {
@ -162,7 +162,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread_t *thread, void *obj)
return NULL;
}
SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file, const char *func, int line, switch_log_level level, char *fmt, ...)
SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file, const char *func, int line, switch_log_level_t level, char *fmt, ...)
{
char *data = NULL;
char *new_fmt = NULL;
@ -227,7 +227,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
}
if (level <= MAX_LEVEL) {
switch_log_node *node = malloc(sizeof(*node));
switch_log_node_t *node = malloc(sizeof(*node));
node->data = data;
node->file = strdup(filep);
node->func = strdup(func);
@ -250,7 +250,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file,
}
SWITCH_DECLARE(switch_status) switch_log_init(switch_memory_pool_t *pool)
SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool)
{
switch_thread_t *thread;
switch_threadattr_t *thd_attr;;
@ -274,7 +274,7 @@ SWITCH_DECLARE(switch_status) switch_log_init(switch_memory_pool_t *pool)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_log_shutdown(void)
SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void)
{
switch_queue_push(LOG_QUEUE, NULL);
return SWITCH_STATUS_SUCCESS;

View File

@ -47,7 +47,7 @@
SWITCH_DECLARE(switch_status) switch_resample_create(switch_audio_resampler_t **new_resampler,
SWITCH_DECLARE(switch_status_t) switch_resample_create(switch_audio_resampler_t **new_resampler,
int from_rate,
switch_size_t from_size,
int to_rate, uint32_t to_size, switch_memory_pool_t *pool)

View File

@ -94,7 +94,7 @@ struct switch_rtp {
uint16_t seq;
switch_payload_t payload;
switch_rtp_invalid_handler invalid_handler;
switch_rtp_invalid_handler_t invalid_handler;
void *private_data;
uint32_t ts;
@ -117,7 +117,7 @@ struct switch_rtp {
static int global_init = 0;
static switch_status ice_out(switch_rtp_t *rtp_session)
static switch_status_t ice_out(switch_rtp_t *rtp_session)
{
assert(rtp_session != NULL);
@ -225,7 +225,7 @@ SWITCH_DECLARE(switch_port_t) switch_rtp_request_port(void)
}
SWITCH_DECLARE(switch_status) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err)
SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err)
{
*err = "Success";
@ -256,7 +256,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_set_local_address(switch_rtp_t *rtp_ses
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err)
SWITCH_DECLARE(switch_status_t) switch_rtp_set_remote_address(switch_rtp_t *rtp_session, char *host, switch_port_t port, const char **err)
{
*err = "Success";
@ -270,7 +270,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_set_remote_address(switch_rtp_t *rtp_se
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_rtp_create(switch_rtp_t **new_rtp_session,
SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session,
switch_payload_t payload,
uint32_t packet_size,
uint32_t ms_per_packet,
@ -420,7 +420,7 @@ SWITCH_DECLARE(switch_rtp_t *)switch_rtp_new(char *rx_host,
}
SWITCH_DECLARE(switch_status) switch_rtp_activate_ice(switch_rtp_t *rtp_session, char *login, char *rlogin)
SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_session, char *login, char *rlogin)
{
char ice_user[80];
char user_ice[80];
@ -488,7 +488,7 @@ SWITCH_DECLARE(uint32_t) switch_rtp_get_default_payload(switch_rtp_t *rtp_sessio
return rtp_session->payload;
}
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, switch_rtp_invalid_handler on_invalid)
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp_t *rtp_session, switch_rtp_invalid_handler_t on_invalid)
{
rtp_session->invalid_handler = on_invalid;
}
@ -514,10 +514,10 @@ SWITCH_DECLARE(void) switch_rtp_clear_flag(switch_rtp_t *rtp_session, switch_rtp
}
static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_type, switch_frame_flag *flags)
static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_type, switch_frame_flag_t *flags)
{
switch_size_t bytes;
switch_status status;
switch_status_t status;
for(;;) {
bytes = sizeof(rtp_msg_t);
@ -606,7 +606,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
return (int) bytes;
}
SWITCH_DECLARE(switch_status) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void *data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags)
{
int bytes = rtp_common_read(rtp_session, payload_type, flags);
@ -625,7 +625,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_read(switch_rtp_t *rtp_session, void *d
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame)
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame)
{
int bytes = rtp_common_read(rtp_session, &frame->payload, &frame->flags);
@ -650,7 +650,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_s
}
SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session, void **data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag *flags)
SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session, void **data, uint32_t *datalen, switch_payload_t *payload_type, switch_frame_flag_t *flags)
{
int bytes = rtp_common_read(rtp_session, payload_type, flags);
@ -667,7 +667,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read(switch_rtp_t *rtp_session
return SWITCH_STATUS_SUCCESS;
}
static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint8_t m, switch_payload_t payload, switch_frame_flag *flags)
static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint8_t m, switch_payload_t payload, switch_frame_flag_t *flags)
{
switch_size_t bytes;
uint8_t packetize = (rtp_session->packet_size > datalen && (payload == rtp_session->payload)) ? 1 : 0;
@ -842,7 +842,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
}
SWITCH_DECLARE(switch_status) switch_rtp_disable_vad(switch_rtp_t *rtp_session)
SWITCH_DECLARE(switch_status_t) switch_rtp_disable_vad(switch_rtp_t *rtp_session)
{
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VAD)) {
return SWITCH_STATUS_GENERR;
@ -852,7 +852,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_disable_vad(switch_rtp_t *rtp_session)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags)
SWITCH_DECLARE(switch_status_t) switch_rtp_enable_vad(switch_rtp_t *rtp_session, switch_core_session_t *session, switch_codec_t *codec, switch_vad_flag_t flags)
{
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_VAD)) {
return SWITCH_STATUS_GENERR;
@ -890,7 +890,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_enable_vad(switch_rtp_t *rtp_session, s
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag *flags)
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp_t *rtp_session, void *data, uint32_t datalen, uint32_t ts, switch_frame_flag_t *flags)
{
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) || !rtp_session->remote_addr) {
@ -935,7 +935,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
}
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session, void *data, uint16_t datalen, uint8_t m, uint8_t payload, uint32_t ts, uint16_t mseq, switch_frame_flag *flags)
SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session, void *data, uint16_t datalen, uint8_t m, uint8_t payload, uint32_t ts, uint16_t mseq, switch_frame_flag_t *flags)
{
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) || !rtp_session->remote_addr) {

View File

@ -268,7 +268,7 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_username(switch_stun_pa
return 1;
}
SWITCH_DECLARE(switch_status) switch_stun_lookup (char **ip,
SWITCH_DECLARE(switch_status_t) switch_stun_lookup (char **ip,
switch_port_t *port,
char *stunip,
switch_port_t stunport,

View File

@ -34,9 +34,9 @@
#include <string.h>
#include <stdlib.h>
SWITCH_DECLARE(switch_status) switch_socket_recvfrom(switch_sockaddr_t *from, switch_socket_t *sock, int32_t flags, char *buf, switch_size_t *len)
SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t *from, switch_socket_t *sock, int32_t flags, char *buf, switch_size_t *len)
{
switch_status status;
switch_status_t status;
if ((status = apr_socket_recvfrom(from, sock, flags, buf, len)) == SWITCH_STATUS_SUCCESS) {
from->port = ntohs(from->sa.sin.sin_port);
@ -133,7 +133,7 @@ SWITCH_DECLARE(char *) switch_cut_path(char *in)
return ret;
}
SWITCH_DECLARE(switch_status) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock,
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock,
switch_int16_t flags, switch_memory_pool_t *pool)
{
switch_pollset_t *pollset;
@ -154,7 +154,7 @@ SWITCH_DECLARE(switch_status) switch_socket_create_pollfd(switch_pollfd_t *poll,
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len)
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len)
{
size_t i;