tweak ping behaviour

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8881 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-07-02 17:18:34 +00:00
parent 43b712b7b1
commit eec83be1c9
5 changed files with 46 additions and 10 deletions
+34
View File
@@ -37,6 +37,40 @@
#pragma warning(disable:4127 4003)
#endif
static void event_handler(switch_event_t *event)
{
}
SWITCH_DECLARE_CONSTRUCTOR EventConsumer::EventConsumer(switch_event_types_t event_id, const char *subclass_name, const char *callback)
{
e_event_id = event_id;
if (!switch_strlen_zero(subclass_name)) {
e_subclass_name = strdup(subclass_name);
} else {
e_subclass_name = "";
}
if (switch_strlen_zero(callback)) {
callback = "event_consumer";
}
e_callback = strdup(callback);
switch_event_bind_removable(__FILE__, e_event_id, subclass_name, event_handler, this, &node);
}
SWITCH_DECLARE_CONSTRUCTOR EventConsumer::~EventConsumer()
{
switch_safe_free(e_subclass_name);
switch_safe_free(e_callback);
if (node) {
switch_event_unbind(&node);
}
}
SWITCH_DECLARE_CONSTRUCTOR IVRMenu::IVRMenu(IVRMenu *main,
const char *name,