FreeSWITCH API Documentation
1.7.0
|
#include <switch_cpp.h>
Public Member Functions | |
EventConsumer (const char *event_name=NULL, const char *subclass_name="", int len=5000) | |
~EventConsumer () | |
int | bind (const char *event_name, const char *subclass_name="") |
Event * | pop (int block=0, int timeout=0) |
void | cleanup () |
EventConsumer (const char *event_name=NULL, const char *subclass_name="", int len=5000) | |
~EventConsumer () | |
int | bind (const char *event_name, const char *subclass_name="") |
Event * | pop (int block=0, int timeout=0) |
void | cleanup () |
Data Fields | |
switch_queue_t * | events |
switch_event_types_t | e_event_id |
char * | e_callback |
char * | e_subclass_name |
char * | e_cb_arg |
switch_event_node_t * | enodes [SWITCH_EVENT_ALL+1] |
uint32_t | node_index |
Protected Attributes | |
switch_memory_pool_t * | pool |
int | ready |
Definition at line 182 of file switch_cpp.h.
EventConsumer::EventConsumer | ( | const char * | event_name = NULL , |
const char * | subclass_name = "" , |
||
int | len = 5000 |
||
) |
Definition at line 54 of file switch_cpp.cpp.
References bind(), events, node_index, pool, ready, switch_core_new_memory_pool, switch_queue_create(), and zstr.
EventConsumer::~EventConsumer | ( | ) |
Definition at line 156 of file switch_cpp.cpp.
References cleanup().
EventConsumer::EventConsumer | ( | const char * | event_name = NULL , |
const char * | subclass_name = "" , |
||
int | len = 5000 |
||
) |
EventConsumer::~EventConsumer | ( | ) |
int EventConsumer::bind | ( | const char * | event_name, |
const char * | subclass_name = "" |
||
) |
Definition at line 67 of file switch_cpp.cpp.
References event_handler(), SWITCH_CHANNEL_LOG, SWITCH_EVENT_ALL, switch_event_bind_removable(), SWITCH_EVENT_CUSTOM, SWITCH_LOG_ERROR, SWITCH_LOG_NOTICE, switch_log_printf(), SWITCH_LOG_WARNING, switch_name_event(), SWITCH_STATUS_SUCCESS, switch_str_nil, and zstr.
Referenced by EventConsumer().
int EventConsumer::bind | ( | const char * | event_name, |
const char * | subclass_name = "" |
||
) |
void EventConsumer::cleanup | ( | ) |
void EventConsumer::cleanup | ( | ) |
Definition at line 123 of file switch_cpp.cpp.
References pool, switch_core_destroy_memory_pool, switch_event_destroy(), switch_event_unbind(), switch_queue_interrupt_all(), switch_queue_trypop(), and SWITCH_STATUS_SUCCESS.
Referenced by ~EventConsumer().
Event * EventConsumer::pop | ( | int | block = 0 , |
int | timeout = 0 |
||
) |
Definition at line 96 of file switch_cpp.cpp.
References switch_queue_pop(), switch_queue_pop_timeout(), and switch_queue_trypop().
Event* EventConsumer::pop | ( | int | block = 0 , |
int | timeout = 0 |
||
) |
char * EventConsumer::e_callback |
Definition at line 189 of file switch_cpp.h.
char * EventConsumer::e_cb_arg |
Definition at line 191 of file switch_cpp.h.
switch_event_types_t EventConsumer::e_event_id |
Definition at line 188 of file switch_cpp.h.
char * EventConsumer::e_subclass_name |
Definition at line 190 of file switch_cpp.h.
switch_event_node_t * EventConsumer::enodes |
Definition at line 192 of file switch_cpp.h.
switch_queue_t * EventConsumer::events |
Definition at line 187 of file switch_cpp.h.
Referenced by event_handler(), and EventConsumer().
uint32_t EventConsumer::node_index |
Definition at line 193 of file switch_cpp.h.
Referenced by EventConsumer().
|
protected |
Definition at line 184 of file switch_cpp.h.
Referenced by EventConsumer().
|
protected |
Definition at line 185 of file switch_cpp.h.
Referenced by EventConsumer().