Event Class Reference
#include <switch_swigable_cpp.h>
Collaboration diagram for Event:
[legend]
Constructor & Destructor Documentation
| SWITCH_DECLARE_CONSTRUCTOR Event::Event |
( |
const char * |
type, |
|
|
const char * |
subclass_name = NULL |
|
) |
|
|
Here is the call graph for this function:
| SWITCH_DECLARE_CONSTRUCTOR Event::Event |
( |
switch_event_t * |
wrap_me, |
|
|
int |
free_me = 0 |
|
) |
|
|
| SWITCH_DECLARE_CONSTRUCTOR Event::~Event |
( |
|
) |
[virtual] |
|
|
|
00161 {
00162
00163 if (serialized_string) {
00164 free(serialized_string);
00165 }
00166
00167 if (event && mine) {
00168 switch_event_destroy(&event);
00169 }
00170 }
|
Here is the call graph for this function:
| Event::Event |
( |
const char * |
type, |
|
|
const char * |
subclass_name = NULL |
|
) |
|
|
| virtual Event::~Event |
( |
|
) |
[virtual] |
|
Member Function Documentation
| bool Event::addBody |
( |
const char * |
value |
) |
|
|
| bool Event::addBody |
( |
const char * |
value |
) |
|
|
Here is the call graph for this function:
| bool Event::addHeader |
( |
const char * |
header_name, |
|
|
const char * |
value |
|
) |
|
|
| bool Event::addHeader |
( |
const char * |
header_name, |
|
|
const char * |
value |
|
) |
|
|
Here is the call graph for this function:
| bool Event::delHeader |
( |
const char * |
header_name |
) |
|
|
| bool Event::delHeader |
( |
const char * |
header_name |
) |
|
|
Here is the call graph for this function:
| bool Event::fire |
( |
void |
|
) |
|
|
| bool Event::fire |
( |
void |
|
) |
|
|
|
|
00211 {
00212
00213 this_check(false);
00214
00215 if (!mine) {
00216 switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR, "Not My event!\n");
00217 return false;
00218 }
00219
00220 if (event) {
00221 switch_event_t *new_event;
00222 if (switch_event_dup(&new_event, event) == SWITCH_STATUS_SUCCESS) {
00223 switch_event_fire(&new_event);
00224 return true;
00225 }
00226 }
00227 return false;
00228 }
|
Here is the call graph for this function:
| char* Event::getBody |
( |
void |
|
) |
|
|
| char * Event::getBody |
( |
void |
|
) |
|
|
Here is the call graph for this function:
| char* Event::getHeader |
( |
char * |
header_name |
) |
|
|
| const char * Event::getHeader |
( |
char * |
header_name |
) |
|
|
Here is the call graph for this function:
| const char* Event::getType |
( |
void |
|
) |
|
|
| const char * Event::getType |
( |
void |
|
) |
|
|
Here is the call graph for this function:
| const char* Event::serialize |
( |
const char * |
format = NULL |
) |
|
|
| const char * Event::serialize |
( |
const char * |
format = NULL |
) |
|
|
|
|
00174 {
00175 int isxml = 0;
00176
00177 this_check("");
00178
00179 if (serialized_string) {
00180 free(serialized_string);
00181 }
00182
00183 if (!event) {
00184 return "";
00185 }
00186
00187 if (format && !strcasecmp(format, "xml")) {
00188 isxml++;
00189 }
00190
00191 if (isxml) {
00192 switch_xml_t xml;
00193 if ((xml = switch_event_xmlize(event, SWITCH_VA_NONE))) {
00194 serialized_string = switch_xml_toxml(xml, SWITCH_FALSE);
00195 switch_xml_free(xml);
00196 return serialized_string;
00197 } else {
00198 return "";
00199 }
00200 } else {
00201 if (switch_event_serialize(event, &serialized_string, SWITCH_TRUE) == SWITCH_STATUS_SUCCESS) {
00202 return serialized_string;
00203 }
00204 }
00205
00206 return "";
00207
00208 }
|
Here is the call graph for this function:
Here is the call graph for this function:
Field Documentation
The documentation for this class was generated from the following files:
Generated on Mon May 26 22:06:54 2008 for FreeSWITCH by
1.3.9.1