RTS API Documentation
1.10.11
|
#include "switch_profile.h"
#include <switch_private.h>
#include <unistd.h>
#include <pwd.h>
#include <grp.h>
Go to the source code of this file.
Data Structures | |
struct | switch_core_session |
struct | switch_media_bug |
struct | switch_runtime |
struct | switch_session_manager |
Macros | |
#define | DO_EVENTS |
#define | SWITCH_EVENT_QUEUE_LEN 256 |
#define | SWITCH_MESSAGE_QUEUE_LEN 256 |
#define | SWITCH_BUFFER_BLOCK_FRAMES 25 |
#define | SWITCH_BUFFER_START_FRAMES 50 |
Enumerations | |
enum | switch_session_flag_t { SSF_NONE = 0, SSF_DESTROYED = (1 << 0), SSF_WARN_TRANSCODE = (1 << 1), SSF_HANGUP = (1 << 2), SSF_THREAD_STARTED = (1 << 3), SSF_THREAD_RUNNING = (1 << 4), SSF_READ_TRANSCODE = (1 << 5), SSF_WRITE_TRANSCODE = (1 << 6), SSF_READ_CODEC_RESET = (1 << 7), SSF_WRITE_CODEC_RESET = (1 << 8), SSF_DESTROYABLE = (1 << 9), SSF_MEDIA_BUG_TAP_ONLY = (1 << 10) } |
enum | switch_dbtype_t { DBTYPE_DEFAULT = 0, DBTYPE_MSSQL = 1 } |
Functions | |
switch_status_t | switch_core_sqldb_init (const char **err) |
void | switch_core_sqldb_destroy (void) |
switch_status_t | switch_core_sqldb_start (switch_memory_pool_t *pool, switch_bool_t manage) |
void | switch_core_sqldb_stop (void) |
void | switch_core_session_init (switch_memory_pool_t *pool) |
void | switch_core_session_uninit (void) |
void | switch_core_state_machine_init (switch_memory_pool_t *pool) |
switch_memory_pool_t * | switch_core_memory_init (void) |
void | switch_core_memory_stop (void) |
Variables | |
struct switch_runtime | runtime |
struct switch_session_manager | session_manager |
#define DO_EVENTS |
Definition at line 63 of file switch_core_pvt.h.
#define SWITCH_BUFFER_BLOCK_FRAMES 25 |
Definition at line 68 of file switch_core_pvt.h.
Referenced by switch_core_media_bug_add(), switch_core_session_read_frame(), and switch_core_session_write_frame().
#define SWITCH_BUFFER_START_FRAMES 50 |
Definition at line 69 of file switch_core_pvt.h.
Referenced by switch_core_media_bug_add(), switch_core_session_read_frame(), and switch_core_session_write_frame().
#define SWITCH_EVENT_QUEUE_LEN 256 |
Definition at line 65 of file switch_core_pvt.h.
Referenced by switch_core_session_request_uuid().
#define SWITCH_MESSAGE_QUEUE_LEN 256 |
Definition at line 66 of file switch_core_pvt.h.
Referenced by switch_core_session_request_uuid().
enum switch_dbtype_t |
Enumerator | |
---|---|
DBTYPE_DEFAULT | |
DBTYPE_MSSQL |
Definition at line 219 of file switch_core_pvt.h.
Definition at line 71 of file switch_core_pvt.h.
switch_memory_pool_t* switch_core_memory_init | ( | void | ) |
Definition at line 689 of file switch_core_memory.c.
References memory_manager, memset(), pool_thread(), switch_assert, switch_cond_next(), switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_queue_create(), switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), and switch_threadattr_stacksize_set().
Referenced by switch_core_init().
void switch_core_memory_stop | ( | void | ) |
Definition at line 671 of file switch_core_memory.c.
References memory_manager, SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, switch_log_printf(), switch_queue_trypop(), SWITCH_STATUS_SUCCESS, and switch_thread_join().
Referenced by switch_core_destroy().
void switch_core_session_init | ( | switch_memory_pool_t * | pool | ) |
Definition at line 2625 of file switch_core_session.c.
References switch_session_manager::cond, switch_session_manager::memory_pool, memset(), switch_session_manager::mutex, pool, switch_session_manager::session_id, switch_session_manager::session_limit, session_manager, switch_session_manager::session_table, switch_core_hash_init, SWITCH_MUTEX_DEFAULT, switch_mutex_init(), switch_queue_create(), switch_thread_cond_create(), and switch_session_manager::thread_queue.
Referenced by switch_core_init().
void switch_core_session_uninit | ( | void | ) |
Definition at line 2637 of file switch_core_session.c.
References switch_session_manager::cond, switch_session_manager::mutex, switch_session_manager::running, session_manager, switch_session_manager::session_table, switch_core_hash_destroy(), switch_mutex_lock(), switch_mutex_unlock(), switch_queue_term(), switch_thread_cond_timedwait(), and switch_session_manager::thread_queue.
Referenced by switch_core_destroy().
void switch_core_sqldb_destroy | ( | void | ) |
Definition at line 3013 of file switch_core.c.
References SCF_USE_SQL, switch_core_sqldb_stop(), and switch_test_flag.
Referenced by switch_loadable_module_shutdown().
switch_status_t switch_core_sqldb_init | ( | const char ** | err | ) |
Definition at line 2428 of file switch_core.c.
References switch_runtime::memory_pool, SCF_USE_SQL, switch_core_check_core_db_dsn(), switch_core_sqldb_start(), SWITCH_FALSE, SWITCH_STATUS_GENERR, SWITCH_STATUS_SUCCESS, switch_test_flag, and SWITCH_TRUE.
Referenced by switch_loadable_module_init().
switch_status_t switch_core_sqldb_start | ( | switch_memory_pool_t * | pool, |
switch_bool_t | manage | ||
) |
Definition at line 3565 of file switch_core_sqldb.c.
References basic_calls_sql, CDF_NONEXPIRING, switch_database_interface::commit, core_event_handler(), create_alias_sql, create_calls_sql, create_channels_sql, create_complete_sql, create_interfaces_sql, create_nat_sql, create_registrations_sql, create_row_size_limited_channels_sql, create_tasks_sql, DBTYPE_DEFAULT, detailed_calls_sql, manage, switch_runtime::odbc_dbtype, switch_cache_db_handle::pool, recovery_sql, runtime, SCDB_TYPE_CORE_DB, SCDB_TYPE_DATABASE_INTERFACE, SCDB_TYPE_ODBC, SCF_CLEAR_SQL, SCF_CORE_NON_SQLITE_DB_REQ, SCF_USE_SQL, db_job::sql, sql_manager, switch_database_interface::sql_set_auto_commit_attr, switch_cache_db_create_schema(), switch_cache_db_execute_sql(), switch_cache_db_execute_sql_real(), switch_cache_db_release_db_handle(), switch_cache_db_test_reactive(), switch_cache_db_test_reactive_ex(), SWITCH_CHANNEL_LOG, switch_clear_flag, switch_core_db_handle, switch_core_get_hostname(), switch_core_get_switchname(), switch_core_sql_db_thread(), switch_core_sqldb_start_thread(), SWITCH_EVENT_ADD_SCHEDULE, SWITCH_EVENT_ALL, switch_event_bind(), SWITCH_EVENT_CALL_SECURE, SWITCH_EVENT_CALL_UPDATE, SWITCH_EVENT_CHANNEL_ANSWER, SWITCH_EVENT_CHANNEL_BRIDGE, SWITCH_EVENT_CHANNEL_CALLSTATE, SWITCH_EVENT_CHANNEL_CREATE, SWITCH_EVENT_CHANNEL_DESTROY, SWITCH_EVENT_CHANNEL_EXECUTE, SWITCH_EVENT_CHANNEL_HOLD, SWITCH_EVENT_CHANNEL_ORIGINATE, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA, SWITCH_EVENT_CHANNEL_STATE, SWITCH_EVENT_CHANNEL_UNBRIDGE, SWITCH_EVENT_CHANNEL_UNHOLD, SWITCH_EVENT_CHANNEL_UUID, SWITCH_EVENT_CODEC, SWITCH_EVENT_DEL_SCHEDULE, SWITCH_EVENT_EXE_SCHEDULE, SWITCH_EVENT_LOG, SWITCH_EVENT_MODULE_LOAD, SWITCH_EVENT_MODULE_UNLOAD, SWITCH_EVENT_NAT, SWITCH_EVENT_RE_SCHEDULE, SWITCH_EVENT_SHUTDOWN, SWITCH_EVENT_SUBCLASS_ANY, SWITCH_LOG_CRIT, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), switch_mutex_init(), SWITCH_MUTEX_NESTED, switch_odbc_SQLEndTran(), switch_odbc_SQLSetAutoCommitAttr(), SWITCH_ODBC_SUCCESS, SWITCH_PRI_REALTIME, switch_safe_free, switch_set_flag, switch_snprintfv(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, switch_string_replace(), switch_stristr(), switch_test_flag, switch_thread_create(), SWITCH_THREAD_STACKSIZE, switch_threadattr_create(), switch_threadattr_priority_set(), switch_threadattr_stacksize_set(), and SWITCH_TRUE.
Referenced by switch_core_sqldb_init().
void switch_core_sqldb_stop | ( | void | ) |
Definition at line 3918 of file switch_core_sqldb.c.
References core_event_handler(), sql_close(), sql_manager, switch_cache_db_flush_handles(), switch_core_sqldb_stop_thread(), switch_event_unbind_callback(), and switch_thread_join().
Referenced by switch_core_sqldb_destroy().
void switch_core_state_machine_init | ( | switch_memory_pool_t * | pool | ) |
Definition at line 420 of file switch_core_state_machine.c.
Referenced by switch_core_init().
struct switch_runtime runtime |
Definition at line 86 of file switch_core.c.
Referenced by _switch_cache_db_get_db_handle(), _switch_core_db_handle(), switch_cache_db_create_schema(), switch_cache_db_test_reactive_ex(), switch_cond_next(), switch_cond_yield(), switch_core_add_registration(), switch_core_check_core_db_dsn(), switch_core_db_test_reactive(), switch_core_del_registration(), switch_core_expire_registration(), switch_core_idle_cpu(), switch_core_min_idle_cpu(), switch_core_pool_stats(), switch_core_port_allocator_new(), switch_core_session_event_send(), switch_core_session_findall(), switch_core_session_findall_matching_var(), switch_core_session_hangup_state(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_id_dec(), switch_core_session_message_send(), switch_core_session_perform_destroy(), switch_core_session_perform_force_locate(), switch_core_session_perform_locate(), switch_core_session_read_frame(), switch_core_session_read_text_frame(), switch_core_session_read_video_frame(), switch_core_session_request_uuid(), switch_core_session_set_external_id(), switch_core_session_set_uuid(), switch_core_session_sync_clock(), switch_core_session_thread_launch(), switch_core_sessions_per_second(), switch_core_sql_db_thread(), switch_core_sql_exec(), switch_core_sqldb_start(), switch_core_sqldb_start_thread(), switch_event_fire_detailed(), switch_event_shutdown(), switch_log_meta_vprintf(), switch_micro_time_now(), SWITCH_MODULE_LOAD_FUNCTION(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_new_profile_timer(), switch_simple_email(), switch_sql_concat(), switch_time_calibrate_clock(), switch_time_sync(), switch_user_sql_thread(), switch_uuid_get(), timer_destroy(), timer_init(), and timer_next().
struct switch_session_manager session_manager |
Definition at line 42 of file switch_core_session.c.
Referenced by check_queue(), switch_core_session_count(), switch_core_session_debug_pool(), switch_core_session_event_send(), switch_core_session_findall(), switch_core_session_findall_matching_var(), switch_core_session_hupall(), switch_core_session_hupall_endpoint(), switch_core_session_hupall_matching_vars_ans(), switch_core_session_id(), switch_core_session_id_dec(), switch_core_session_init(), switch_core_session_limit(), switch_core_session_message_send(), switch_core_session_perform_destroy(), switch_core_session_perform_force_locate(), switch_core_session_perform_locate(), switch_core_session_request_uuid(), switch_core_session_set_external_id(), switch_core_session_set_uuid(), switch_core_session_sync_clock(), switch_core_session_thread_pool_launch(), switch_core_session_thread_pool_worker(), switch_core_session_uninit(), SWITCH_MODULE_RUNTIME_FUNCTION(), switch_thread_pool_launch_thread(), and thread_launch_failure().