mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
part 2 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1294 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
+20
-20
@@ -60,53 +60,53 @@ 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 **buffer, switch_size_t max_len);
|
||||
SWITCH_DECLARE(switch_status) 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
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
/*! \brief Get the length of a switch_buffer_t
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \return int size of the buffer.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_len(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_len(switch_buffer_t *buffer);
|
||||
|
||||
/*! \brief Get the freespace of a switch_buffer
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
/*! \brief Get the freespace of a switch_buffer_t
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \return int freespace in the buffer.
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_freespace(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_freespace(switch_buffer_t *buffer);
|
||||
|
||||
/*! \brief Get the in use amount of a switch_buffer
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
/*! \brief Get the in use amount of a switch_buffer_t
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \return int ammount of buffer curently in use
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_inuse(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_inuse(switch_buffer_t *buffer);
|
||||
|
||||
/*! \brief Read data from a switch_buffer up to the ammount of datalen if it is available. Remove read data from buffer.
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
/*! \brief Read data from a switch_buffer_t up to the ammount of datalen if it is available. Remove read data from buffer.
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \param data pointer to the read data to be returned
|
||||
* \param datalen amount of data to be returned
|
||||
* \return int ammount of data actually read
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_read(switch_buffer *buffer, void *data, switch_size_t datalen);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_read(switch_buffer_t *buffer, void *data, switch_size_t datalen);
|
||||
|
||||
/*! \brief Write data into a switch_buffer up to the length of datalen
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
/*! \brief Write data into a switch_buffer_t up to the length of datalen
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \param data pointer to the data to be written
|
||||
* \param datalen amount of data to be written
|
||||
* \return int amount of buffer used after the write, or 0 if no space available
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_write(switch_buffer *buffer, void *data, switch_size_t datalen);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_write(switch_buffer_t *buffer, void *data, switch_size_t datalen);
|
||||
|
||||
/*! \brief Remove data from the buffer
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
* \param datalen amount of data to be removed
|
||||
* \return int size of buffer, or 0 if unable to toss that much data
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_toss(switch_buffer *buffer, switch_size_t datalen);
|
||||
SWITCH_DECLARE(switch_size_t) switch_buffer_toss(switch_buffer_t *buffer, switch_size_t datalen);
|
||||
|
||||
/*! \brief Remove all data from the buffer
|
||||
* \param buffer any buffer of type switch_buffer
|
||||
* \param buffer any buffer of type switch_buffer_t
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_buffer_zero(switch_buffer *buffer);
|
||||
SWITCH_DECLARE(void) switch_buffer_zero(switch_buffer_t *buffer);
|
||||
/** @} */
|
||||
|
||||
END_EXTERN_C
|
||||
|
||||
+10
-10
@@ -105,11 +105,11 @@ struct switch_caller_extension {
|
||||
/*! The number of the extension */
|
||||
char *extension_number;
|
||||
/*! Pointer to the current application for this extension */
|
||||
struct switch_caller_application *current_application;
|
||||
switch_caller_application_t *current_application;
|
||||
/*! Pointer to the last application for this extension */
|
||||
struct switch_caller_application *last_application;
|
||||
switch_caller_application_t *last_application;
|
||||
/*! Pointer to the entire stack of applications for this extension */
|
||||
struct switch_caller_application *applications;
|
||||
switch_caller_application_t *applications;
|
||||
};
|
||||
|
||||
/*!
|
||||
@@ -119,7 +119,7 @@ struct switch_caller_extension {
|
||||
\param extension_number extension number
|
||||
\return a new extension object allocated from the session's memory pool
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_caller_extension_new(switch_core_session *session,
|
||||
SWITCH_DECLARE(switch_caller_extension_t *) switch_caller_extension_new(switch_core_session_t *session,
|
||||
char *extension_name,
|
||||
char *extension_number
|
||||
);
|
||||
@@ -131,8 +131,8 @@ SWITCH_DECLARE(switch_caller_extension *) switch_caller_extension_new(switch_cor
|
||||
\param application_name the name of the application
|
||||
\param extra_data optional argument to the application
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session *session,
|
||||
switch_caller_extension *caller_extension,
|
||||
SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session_t *session,
|
||||
switch_caller_extension_t *caller_extension,
|
||||
char *application_name,
|
||||
char *extra_data);
|
||||
|
||||
@@ -151,7 +151,7 @@ SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session
|
||||
\param destination_number destination number
|
||||
\return a new profile object allocated from the session's memory pool
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_new(switch_memory_pool_t *pool,
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_new(switch_memory_pool_t *pool,
|
||||
char *dialplan,
|
||||
char *caller_id_name,
|
||||
char *caller_id_number,
|
||||
@@ -169,8 +169,8 @@ SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_new(switch_memory_
|
||||
\param tocopy the existing profile
|
||||
*/
|
||||
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_clone(switch_core_session *session,
|
||||
switch_caller_profile *tocopy);
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_caller_profile_clone(switch_core_session_t *session,
|
||||
switch_caller_profile_t *tocopy);
|
||||
|
||||
/*!
|
||||
\brief Add headers to an existing event in regards to a specific profile
|
||||
@@ -179,7 +179,7 @@ SWITCH_DECLARE(switch_caller_profile *) switch_caller_profile_clone(switch_core_
|
||||
\param event the event to add the information to
|
||||
*/
|
||||
|
||||
SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile *caller_profile, char *prefix, switch_event_t *event);
|
||||
SWITCH_DECLARE(void) switch_caller_profile_event_set_data(switch_caller_profile_t *caller_profile, char *prefix, switch_event_t *event);
|
||||
|
||||
END_EXTERN_C
|
||||
|
||||
|
||||
@@ -64,17 +64,17 @@ 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 *channel);
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_get_state(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Determine if a channel is ready for io
|
||||
\param channel channel to test
|
||||
\return true if the channel is ready
|
||||
*/
|
||||
SWITCH_DECLARE(unsigned int) switch_channel_ready(switch_channel *channel);
|
||||
SWITCH_DECLARE(unsigned int) switch_channel_ready(switch_channel_t *channel);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_set_state(switch_channel *channel,
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_set_state(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line,
|
||||
@@ -100,7 +100,7 @@ SWITCH_DECLARE(switch_call_cause_t) switch_channel_str2cause(char *str);
|
||||
\param channel the channel
|
||||
\return the code
|
||||
*/
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_call_cause_t) switch_channel_get_cause(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief return a cause string for a given cause
|
||||
@@ -114,7 +114,7 @@ SWITCH_DECLARE(char *) switch_channel_cause2str(switch_call_cause_t cause);
|
||||
\param channel channel to retrieve timetable from
|
||||
\return a pointer to the channel's timetable (created, answered, etc..)
|
||||
*/
|
||||
SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Allocate a new 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 **channel, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status) 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,8 +131,8 @@ SWITCH_DECLARE(switch_status) switch_channel_alloc(switch_channel **channel, swi
|
||||
\param state the initial state of the channel
|
||||
\param flags the initial channel flags
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel *channel,
|
||||
switch_core_session *session,
|
||||
SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel_t *channel,
|
||||
switch_core_session_t *session,
|
||||
switch_channel_state state,
|
||||
uint32_t flags);
|
||||
|
||||
@@ -141,42 +141,42 @@ SWITCH_DECLARE(switch_status) switch_channel_init(switch_channel *channel,
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's caller profile
|
||||
\param channel channel to retrive the profile from
|
||||
\return the requested profile
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_caller_profile(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_caller_profile(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Set the given channel's originator caller profile
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_originator_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's originator caller profile
|
||||
\param channel channel to retrive the profile from
|
||||
\return the requested profile
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originator_caller_profile(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originator_caller_profile(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Set the given channel's originatee caller profile
|
||||
\param channel channel to assign the profile to
|
||||
\param caller_profile the profile to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel *channel, switch_caller_profile *caller_profile);
|
||||
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile);
|
||||
|
||||
/*!
|
||||
\brief Retrive the given channel's originatee caller profile
|
||||
\param channel channel to retrive the profile from
|
||||
\return the requested profile
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originatee_caller_profile(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originatee_caller_profile(switch_channel_t *channel);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -184,7 +184,7 @@ SWITCH_DECLARE(switch_caller_profile *) switch_channel_get_originatee_caller_pro
|
||||
\param channel channel to retrive the unique id from
|
||||
\return the unique id
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel *channel);
|
||||
SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Set a variable on a given channel
|
||||
@@ -193,7 +193,7 @@ SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel *channel);
|
||||
\param value the vaule of the variable
|
||||
\returns SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel *channel, char *varname, char *value);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value);
|
||||
|
||||
/*!
|
||||
\brief Retrieve a variable from a given channel
|
||||
@@ -201,21 +201,21 @@ SWITCH_DECLARE(switch_status) switch_channel_set_variable(switch_channel *channe
|
||||
\param varname the name of the variable
|
||||
\return the value of the requested variable
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel *channel, char *varname);
|
||||
SWITCH_DECLARE(char *) switch_channel_get_variable(switch_channel_t *channel, char *varname);
|
||||
|
||||
/*!
|
||||
\brief Assign a caller extension to a given channel
|
||||
\param channel channel to assign extension to
|
||||
\param caller_extension extension to assign
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel *channel, switch_caller_extension *caller_extension);
|
||||
SWITCH_DECLARE(void) switch_channel_set_caller_extension(switch_channel_t *channel, switch_caller_extension_t *caller_extension);
|
||||
|
||||
/*!
|
||||
\brief Retrieve caller extension from a given channel
|
||||
\param channel channel to retrieve extension from
|
||||
\return the requested extension
|
||||
*/
|
||||
SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_caller_extension_t *) switch_channel_get_caller_extension(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Test for presence of given flag(s) on a given channel
|
||||
@@ -223,23 +223,23 @@ SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(sw
|
||||
\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 *channel, switch_channel_flag flags);
|
||||
SWITCH_DECLARE(int) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag 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 *channel, switch_channel_flag flags);
|
||||
SWITCH_DECLARE(void) switch_channel_set_flag(switch_channel_t *channel, switch_channel_flag 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 *channel, switch_channel_flag flags);
|
||||
SWITCH_DECLARE(void) switch_channel_clear_flag(switch_channel_t *channel, switch_channel_flag flags);
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_perform_answer(switch_channel *channel,
|
||||
SWITCH_DECLARE(switch_status) 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 *chan
|
||||
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel *channel,
|
||||
SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line);
|
||||
@@ -269,14 +269,14 @@ SWITCH_DECLARE(switch_status) switch_channel_perform_pre_answer(switch_channel *
|
||||
\param state_handler table of state handler functions
|
||||
\return the index number/priority of the table negative value indicates failure
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel *channel, const switch_state_handler_table *state_handler);
|
||||
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler);
|
||||
|
||||
/*!
|
||||
\brief clear a state handler table from a given channel
|
||||
\param channel channel from which to clear the state handler table
|
||||
\param state_handler table of state handler functions
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel *channel, const switch_state_handler_table *state_handler);
|
||||
SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel_t *channel, const switch_state_handler_table_t *state_handler);
|
||||
|
||||
/*!
|
||||
\brief Retrieve an state handler tablefrom a given channel at given index level
|
||||
@@ -284,7 +284,7 @@ SWITCH_DECLARE(void) switch_channel_clear_state_handler(switch_channel *channel,
|
||||
\param index the index of the state handler table (start from 0)
|
||||
\return given channel's state handler table at given index or NULL if requested index does not exist.
|
||||
*/
|
||||
SWITCH_DECLARE(const switch_state_handler_table *) switch_channel_get_state_handler(switch_channel *channel, int index);
|
||||
SWITCH_DECLARE(const switch_state_handler_table_t *) switch_channel_get_state_handler(switch_channel_t *channel, int index);
|
||||
|
||||
/*!
|
||||
\brief Set private data on channel
|
||||
@@ -292,14 +292,14 @@ SWITCH_DECLARE(const switch_state_handler_table *) switch_channel_get_state_hand
|
||||
\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 *channel, void *private_info);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel_t *channel, void *private_info);
|
||||
|
||||
/*!
|
||||
\brief Retrieve private from a given channel
|
||||
\param channel channel to retrieve data from
|
||||
\return void pointer to channel's private data
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel *channel);
|
||||
SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Assign a name to a given channel
|
||||
@@ -307,17 +307,17 @@ SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel *channel);
|
||||
\param name name to assign
|
||||
\return SWITCH_STATUS_SUCCESS if name was assigned
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel *channel, char *name);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel_t *channel, char *name);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the name of a given channel
|
||||
\param channel channel to get name of
|
||||
\return the channel's name
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel *channel);
|
||||
SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel_t *channel);
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channel *channel,
|
||||
SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channel_t *channel,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line,
|
||||
@@ -336,7 +336,7 @@ SWITCH_DECLARE(switch_channel_state) switch_channel_perform_hangup(switch_channe
|
||||
\param channel channel to test
|
||||
\return number of digits in the queue
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel *channel);
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel);
|
||||
|
||||
/*!
|
||||
\brief Queue DTMF on a given channel
|
||||
@@ -344,7 +344,7 @@ SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel *channel);
|
||||
\param dtmf string of digits to queue
|
||||
\return SWITCH_STATUS_SUCCESS if successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel, char *dtmf);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel_t *channel, char *dtmf);
|
||||
|
||||
/*!
|
||||
\brief Retrieve DTMF digits from a given channel
|
||||
@@ -353,7 +353,7 @@ SWITCH_DECLARE(switch_status) switch_channel_queue_dtmf(switch_channel *channel,
|
||||
\param len max size in bytes of the buffer
|
||||
\return number of bytes read into the buffer
|
||||
*/
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel *channel, char *dtmf, switch_size_t len);
|
||||
SWITCH_DECLARE(switch_size_t) switch_channel_dequeue_dtmf(switch_channel_t *channel, char *dtmf, switch_size_t len);
|
||||
|
||||
/*!
|
||||
\brief Render the name of the provided state enum
|
||||
@@ -367,12 +367,12 @@ SWITCH_DECLARE(const char *) switch_channel_state_name(switch_channel_state stat
|
||||
\param channel channel to add information about
|
||||
\param event event to add information to
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel *channel, switch_event_t *event);
|
||||
SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, switch_event_t *event);
|
||||
|
||||
|
||||
// These may go away
|
||||
SWITCH_DECLARE(switch_status) switch_channel_set_raw_mode (switch_channel *channel, int freq, int bits, int channels, int ms, int kbps);
|
||||
SWITCH_DECLARE(switch_status) switch_channel_get_raw_mode (switch_channel *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
|
||||
SWITCH_DECLARE(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);
|
||||
/** @} */
|
||||
|
||||
END_EXTERN_C
|
||||
|
||||
@@ -84,25 +84,25 @@ struct switch_config {
|
||||
|
||||
/*!
|
||||
\brief Open a configuration file
|
||||
\param cfg (switch_config *) config handle to use
|
||||
\param cfg (switch_config_t *) config handle to use
|
||||
\param file_path path to the file
|
||||
\return 1 (true) on success 0 (false) on failure
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config *cfg, char *file_path);
|
||||
SWITCH_DECLARE(int) switch_config_open_file(switch_config_t *cfg, char *file_path);
|
||||
|
||||
/*!
|
||||
\brief Close a previously opened configuration file
|
||||
\param cfg (switch_config *) config handle to use
|
||||
\param cfg (switch_config_t *) config handle to use
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config *cfg);
|
||||
SWITCH_DECLARE(void) switch_config_close_file(switch_config_t *cfg);
|
||||
|
||||
/*!
|
||||
\brief Retrieve next name/value pair from configuration file
|
||||
\param cfg (switch_config *) config handle to use
|
||||
\param cfg (switch_config_t *) config handle to use
|
||||
\param var pointer to aim at the new variable name
|
||||
\param val pointer to aim at the new value
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config *cfg, char **var, char **val);
|
||||
SWITCH_DECLARE(int) switch_config_next_pair(switch_config_t *cfg, char **var, char **val);
|
||||
|
||||
END_EXTERN_C
|
||||
|
||||
|
||||
+69
-69
@@ -50,7 +50,7 @@ struct switch_core_session_message {
|
||||
/*! uuid of the sender (for replies)*/
|
||||
char *from;
|
||||
/*! enumeration of the type of message */
|
||||
switch_core_session_message_t message_id;
|
||||
switch_core_session_message_types_t message_id;
|
||||
|
||||
/*! optional numeric arg*/
|
||||
int numeric_arg;
|
||||
@@ -121,19 +121,19 @@ 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 *session);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_read_lock(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Acquire a write lock on the session
|
||||
\param session the session to acquire from
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Unlock a read or write lock on as given session
|
||||
\param session the session
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session);
|
||||
///\}
|
||||
|
||||
///\defgroup sh State Handlers
|
||||
@@ -144,14 +144,14 @@ SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session *session);
|
||||
\param state_handler a state handler to add
|
||||
\return the current index/priority of this handler
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_add_state_handler(const switch_state_handler_table *state_handler);
|
||||
SWITCH_DECLARE(int) switch_core_add_state_handler(const switch_state_handler_table_t *state_handler);
|
||||
|
||||
/*!
|
||||
\brief Access a state handler
|
||||
\param index the desired index to access
|
||||
\return the desired state handler table or NULL when it does not exist.
|
||||
*/
|
||||
SWITCH_DECLARE(const switch_state_handler_table *) switch_core_get_state_handler(int index);
|
||||
SWITCH_DECLARE(const switch_state_handler_table_t *) switch_core_get_state_handler(int index);
|
||||
///\}
|
||||
|
||||
|
||||
@@ -174,13 +174,13 @@ SWITCH_DECLARE(switch_status) switch_core_destroy_memory_pool(switch_memory_pool
|
||||
\brief Start the session's state machine
|
||||
\param session the session on which to start the state machine
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_run(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief determine if the session's state machine is running
|
||||
\param session the session on which to check
|
||||
*/
|
||||
SWITCH_DECLARE(unsigned int) switch_core_session_runing(switch_core_session *session);
|
||||
SWITCH_DECLARE(unsigned int) switch_core_session_runing(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Allocate memory from the main pool with no intention of returning it
|
||||
@@ -205,7 +205,7 @@ SWITCH_DECLARE(void *) switch_core_alloc(switch_memory_pool_t *pool, switch_size
|
||||
\return a void pointer to the newly allocated memory
|
||||
\note the memory will be in scope as long as the session exists
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session *session, switch_size_t memory);
|
||||
SWITCH_DECLARE(void *) switch_core_session_alloc(switch_core_session_t *session, switch_size_t memory);
|
||||
|
||||
/*!
|
||||
\brief Copy a string using permenant memory allocation
|
||||
@@ -220,7 +220,7 @@ SWITCH_DECLARE(char *) switch_core_permenant_strdup(char *todup);
|
||||
\param todup the string to duplicate
|
||||
\return a pointer to the newly duplicated string
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session *session, char *todup);
|
||||
SWITCH_DECLARE(char *) switch_core_session_strdup(switch_core_session_t *session, char *todup);
|
||||
|
||||
/*!
|
||||
\brief Copy a string using memory allocation from a given pool
|
||||
@@ -236,7 +236,7 @@ SWITCH_DECLARE(char *) switch_core_strdup(switch_memory_pool_t *pool, char *todu
|
||||
\return the session's pool
|
||||
\note to be used sparingly
|
||||
*/
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_core_session_get_pool(switch_core_session_t *session);
|
||||
///\}
|
||||
|
||||
///\defgroup sessm Session Creation / Management
|
||||
@@ -248,14 +248,14 @@ 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 *) 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 *endpoint_interface, switch_memory_pool_t *pool);
|
||||
|
||||
/*!
|
||||
\brief Destroy a session and return the memory pool to the core
|
||||
\param session pointer to a pointer of the session to destroy
|
||||
\return
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session **session);
|
||||
SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session_t **session);
|
||||
|
||||
/*!
|
||||
\brief Allocate and return a new session from the core based on a given endpoint module name
|
||||
@@ -263,32 +263,32 @@ SWITCH_DECLARE(void) switch_core_session_destroy(switch_core_session **session);
|
||||
\param pool the pool to use
|
||||
\return the newly created session
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_request_by_name(char *endpoint_name, switch_memory_pool_t *pool);
|
||||
|
||||
/*!
|
||||
\brief Launch the session thread (state machine) on a given session
|
||||
\param session the session to activate the state machine on
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_thread_launch(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_thread_launch(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Retrieve a pointer to the channel object associated with a given session
|
||||
\param session the session to retrieve from
|
||||
\return a pointer to the channel object
|
||||
*/
|
||||
SWITCH_DECLARE(switch_channel *) switch_core_session_get_channel(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_channel_t *) switch_core_session_get_channel(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Signal a session's state machine thread that a state change has occured
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session *session);
|
||||
SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the unique identifier from a session
|
||||
\param session the session to retrieve the uuid from
|
||||
\return a string representing the uuid
|
||||
*/
|
||||
SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session *session);
|
||||
SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Locate a session based on it's uuiid
|
||||
@@ -296,15 +296,15 @@ SWITCH_DECLARE(char *) switch_core_session_get_uuid(switch_core_session *session
|
||||
\return the session or NULL
|
||||
\note if the session was located it will have a read lock obtained which will need to be released with switch_core_session_rwunlock()
|
||||
*/
|
||||
SWITCH_DECLARE(switch_core_session *) switch_core_session_locate(char *uuid_str);
|
||||
SWITCH_DECLARE(switch_core_session_t *) switch_core_session_locate(char *uuid_str);
|
||||
|
||||
/*!
|
||||
\brief Send a message to another session using it's uuid
|
||||
\param uuid_str the unique id of the session you want to send a message to
|
||||
\param message the switch_core_session_message object to send
|
||||
\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 *message);
|
||||
SWITCH_DECLARE (switch_status) switch_core_session_message_send(char *uuid_str, switch_core_session_message_t *message);
|
||||
|
||||
/*!
|
||||
\brief Queue an event on another session using its uuid
|
||||
@@ -319,7 +319,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_event_send(char *uuid_str, swi
|
||||
\param session the session to retrieve from
|
||||
\return a pointer to the private data
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session *session);
|
||||
SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Add private user data to a session
|
||||
@@ -327,7 +327,7 @@ SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session *sess
|
||||
\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 *session, void *private_info);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session_t *session, void *private_info);
|
||||
|
||||
/*!
|
||||
\brief Add a logical stream to a session
|
||||
@@ -335,7 +335,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_sessio
|
||||
\param private_info an optional pointer to private data for the new stream
|
||||
\return the stream id of the new stream
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session, void *private_info);
|
||||
SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session_t *session, void *private_info);
|
||||
|
||||
/*!
|
||||
\brief Retreive a logical stream from a session
|
||||
@@ -343,14 +343,14 @@ SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session,
|
||||
\param index the index to retrieve
|
||||
\return the stream
|
||||
*/
|
||||
SWITCH_DECLARE(void *) switch_core_session_get_stream(switch_core_session *session, int index);
|
||||
SWITCH_DECLARE(void *) switch_core_session_get_stream(switch_core_session_t *session, int index);
|
||||
|
||||
/*!
|
||||
\brief Determine the number of logical streams a session has
|
||||
\param session the session to query
|
||||
\return the total number of logical streams
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session *session);
|
||||
SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Launch a thread designed to exist within the scope of a given session
|
||||
@@ -358,13 +358,13 @@ SWITCH_DECLARE(int) switch_core_session_get_stream_count(switch_core_session *se
|
||||
\param func a function to execute in the thread
|
||||
\param obj an arguement
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session *session, void *(*func)(switch_thread_t *, void *), void *obj);
|
||||
SWITCH_DECLARE(void) switch_core_session_launch_thread(switch_core_session_t *session, void *(*func)(switch_thread_t *, void *), void *obj);
|
||||
|
||||
/*!
|
||||
\brief Signal a thread using a thread session to terminate
|
||||
\param thread_session the thread_session to indicate to
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session *thread_session);
|
||||
SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session_t *thread_session);
|
||||
|
||||
/*!
|
||||
\brief Launch a service thread on a session to drop inbound data
|
||||
@@ -372,7 +372,7 @@ SWITCH_DECLARE(void) switch_core_thread_session_end(switch_core_thread_session *
|
||||
\param stream_id which logical media channel to use
|
||||
\param thread_session the thread_session to use
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_service_session(switch_core_session *session, switch_core_thread_session *thread_session, int stream_id);
|
||||
SWITCH_DECLARE(void) switch_core_service_session(switch_core_session_t *session, switch_core_thread_session_t *thread_session, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Request an outgoing session spawned from an existing session using a desired endpoing module
|
||||
@@ -383,10 +383,10 @@ SWITCH_DECLARE(void) switch_core_service_session(switch_core_session *session, s
|
||||
\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 *session,
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_outgoing_channel(switch_core_session_t *session,
|
||||
char *endpoint_name,
|
||||
switch_caller_profile *caller_profile,
|
||||
switch_core_session **new_session,
|
||||
switch_caller_profile_t *caller_profile,
|
||||
switch_core_session_t **new_session,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
/*!
|
||||
@@ -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 *session);
|
||||
SWITCH_DECLARE(switch_status) 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 *session, switch_core_session_message *message);
|
||||
SWITCH_DECLARE(switch_status) 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 *session, switch_event_t *event);
|
||||
SWITCH_DECLARE(switch_status) 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 *session, switch_frame **frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status) 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,7 +430,7 @@ 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 *session, switch_frame *frame, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Send a signal to a channel
|
||||
@@ -438,7 +438,7 @@ SWITCH_DECLARE(switch_status) switch_core_session_write_frame(switch_core_sessio
|
||||
\param sig signal to send
|
||||
\return status returned by the session's signal handler
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_core_session *session,
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_perform_kill_channel(switch_core_session_t *session,
|
||||
const char *file,
|
||||
const char *func,
|
||||
int line,
|
||||
@@ -458,7 +458,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 *session, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status) 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
|
||||
@@ -467,7 +467,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 *session, int timeout, int stream_id);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_waitfor_write(switch_core_session_t *session, int timeout, int stream_id);
|
||||
|
||||
/*!
|
||||
\brief Send DTMF to a session
|
||||
@@ -475,7 +475,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 *session, char *dtmf);
|
||||
SWITCH_DECLARE(switch_status) 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
|
||||
@@ -483,7 +483,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 *session, switch_outgoing_channel_hook outgoing_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_outgoing(switch_core_session_t *session, switch_outgoing_channel_hook outgoing_channel);
|
||||
///\}
|
||||
|
||||
///\defgroup shooks Session Hook Callbacks
|
||||
@@ -495,7 +495,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 *session, switch_answer_channel_hook answer_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_answer_channel(switch_core_session_t *session, switch_answer_channel_hook answer_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session sends a message
|
||||
@@ -503,7 +503,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 *session, switch_receive_message_hook receive_message);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_receive_message(switch_core_session_t *session, switch_receive_message_hook receive_message);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session reads a frame
|
||||
@@ -511,7 +511,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 *session, switch_read_frame_hook read_frame);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_read_frame(switch_core_session_t *session, switch_read_frame_hook read_frame);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session writes a frame
|
||||
@@ -519,7 +519,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 *session, switch_write_frame_hook write_frame);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_write_frame(switch_core_session_t *session, switch_write_frame_hook write_frame);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session kills a channel
|
||||
@@ -527,7 +527,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 *session, switch_kill_channel_hook kill_channel);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_kill_channel(switch_core_session_t *session, switch_kill_channel_hook kill_channel);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session waits for a read event
|
||||
@@ -535,7 +535,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 *session, switch_waitfor_read_hook waitfor_read);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_read(switch_core_session_t *session, switch_waitfor_read_hook waitfor_read);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session waits for a write event
|
||||
@@ -543,7 +543,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 *session, switch_waitfor_write_hook waitfor_write);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_waitfor_write(switch_core_session_t *session, switch_waitfor_write_hook waitfor_write);
|
||||
|
||||
/*!
|
||||
\brief Add an event hook to be executed when a session sends dtmf
|
||||
@@ -551,7 +551,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 *session, switch_send_dtmf_hook send_dtmf);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_add_event_hook_send_dtmf(switch_core_session_t *session, switch_send_dtmf_hook send_dtmf);
|
||||
///\}
|
||||
|
||||
///\defgroup hashf Hash Functions
|
||||
@@ -620,21 +620,21 @@ 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 *timer, char *timer_name, int interval, int samples, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status) 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
|
||||
\param timer the timer to wait on
|
||||
\return the newest sample count
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_timer_next(switch_timer *timer);
|
||||
SWITCH_DECLARE(int) switch_core_timer_next(switch_timer_t *timer);
|
||||
|
||||
/*!
|
||||
\brief Destroy an allocated timer
|
||||
\param timer timer to destroy
|
||||
\return SWITCH_STATUS_SUCCESS after destruction
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer *timer);
|
||||
SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer_t *timer);
|
||||
///\}
|
||||
|
||||
///\defgroup codecs Codec Functions
|
||||
@@ -652,13 +652,13 @@ SWITCH_DECLARE(switch_status) switch_core_timer_destroy(switch_timer *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 *codec,
|
||||
SWITCH_DECLARE(switch_status) 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 *codec_settings,
|
||||
const switch_codec_settings_t *codec_settings,
|
||||
switch_memory_pool_t *pool);
|
||||
|
||||
/*!
|
||||
@@ -675,8 +675,8 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec *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 *codec,
|
||||
switch_codec *other_codec,
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
@@ -699,8 +699,8 @@ SWITCH_DECLARE(switch_status) switch_core_codec_encode(switch_codec *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 *codec,
|
||||
switch_codec *other_codec,
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
@@ -714,7 +714,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_decode(switch_codec *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 *codec);
|
||||
SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec_t *codec);
|
||||
|
||||
/*!
|
||||
\brief Assign the read codec to a given session
|
||||
@@ -722,14 +722,14 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec *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 *session, switch_codec *codec);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_read_codec(switch_core_session_t *session, switch_codec_t *codec);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the read codec from a given session
|
||||
\param session session to retrieve from
|
||||
\return a pointer to the codec
|
||||
*/
|
||||
SWITCH_DECLARE(switch_codec *) switch_core_session_get_read_codec(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_read_codec(switch_core_session_t *session);
|
||||
|
||||
/*!
|
||||
\brief Assign the write codec to a given session
|
||||
@@ -737,14 +737,14 @@ SWITCH_DECLARE(switch_codec *) switch_core_session_get_read_codec(switch_core_se
|
||||
\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 *session, switch_codec *codec);
|
||||
SWITCH_DECLARE(switch_status) switch_core_session_set_write_codec(switch_core_session_t *session, switch_codec_t *codec);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the write codec from a given session
|
||||
\param session session to retrieve from
|
||||
\return a pointer to the codec
|
||||
*/
|
||||
SWITCH_DECLARE(switch_codec *) switch_core_session_get_write_codec(switch_core_session *session);
|
||||
SWITCH_DECLARE(switch_codec_t *) switch_core_session_get_write_codec(switch_core_session_t *session);
|
||||
|
||||
///\}
|
||||
///\defgroup db Database Functions
|
||||
@@ -777,7 +777,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 *fh, char *file_path, unsigned int flags, switch_memory_pool_t *pool);
|
||||
SWITCH_DECLARE(switch_status) 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
|
||||
@@ -786,7 +786,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_open(switch_file_handle *fh, char
|
||||
\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 *fh, void *data, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status) switch_core_file_read(switch_file_handle_t *fh, void *data, switch_size_t *len);
|
||||
|
||||
/*!
|
||||
\brief Write media to a file handle
|
||||
@@ -795,7 +795,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_read(switch_file_handle *fh, void
|
||||
\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 *fh, void *data, switch_size_t *len);
|
||||
SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle_t *fh, void *data, switch_size_t *len);
|
||||
|
||||
/*!
|
||||
\brief Seek a position in a file
|
||||
@@ -805,14 +805,14 @@ SWITCH_DECLARE(switch_status) switch_core_file_write(switch_file_handle *fh, voi
|
||||
\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 *fh, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
SWITCH_DECLARE(switch_status) 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 *fh);
|
||||
SWITCH_DECLARE(switch_status) switch_core_file_close(switch_file_handle_t *fh);
|
||||
///\}
|
||||
|
||||
///\defgroup speech ASR/TTS Functions
|
||||
|
||||
@@ -88,7 +88,7 @@ struct switch_event {
|
||||
/*! the owner of the event */
|
||||
char *owner;
|
||||
/*! the subclass of the event */
|
||||
switch_event_subclass *subclass;
|
||||
switch_event_subclass_t *subclass;
|
||||
/*! the event headers */
|
||||
switch_event_header_t *headers;
|
||||
/*! the body of the event */
|
||||
@@ -107,7 +107,7 @@ struct switch_event_node {
|
||||
/*! the event id enumeration to bind to */
|
||||
switch_event_types_t event_id;
|
||||
/*! the event subclass to bind to for custom events */
|
||||
switch_event_subclass *subclass;
|
||||
switch_event_subclass_t *subclass;
|
||||
/*! a callback function to execute when the event is triggered */
|
||||
switch_event_callback_t callback;
|
||||
/*! private data */
|
||||
|
||||
@@ -43,7 +43,7 @@ BEGIN_EXTERN_C
|
||||
/*! \brief An abstraction of a data frame */
|
||||
struct switch_frame {
|
||||
/*! a pointer to the codec information */
|
||||
switch_codec *codec;
|
||||
switch_codec_t *codec;
|
||||
/*! the originating source of the frame */
|
||||
const char *source;
|
||||
/*! the raw packet */
|
||||
|
||||
+10
-10
@@ -58,7 +58,7 @@ 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 *session,
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_callback(switch_core_session_t *session,
|
||||
switch_dtmf_callback_function 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 *session,
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_collect_digits_count(switch_core_session_t *session,
|
||||
char *buf,
|
||||
unsigned int buflen,
|
||||
unsigned int maxdigits,
|
||||
@@ -96,8 +96,8 @@ 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 *session,
|
||||
switch_file_handle *fh,
|
||||
SWITCH_DECLARE(switch_status) 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,
|
||||
@@ -117,8 +117,8 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
||||
\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 *session,
|
||||
switch_file_handle *fh,
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session_t *session,
|
||||
switch_file_handle_t *fh,
|
||||
char *file,
|
||||
switch_dtmf_callback_function dtmf_callback,
|
||||
void *buf,
|
||||
@@ -138,7 +138,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_record_file(switch_core_session *sessio
|
||||
\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 *session,
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session_t *session,
|
||||
char *tts_name,
|
||||
char *voice_name,
|
||||
char *timer_name,
|
||||
@@ -158,8 +158,8 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
|
||||
\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 *session,
|
||||
switch_core_session *peer_session,
|
||||
SWITCH_DECLARE(switch_status) 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,
|
||||
void *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 *session, char *extension, char *dialplan, char *context);
|
||||
SWITCH_DECLARE(switch_status) switch_ivr_session_transfer(switch_core_session_t *session, char *extension, char *dialplan, char *context);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ SWITCH_DECLARE(switch_status) switch_loadable_module_build_dynamic(char *filenam
|
||||
\param name the name of the dialplan
|
||||
\return the desired dialplan interface
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status) switch_loadable_module_load_dynamic(switch_loadable_module *new_module);
|
||||
SWITCH_DECLARE(switch_status) switch_loadable_module_load_dynamic(switch_loadable_module_t *new_module);
|
||||
|
||||
/*!
|
||||
\brief Retrieve the timer interface by it's registered name
|
||||
|
||||
@@ -159,25 +159,25 @@ struct switch_io_event_hooks {
|
||||
/*! \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 *, switch_caller_profile *, switch_core_session **, switch_memory_pool_t *);
|
||||
switch_status (*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 *);
|
||||
switch_status (*answer_channel)(switch_core_session_t *);
|
||||
/*! read a frame from a session */
|
||||
switch_status (*read_frame)(switch_core_session *, switch_frame **, int, switch_io_flag, int);
|
||||
switch_status (*read_frame)(switch_core_session_t *, switch_frame_t **, int, switch_io_flag, int);
|
||||
/*! write a frame to a session */
|
||||
switch_status (*write_frame)(switch_core_session *, switch_frame *, int, switch_io_flag, int);
|
||||
switch_status (*write_frame)(switch_core_session_t *, switch_frame_t *, int, switch_io_flag, int);
|
||||
/*! send a kill signal to the session's channel */
|
||||
switch_status (*kill_channel)(switch_core_session *, int);
|
||||
switch_status (*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 *, int, int);
|
||||
switch_status (*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 *, int, int);
|
||||
switch_status (*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 *, char *);
|
||||
switch_status (*send_dtmf)(switch_core_session_t *, char *);
|
||||
/*! receive a message from another session*/
|
||||
switch_status (*receive_message)(switch_core_session *, switch_core_session_message *);
|
||||
switch_status (*receive_message)(switch_core_session_t *, switch_core_session_message_t *);
|
||||
/*! queue a message for another session*/
|
||||
switch_status (*queue_event)(switch_core_session *, switch_event_t *);
|
||||
switch_status (*queue_event)(switch_core_session_t *, switch_event_t *);
|
||||
};
|
||||
|
||||
/*! \brief Abstraction of an module endpoint interface
|
||||
@@ -194,7 +194,7 @@ struct switch_endpoint_interface {
|
||||
const switch_io_routines *io_routines;
|
||||
|
||||
/*! state machine methods */
|
||||
const switch_state_handler_table *state_handler;
|
||||
const switch_state_handler_table_t *state_handler;
|
||||
|
||||
/*! private information */
|
||||
void *private_info;
|
||||
@@ -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 *);
|
||||
switch_status (*timer_init)(switch_timer_t *);
|
||||
/*! function to wait for one cycle to pass */
|
||||
switch_status (*timer_next)(switch_timer *);
|
||||
switch_status (*timer_next)(switch_timer_t *);
|
||||
/*! function to deallocate the timer */
|
||||
switch_status (*timer_destroy)(switch_timer *);
|
||||
switch_status (*timer_destroy)(switch_timer_t *);
|
||||
const struct switch_timer_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 *, char *file_path);
|
||||
switch_status (*file_open)(switch_file_handle_t *, char *file_path);
|
||||
/*! function to close the file */
|
||||
switch_status (*file_close)(switch_file_handle *);
|
||||
switch_status (*file_close)(switch_file_handle_t *);
|
||||
/*! function to read from the file */
|
||||
switch_status (*file_read)(switch_file_handle *, void *data, switch_size_t *len);
|
||||
switch_status (*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 *, void *data, switch_size_t *len);
|
||||
switch_status (*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 *, unsigned int *cur_pos, int64_t samples, int whence);
|
||||
switch_status (*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;
|
||||
@@ -291,7 +291,7 @@ struct switch_file_handle {
|
||||
/*! private data for the format module to store handle specific info */
|
||||
void *private_info;
|
||||
int64_t pos;
|
||||
switch_buffer *audio_buffer;
|
||||
switch_buffer_t *audio_buffer;
|
||||
};
|
||||
|
||||
|
||||
@@ -412,9 +412,9 @@ struct switch_codec {
|
||||
/*! the codec interface table this handle uses */
|
||||
const struct switch_codec_interface *codec_interface;
|
||||
/*! the specific implementation of the above codec */
|
||||
const struct switch_codec_implementation *implementation;
|
||||
const switch_codec_implementation_t *implementation;
|
||||
/*! codec settings for this handle */
|
||||
struct switch_codec_settings codec_settings;
|
||||
switch_codec_settings_t codec_settings;
|
||||
/*! flags to modify behaviour */
|
||||
uint32_t flags;
|
||||
/*! the handle's memory pool*/
|
||||
@@ -444,10 +444,10 @@ 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 *, switch_codec_flag, const switch_codec_settings *codec_settings);
|
||||
switch_status (*init)(switch_codec_t *, switch_codec_flag, const switch_codec_settings_t *codec_settings);
|
||||
/*! function to encode raw data into encoded data */
|
||||
switch_status (*encode)(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
switch_status (*encode)(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *decoded_data,
|
||||
uint32_t decoded_data_len,
|
||||
uint32_t decoded_rate,
|
||||
@@ -456,8 +456,8 @@ struct switch_codec_implementation {
|
||||
uint32_t *encoded_rate,
|
||||
unsigned int *flag);
|
||||
/*! function to decode encoded data into raw data */
|
||||
switch_status (*decode)(switch_codec *codec,
|
||||
switch_codec *other_codec,
|
||||
switch_status (*decode)(switch_codec_t *codec,
|
||||
switch_codec_t *other_codec,
|
||||
void *encoded_data,
|
||||
uint32_t encoded_data_len,
|
||||
uint32_t encoded_rate,
|
||||
@@ -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 *);
|
||||
switch_status (*destroy)(switch_codec_t *);
|
||||
const struct switch_codec_implementation *next;
|
||||
};
|
||||
|
||||
@@ -481,7 +481,7 @@ struct switch_codec_interface {
|
||||
/*! the IANA code name */
|
||||
char *iananame;
|
||||
/*! a list of codec implementations related to the codec */
|
||||
const switch_codec_implementation *implementations;
|
||||
const switch_codec_implementation_t *implementations;
|
||||
const struct switch_codec_interface *next;
|
||||
};
|
||||
|
||||
|
||||
@@ -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 *frame);
|
||||
SWITCH_DECLARE(switch_status) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp_session, switch_frame_t *frame);
|
||||
|
||||
/*!
|
||||
\brief Write data to a given RTP session
|
||||
@@ -266,7 +266,7 @@ 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 *session, switch_codec *codec, switch_vad_flag_t flags);
|
||||
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);
|
||||
|
||||
/*!
|
||||
\brief Disable VAD on an RTP Session
|
||||
@@ -282,7 +282,7 @@ SWITCH_DECLARE(switch_status) switch_rtp_disable_vad(switch_rtp_t *rtp_session);
|
||||
\param ts then number of bytes to increment the timestamp by
|
||||
\return the number of bytes written
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_frame *frame, uint32_t ts);
|
||||
SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_frame_t *frame, uint32_t ts);
|
||||
|
||||
/*!
|
||||
\brief Write data with a specified payload and sequence number to a given RTP session
|
||||
|
||||
+48
-45
@@ -164,7 +164,7 @@ typedef enum {
|
||||
} switch_ivr_option_t;
|
||||
|
||||
/*!
|
||||
\enum switch_core_session_message_t
|
||||
\enum switch_core_session_message_types_t
|
||||
\brief Possible types of messages for inter-session communication
|
||||
<pre>
|
||||
SWITCH_MESSAGE_REDIRECT_AUDIO - Indication to redirect audio to another location if possible
|
||||
@@ -180,7 +180,7 @@ typedef enum {
|
||||
SWITCH_MESSAGE_INDICATE_PROGRESS,
|
||||
SWITCH_MESSAGE_INDICATE_BRIDGE,
|
||||
SWITCH_MESSAGE_INDICATE_UNBRIDGE
|
||||
} switch_core_session_message_t;
|
||||
} switch_core_session_message_types_t;
|
||||
|
||||
|
||||
/*!
|
||||
@@ -595,33 +595,28 @@ typedef enum {
|
||||
|
||||
typedef uint8_t switch_payload_t;
|
||||
typedef struct switch_rtp switch_rtp_t;
|
||||
typedef struct switch_core_session_message switch_core_session_message;
|
||||
typedef struct switch_core_session_message switch_core_session_message_t;
|
||||
typedef struct switch_event_header switch_event_header_t;
|
||||
typedef struct switch_event switch_event_t;
|
||||
typedef struct switch_event_subclass switch_event_subclass;
|
||||
typedef struct switch_event_node switch_event_node;
|
||||
typedef struct switch_loadable_module switch_loadable_module;
|
||||
typedef struct switch_frame switch_frame;
|
||||
typedef struct switch_channel switch_channel;
|
||||
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_file_handle switch_file_handle;
|
||||
typedef struct switch_core_session switch_core_session;
|
||||
typedef struct switch_loadable_module_interface switch_loadable_module_interface;
|
||||
typedef struct switch_caller_profile switch_caller_profile;
|
||||
typedef struct switch_caller_step switch_caller_step;
|
||||
typedef struct switch_caller_extension switch_caller_extension;
|
||||
typedef struct switch_caller_application switch_caller_application;
|
||||
typedef struct switch_state_handler_table switch_state_handler_table;
|
||||
typedef struct switch_timer switch_timer;
|
||||
typedef struct switch_codec switch_codec;
|
||||
typedef struct switch_core_thread_session switch_core_thread_session;
|
||||
typedef struct switch_codec_implementation switch_codec_implementation;
|
||||
typedef struct switch_event_subclass switch_event_subclass_t;
|
||||
typedef struct switch_event_node switch_event_node_t;
|
||||
typedef struct switch_loadable_module switch_loadable_module_t;
|
||||
typedef struct switch_frame switch_frame_t;
|
||||
typedef struct switch_channel switch_channel_t;
|
||||
typedef struct switch_file_handle switch_file_handle_t;
|
||||
typedef struct switch_core_session switch_core_session_t;
|
||||
typedef struct switch_caller_profile switch_caller_profile_t;
|
||||
typedef struct switch_caller_extension switch_caller_extension_t;
|
||||
typedef struct switch_caller_application switch_caller_application_t;
|
||||
typedef struct switch_state_handler_table switch_state_handler_table_t;
|
||||
typedef struct switch_timer switch_timer_t;
|
||||
typedef struct switch_codec switch_codec_t;
|
||||
typedef struct switch_core_thread_session switch_core_thread_session_t;
|
||||
typedef struct switch_codec_implementation switch_codec_implementation_t;
|
||||
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;
|
||||
@@ -634,29 +629,37 @@ typedef struct switch_io_event_hook_waitfor_write switch_io_event_hook_waitfor_w
|
||||
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_buffer switch_buffer;
|
||||
typedef struct switch_codec_settings switch_codec_settings;
|
||||
typedef struct switch_config switch_config;
|
||||
|
||||
typedef struct switch_speech_handle switch_speech_handle;
|
||||
typedef struct switch_speech_interface switch_speech_interface;
|
||||
typedef struct switch_directory_handle switch_directory_handle;
|
||||
|
||||
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 void (*switch_application_function)(switch_core_session *, char *);
|
||||
|
||||
typedef void (*switch_application_function)(switch_core_session_t *, char *);
|
||||
typedef void (*switch_event_callback_t)(switch_event_t *);
|
||||
typedef switch_caller_extension *(*switch_dialplan_hunt_function)(switch_core_session *);
|
||||
typedef switch_status (*switch_state_handler)(switch_core_session *);
|
||||
typedef switch_status (*switch_outgoing_channel_hook)(switch_core_session *, switch_caller_profile *, switch_core_session *);
|
||||
typedef switch_status (*switch_answer_channel_hook)(switch_core_session *);
|
||||
typedef switch_status (*switch_receive_message_hook)(switch_core_session *, switch_core_session_message *);
|
||||
typedef switch_status (*switch_queue_event_hook)(switch_core_session *, switch_event_t *);
|
||||
typedef switch_status (*switch_read_frame_hook)(switch_core_session *, switch_frame **, int, switch_io_flag, int);
|
||||
typedef switch_status (*switch_write_frame_hook)(switch_core_session *, switch_frame *, int, switch_io_flag, int);
|
||||
typedef switch_status (*switch_kill_channel_hook)(switch_core_session *, int);
|
||||
typedef switch_status (*switch_waitfor_read_hook)(switch_core_session *, int, int);
|
||||
typedef switch_status (*switch_waitfor_write_hook)(switch_core_session *, int, int);
|
||||
typedef switch_status (*switch_send_dtmf_hook)(switch_core_session *, char *);
|
||||
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 *session, char *dtmf, void *buf, unsigned int buflen);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user