FreeSWITCH API Documentation
1.7.0
|
Typedefs | |
typedef struct apr_queue_t | switch_queue_t |
Functions | |
switch_status_t | switch_queue_create (switch_queue_t **queue, unsigned int queue_capacity, switch_memory_pool_t *pool) |
switch_status_t | switch_queue_pop (switch_queue_t *queue, void **data) |
switch_status_t | switch_queue_pop_timeout (switch_queue_t *queue, void **data, switch_interval_time_t timeout) |
switch_status_t | switch_queue_push (switch_queue_t *queue, void *data) |
unsigned int | switch_queue_size (switch_queue_t *queue) |
switch_status_t | switch_queue_trypop (switch_queue_t *queue, void **data) |
switch_status_t | switch_queue_interrupt_all (switch_queue_t *queue) |
switch_status_t | switch_queue_term (switch_queue_t *queue) |
switch_status_t | switch_queue_trypush (switch_queue_t *queue, void *data) |
typedef struct apr_queue_t switch_queue_t |
Opaque structure used for queue API
Definition at line 590 of file switch_apr.h.
switch_status_t switch_queue_create | ( | switch_queue_t ** | queue, |
unsigned int | queue_capacity, | ||
switch_memory_pool_t * | pool | ||
) |
create a FIFO queue
queue | The new queue |
queue_capacity | maximum size of the queue |
pool | a pool to allocate queue from |
Definition at line 1109 of file switch_apr.c.
Referenced by chat_thread_start(), check_dispatch(), EventConsumer::EventConsumer(), inband_dtmf_generate_callback(), switch_channel_alloc(), switch_core_media_bug_add(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_init(), switch_core_session_init(), switch_core_session_request_uuid(), switch_event_channel_broadcast(), switch_event_init(), switch_log_init(), switch_rtp_create(), switch_scheduler_task_thread_start(), and switch_sql_queue_manager_init_name().
switch_status_t switch_queue_interrupt_all | ( | switch_queue_t * | queue | ) |
Definition at line 1145 of file switch_apr.c.
Referenced by EventConsumer::cleanup(), switch_event_shutdown(), and switch_sql_queue_manager_stop().
switch_status_t switch_queue_pop | ( | switch_queue_t * | queue, |
void ** | data | ||
) |
pop/get an object from the queue, blocking if the queue is already empty
queue | the queue |
data | the data |
Definition at line 1119 of file switch_apr.c.
Referenced by chat_thread_run(), log_thread(), pool_thread(), EventConsumer::pop(), switch_event_channel_deliver_thread(), switch_event_dispatch_thread(), and video_bug_thread().
switch_status_t switch_queue_pop_timeout | ( | switch_queue_t * | queue, |
void ** | data, | ||
switch_interval_time_t | timeout | ||
) |
pop/get an object from the queue, blocking if the queue is already empty
queue | the queue |
data | the data |
timeout | The amount of time in microseconds to wait. This is a maximum, not a minimum. If the condition is signaled, we will wake up before this time, otherwise the error APR_TIMEUP is returned. |
Definition at line 1124 of file switch_apr.c.
Referenced by EventConsumer::pop(), switch_core_session_thread_pool_worker(), and switch_scheduler_task_thread().
switch_status_t switch_queue_push | ( | switch_queue_t * | queue, |
void * | data | ||
) |
push/add a object to the queue, blocking if the queue is already full
queue | the queue |
data | the data |
Definition at line 1129 of file switch_apr.c.
Referenced by chat_queue_message(), switch_core_media_bug_close(), switch_core_media_bug_push_spy_frame(), switch_core_perform_destroy_memory_pool(), switch_core_session_queue_signal_data(), switch_core_session_read_video_frame(), switch_core_session_thread_pool_launch(), switch_core_session_write_video_frame(), switch_event_queue_dispatch_event(), switch_loadable_module_shutdown(), switch_log_shutdown(), switch_scheduler_add_task(), switch_scheduler_execute(), switch_sql_queue_manager_push_confirm(), switch_sql_queue_manager_stop(), switch_thread_pool_launch_thread(), and task_thread_loop().
unsigned int switch_queue_size | ( | switch_queue_t * | queue | ) |
returns the size of the queue.
queue | the queue |
Definition at line 1114 of file switch_apr.c.
Referenced by do_2833(), pool_thread(), qm_ttl(), rtp_common_read(), switch_channel_has_dtmf(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_reclaim(), switch_core_memory_reclaim_events(), switch_core_memory_reclaim_logger(), switch_core_session_dequeue_private_event(), switch_core_session_event_count(), switch_core_session_messages_waiting(), switch_core_session_private_event_count(), switch_event_queue_dispatch_event(), switch_rtp_has_dtmf(), switch_sql_queue_manager_size(), switch_user_sql_thread(), and video_bug_thread().
switch_status_t switch_queue_term | ( | switch_queue_t * | queue | ) |
Definition at line 1150 of file switch_apr.c.
Referenced by switch_core_session_uninit().
switch_status_t switch_queue_trypop | ( | switch_queue_t * | queue, |
void ** | data | ||
) |
pop/get an object to the queue, returning immediatly if the queue is empty
queue | the queue |
data | the data |
Definition at line 1140 of file switch_apr.c.
Referenced by EventConsumer::cleanup(), do_2833(), do_flush(), do_trans(), inband_dtmf_generate_callback(), new_header(), pool_thread(), EventConsumer::pop(), switch_channel_dequeue_dtmf(), switch_channel_flush_dtmf(), switch_channel_queue_dtmf(), switch_channel_set_timestamps(), switch_channel_uninit(), switch_core_media_bug_close(), switch_core_media_bug_patch_spy_frame(), switch_core_memory_reclaim(), switch_core_memory_reclaim_events(), switch_core_memory_reclaim_logger(), switch_core_memory_stop(), switch_core_perform_new_memory_pool(), switch_core_session_dequeue_event(), switch_core_session_dequeue_message(), switch_core_session_dequeue_private_event(), switch_core_session_dequeue_signal_data(), switch_core_session_flush_message(), switch_core_session_flush_private_events(), switch_event_channel_deliver_thread(), switch_event_create_subclass_detailed(), switch_event_shutdown(), switch_log_node_alloc(), switch_rtp_dequeue_dtmf(), switch_rtp_destroy(), switch_scheduler_task_thread(), and video_bug_thread().
switch_status_t switch_queue_trypush | ( | switch_queue_t * | queue, |
void * | data | ||
) |
push/add a object to the queue, returning immediatly if the queue is full
queue | the queue |
data | the data |
Definition at line 1155 of file switch_apr.c.
Referenced by chat_queue_message(), event_handler(), generate_on_dtmf(), pool_thread(), switch_channel_dequeue_dtmf(), switch_channel_flush_dtmf(), switch_channel_queue_dtmf(), switch_core_session_queue_event(), switch_core_session_queue_message(), switch_core_session_queue_private_event(), switch_event_channel_broadcast(), switch_event_del_header_val(), switch_event_destroy(), switch_event_shutdown(), switch_log_node_free(), switch_log_vprintf(), switch_rtp_queue_rfc2833(), switch_rtp_queue_rfc2833_in(), and switch_sql_queue_manager_push().