add chat interface EXTRAGUY-00

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11319 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-01-20 20:49:47 +00:00
parent f34830563b
commit ec3f6f4ec6
9 changed files with 56 additions and 51 deletions

View File

@@ -1503,6 +1503,24 @@ SWITCH_DECLARE(switch_status_t) switch_core_destroy(void)
return switch_test_flag((&runtime), SCF_RESTART) ? SWITCH_STATUS_RESTART : SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(switch_status_t) switch_core_chat_send(const char *name, const char *proto, const char *from, const char *to,
const char *subject, const char *body, const char *type, const char *hint)
{
switch_chat_interface_t *ci;
switch_status_t status;
if (!name || !(ci = switch_loadable_module_get_chat_interface(name)) || !ci->chat_send) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Chat Interface [%s]!\n", name);
return SWITCH_STATUS_FALSE;
}
status = ci->chat_send(proto, from, to, subject, body, type, hint);
UNPROTECT_INTERFACE(ci);
return status;
}
SWITCH_DECLARE(switch_status_t) switch_core_management_exec(char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen)
{
const switch_management_interface_t *ptr;
@@ -1594,6 +1612,8 @@ SWITCH_DECLARE(int) switch_system(const char *cmd, switch_bool_t wait)
return ret;
}
/* For Emacs:
* Local Variables:
* mode:c