RTS API Documentation
1.10.11
|
#include <switch.h>
Go to the source code of this file.
Data Structures | |
struct | msrp_msg_s |
struct | switch_msrp_session_s |
Macros | |
#define | switch_msrp_send(ms, msg) switch_msrp_perform_send(ms, msg, __FILE__, __SWITCH_FUNC__, __LINE__) |
Typedefs | |
typedef struct switch_msrp_session_s | switch_msrp_session_t |
typedef struct msrp_client_socket_s | switch_msrp_client_socket_t |
typedef struct msrp_socket_s | switch_msrp_socket_t |
typedef struct msrp_msg_s | switch_msrp_msg_t |
#define switch_msrp_send | ( | ms, | |
msg | |||
) | switch_msrp_perform_send(ms, msg, __FILE__, __SWITCH_FUNC__, __LINE__) |
Definition at line 141 of file switch_msrp.h.
Referenced by msrp_worker(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
typedef struct msrp_client_socket_s switch_msrp_client_socket_t |
Definition at line 69 of file switch_msrp.h.
typedef struct msrp_msg_s switch_msrp_msg_t |
typedef struct switch_msrp_session_s switch_msrp_session_t |
Definition at line 68 of file switch_msrp.h.
typedef struct msrp_socket_s switch_msrp_socket_t |
Definition at line 70 of file switch_msrp.h.
anonymous enum |
Enumerator | |
---|---|
MSRP_ST_WAIT_HEADER | |
MSRP_ST_PARSE_HEADER | |
MSRP_ST_WAIT_BODY | |
MSRP_ST_DONE | |
MSRP_ST_ERROR | |
MSRP_METHOD_REPLY | |
MSRP_METHOD_SEND | |
MSRP_METHOD_AUTH | |
MSRP_METHOD_REPORT |
Definition at line 37 of file switch_msrp.h.
Definition at line 50 of file switch_msrp.h.
switch_status_t switch_msrp_destroy | ( | void | ) |
Definition at line 349 of file switch_msrp.c.
References close_socket(), globals, msrp_deinit_ssl(), msrp_socket_s::sock, SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, switch_log_printf(), switch_safe_free, SWITCH_STATUS_SUCCESS, and switch_thread_join().
Referenced by switch_core_destroy(), and SWITCH_STANDARD_API().
char* switch_msrp_header_name | ( | switch_msrp_header_type_t | htype | ) |
switch_status_t switch_msrp_init | ( | void | ) |
Definition at line 294 of file switch_msrp.c.
References DEBUG_MSRP, globals, load_config(), memset(), msock_init(), msrp_init_ssl(), msrp_listener(), pool, SWITCH_CHANNEL_LOG, switch_core_new_memory_pool, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_stacksize_set(), and msrp_socket_s::thread.
Referenced by switch_core_init_and_modload(), and SWITCH_STANDARD_API().
const char* switch_msrp_listen_ip | ( | void | ) |
Definition at line 289 of file switch_msrp.c.
References globals.
Referenced by switch_core_media_negotiate_sdp().
void switch_msrp_load_apis_and_applications | ( | switch_loadable_module_interface_t ** | moudle_interface | ) |
Definition at line 1870 of file switch_msrp.c.
References MSRP_SYNTAX, SAF_SUPPORT_NOMEDIA, SAF_SUPPORT_TEXT_ONLY, SWITCH_ADD_API, SWITCH_ADD_APP, and switch_console_set_complete().
switch_status_t switch_msrp_msg_add_header | ( | switch_msrp_msg_t * | msrp_msg, |
switch_msrp_header_type_t | htype, | ||
char * | fmt, | ||
... | |||
) |
Definition at line 651 of file switch_msrp.c.
References msrp_msg_s::code_description, msrp_msg_s::delimiter, msrp_msg_s::headers, MSRP_H_CODE_DESCRIPTION, MSRP_H_DELIMITER, MSRP_H_TRASACTION_ID, switch_event_add_header_string(), switch_msrp_msg_get_header(), switch_msrp_msg_header_name(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_MEMERR, switch_vasprintf(), and msrp_msg_s::transaction_id.
Referenced by msrp_parse_header(), msrp_parse_headers(), msrp_worker(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
switch_msrp_msg_t* switch_msrp_msg_create | ( | void | ) |
Definition at line 1625 of file switch_msrp.c.
References msrp_msg_s::headers, memset(), switch_assert, switch_event_create, and SWITCH_EVENT_GENERAL.
Referenced by msrp_parse_buffer(), msrp_worker(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
void switch_msrp_msg_destroy | ( | switch_msrp_msg_t ** | msg | ) |
Definition at line 1663 of file switch_msrp.c.
References msrp_msg_s::headers, msrp_msg_s::payload, switch_event_destroy(), and switch_safe_free.
Referenced by msrp_worker(), switch_msrp_perform_send(), switch_msrp_session_destroy(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
switch_msrp_msg_t* switch_msrp_msg_dup | ( | switch_msrp_msg_t * | msg | ) |
Definition at line 1637 of file switch_msrp.c.
References msrp_msg_s::code_description, msrp_msg_s::code_number, msrp_msg_s::delimiter, msrp_msg_s::headers, memset(), msrp_msg_s::method, MSRP_H_CODE_DESCRIPTION, MSRP_H_DELIMITER, MSRP_H_TRASACTION_ID, msrp_msg_s::payload, msrp_msg_s::payload_bytes, msrp_msg_s::state, switch_assert, switch_event_dup(), switch_msrp_msg_get_header(), and msrp_msg_s::transaction_id.
Referenced by msrp_worker(), and switch_msrp_perform_send().
const char* switch_msrp_msg_get_header | ( | switch_msrp_msg_t * | msrp_msg, |
switch_msrp_header_type_t | htype | ||
) |
Definition at line 685 of file switch_msrp.c.
References msrp_msg_s::headers, switch_event_get_header, and switch_msrp_msg_header_name().
Referenced by msrp_check_success_report(), msrp_msg_serialize(), msrp_reply(), msrp_report(), msrp_worker(), switch_msrp_do_send(), switch_msrp_msg_add_header(), switch_msrp_msg_dup(), and SWITCH_STANDARD_APP().
void switch_msrp_msg_set_payload | ( | switch_msrp_msg_t * | msrp_msg, |
const char * | buf, | ||
switch_size_t | payload_bytes | ||
) |
Definition at line 82 of file switch_msrp.c.
References msrp_msg_s::payload, msrp_msg_s::payload_bytes, switch_assert, and switch_malloc.
Referenced by msrp_parse_buffer(), msrp_worker(), SWITCH_STANDARD_API(), and SWITCH_STANDARD_APP().
switch_status_t switch_msrp_perform_send | ( | switch_msrp_session_t * | ms, |
switch_msrp_msg_t * | msg, | ||
const char * | file, | ||
const char * | func, | ||
int | line | ||
) |
Definition at line 1583 of file switch_msrp.c.
References switch_msrp_session_s::call_id, globals, msrp_msg_s::payload, msrp_msg_s::payload_bytes, switch_msrp_session_s::pool, switch_msrp_session_s::running, switch_msrp_session_s::send_queue, SWITCH_CHANNEL_ID_LOG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_msrp_do_send(), switch_msrp_msg_destroy(), switch_msrp_msg_dup(), switch_queue_create(), switch_queue_term(), switch_queue_trypop(), switch_queue_trypush(), SWITCH_SIZE_T_FMT, and SWITCH_STATUS_SUCCESS.
switch_status_t switch_msrp_session_destroy | ( | switch_msrp_session_t ** | ms | ) |
Definition at line 392 of file switch_msrp.c.
References close_socket(), SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, SWITCH_LOG_INFO, switch_log_printf(), switch_msrp_msg_destroy(), switch_mutex_destroy(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_trypop(), SWITCH_STATUS_SUCCESS, and switch_yield.
Referenced by switch_media_handle_destroy().
switch_msrp_session_t* switch_msrp_session_new | ( | switch_memory_pool_t * | pool, |
const char * | call_id, | ||
switch_bool_t | secure | ||
) |
Definition at line 378 of file switch_msrp.c.
References switch_msrp_session_s::call_id, globals, switch_msrp_session_s::local_port, switch_msrp_session_s::msrp_msg_buffer_size, switch_msrp_session_s::mutex, pool, switch_msrp_session_s::pool, msrp_socket_s::secure, switch_msrp_session_s::secure, switch_assert, switch_core_alloc, switch_core_strdup, switch_mutex_init(), and SWITCH_MUTEX_NESTED.
Referenced by switch_core_media_gen_local_sdp(), and switch_core_media_negotiate_sdp().
switch_msrp_msg_t* switch_msrp_session_pop_msg | ( | switch_msrp_session_t * | ms | ) |
Definition at line 445 of file switch_msrp.c.
References switch_msrp_session_s::last_msg, switch_msrp_session_s::msrp_msg, switch_msrp_session_s::msrp_msg_count, switch_msrp_session_s::mutex, msrp_msg_s::next, switch_mutex_lock(), switch_mutex_unlock(), and switch_yield.
Referenced by SWITCH_STANDARD_APP().
switch_status_t switch_msrp_start_client | ( | switch_msrp_session_t * | msrp_session | ) |
Definition at line 1488 of file switch_msrp.c.
References switch_msrp_session_s::call_id, msrp_client_socket_s::client_mode, worker_helper::csock, worker_helper::debug, globals, worker_helper::msrp_session, msrp_worker(), worker_helper::pool, switch_msrp_session_s::pool, msrp_client_socket_s::secure, switch_msrp_session_s::secure, msrp_client_socket_s::sock, switch_assert, SWITCH_CHANNEL_LOG, switch_core_alloc, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_STATUS_SUCCESS, switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_detach_set(), switch_threadattr_stacksize_set(), and msrp_socket_s::thread.
Referenced by switch_core_media_negotiate_sdp().