RTS API Documentation
1.10.11
|
#include <switch_cpp.h>
Public Member Functions | |
Event (const char *type, const char *subclass_name=NULL) | |
Event (switch_event_t *wrap_me, int free_me=0) | |
virtual | ~ Event () |
int | chat_execute (const char *app, const char *data=NULL) |
int | chat_send (const char *dest_proto=NULL) |
const char * | serialize (const char *format=NULL) |
bool | setPriority (switch_priority_t priority=SWITCH_PRIORITY_NORMAL) |
const char * | getHeader (const char *header_name) |
char * | getBody (void) |
const char * | getType (void) |
bool | addBody (const char *value) |
bool | addHeader (const char *header_name, const char *value) |
bool | delHeader (const char *header_name) |
bool | fire (void) |
bool | merge (Event *to_merge) |
Data Fields | |
switch_event_t * | event |
char * | serialized_string |
int | mine |
Definition at line 158 of file switch_cpp.h.
Event::Event | ( | const char * | type, |
const char * | subclass_name = NULL |
||
) |
Definition at line 294 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_create_json(), switch_event_create_subclass, SWITCH_EVENT_CUSTOM, SWITCH_EVENT_MESSAGE, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_LOG_WARNING, switch_name_event(), SWITCH_STATUS_SUCCESS, and zstr.
Event::Event | ( | switch_event_t * | wrap_me, |
int | free_me = 0 |
||
) |
Definition at line 325 of file switch_cpp.cpp.
References SWITCH_DECLARE_CONSTRUCTOR, and switch_event_destroy().
|
virtual |
bool Event::addBody | ( | const char * | value | ) |
Definition at line 484 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_add_body(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_SUCCESS, this_check, and true.
bool Event::addHeader | ( | const char * | header_name, |
const char * | value | ||
) |
Definition at line 452 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_add_header_string(), SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, this_check, and true.
int Event::chat_execute | ( | const char * | app, |
const char * | data = NULL |
||
) |
Definition at line 344 of file switch_cpp.cpp.
References switch_core_execute_chat_app().
int Event::chat_send | ( | const char * | dest_proto = NULL | ) |
Definition at line 349 of file switch_cpp.cpp.
References switch_core_chat_send(), switch_event_get_header, and zstr.
bool Event::delHeader | ( | const char * | header_name | ) |
Definition at line 465 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_del_header, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_SUCCESS, this_check, true, and zstr.
bool Event::fire | ( | void | ) |
Definition at line 394 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_destroy(), switch_event_dup(), switch_event_fire, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_SUCCESS, and this_check.
char * Event::getBody | ( | void | ) |
Definition at line 497 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_get_body(), SWITCH_LOG_ERROR, switch_log_printf(), and this_check.
const char * Event::getHeader | ( | const char * | header_name | ) |
Definition at line 435 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_get_header, SWITCH_LOG_ERROR, switch_log_printf(), this_check, and zstr.
const char * Event::getType | ( | void | ) |
Definition at line 511 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_name(), SWITCH_LOG_ERROR, switch_log_printf(), and this_check.
bool Event::merge | ( | Event * | to_merge | ) |
Definition at line 524 of file switch_cpp.cpp.
References event, SWITCH_CHANNEL_LOG, switch_event_merge(), SWITCH_LOG_ERROR, switch_log_printf(), and this_check.
const char * Event::serialize | ( | const char * | format = NULL | ) |
Definition at line 358 of file switch_cpp.cpp.
References switch_event_serialize(), switch_event_serialize_json(), switch_event_xmlize(), SWITCH_FALSE, switch_mprintf(), switch_safe_free, SWITCH_STATUS_SUCCESS, SWITCH_TRUE, SWITCH_VA_NONE, switch_xml_free(), switch_xml_toxml, and this_check.
bool Event::setPriority | ( | switch_priority_t | priority = SWITCH_PRIORITY_NORMAL | ) |
Definition at line 422 of file switch_cpp.cpp.
References SWITCH_CHANNEL_LOG, switch_event_set_priority(), SWITCH_LOG_ERROR, switch_log_printf(), and this_check.
switch_event_t* Event::event |
Definition at line 161 of file switch_cpp.h.
Referenced by merge(), CoreSession::sendEvent(), and CoreSession::setEventData().
int Event::mine |
Definition at line 163 of file switch_cpp.h.
char* Event::serialized_string |
Definition at line 162 of file switch_cpp.h.