add bind method to EventConsumer takes same args as constructor to bind more events to an existing consumer

This commit is contained in:
Anthony Minessale 2010-05-10 13:06:22 -05:00
parent cf7af1f99b
commit a7f74af7d0
25 changed files with 13598 additions and 8051 deletions

6
build/strip.pl Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/perl
while(<>) {
s/SWITCH_DECLARE_CONSTRUCTOR//g;
s/SWITCH_DECLARE[^\(]*\((.*?)\)/$1/g;
print;
}

View File

@ -170,12 +170,12 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg);
public:
switch_queue_t *events;
switch_event_types_t e_event_id;
switch_event_node_t *node;
char *e_callback;
char *e_subclass_name;
char *e_cb_arg;
SWITCH_DECLARE_CONSTRUCTOR EventConsumer(const char *event_name, const char *subclass_name = "");
SWITCH_DECLARE_CONSTRUCTOR EventConsumer(const char *event_name = NULL, const char *subclass_name = "");
SWITCH_DECLARE_CONSTRUCTOR ~ EventConsumer();
SWITCH_DECLARE(int) bind(const char *event_name, const char *subclass_name = "");
SWITCH_DECLARE(Event *) pop(int block = 0);
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,50 @@
***************
*** 3410,3420 ****
}
if (test_eflag(member->conference, EFLAG_VOLUME_IN_MEMBER) &&
data && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-in-member");
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%u", member->volume_in_level);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}
--- 3410,3420 ----
}
if (test_eflag(member->conference, EFLAG_VOLUME_IN_MEMBER) &&
data && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-in-member");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%d", member->volume_in_level);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}
***************
*** 3437,3447 ****
}
if (test_eflag(member->conference, EFLAG_VOLUME_OUT_MEMBER) && data &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-out-member");
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%u", member->volume_out_level);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}
--- 3437,3447 ----
}
if (test_eflag(member->conference, EFLAG_VOLUME_OUT_MEMBER) && data &&
switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
conference_add_event_member_data(member, event);
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Action", "volume-out-member");
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Volume-Level", "%d", member->volume_out_level);
switch_event_fire(&event);
}
return SWITCH_STATUS_SUCCESS;
}

View File

@ -0,0 +1,462 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2010, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is
* Anthony Minessale II <anthm@freeswitch.org>
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Anthony Minessale II <anthm@freeswitch.org>
*
*
* mod_sndfile.c -- Framework Demo Module
*
*/
#include <switch.h>
#include <sndfile.h>
SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load);
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown);
SWITCH_MODULE_DEFINITION(mod_sndfile, mod_sndfile_load, mod_sndfile_shutdown, NULL);
static switch_memory_pool_t *module_pool = NULL;
static struct {
switch_hash_t *format_hash;
} globals;
struct format_map {
char *ext;
char *uext;
uint32_t format;
};
struct sndfile_context {
SF_INFO sfinfo;
SNDFILE *handle;
};
typedef struct sndfile_context sndfile_context;
static switch_status_t sndfile_file_open(switch_file_handle_t *handle, const char *path)
{
sndfile_context *context;
int mode = 0;
char *ext;
struct format_map *map = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *alt_path = NULL, *last, *ldup = NULL;
size_t alt_len = 0;
int rates[4] = { 8000, 16000, 32000, 48000 };
int i;
#ifdef WIN32
char ps = '\\';
#else
char ps = '/';
#endif
if ((ext = strrchr(path, '.')) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Format\n");
return SWITCH_STATUS_GENERR;
}
ext++;
if (switch_test_flag(handle, SWITCH_FILE_FLAG_READ)) {
mode += SFM_READ;
}
if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
if (switch_test_flag(handle, SWITCH_FILE_WRITE_APPEND)) {
mode += SFM_RDWR;
} else {
mode += SFM_WRITE;
}
}
if (!mode) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Mode!\n");
return SWITCH_STATUS_GENERR;
}
if ((context = switch_core_alloc(handle->memory_pool, sizeof(*context))) == 0) {
return SWITCH_STATUS_MEMERR;
}
map = switch_core_hash_find(globals.format_hash, ext);
if (mode & SFM_WRITE) {
context->sfinfo.channels = handle->channels;
context->sfinfo.samplerate = handle->samplerate;
if (handle->samplerate == 8000 || handle->samplerate == 16000 ||
handle->samplerate == 24000 || handle->samplerate == 32000 || handle->samplerate == 48000 ||
handle->samplerate == 11025 || handle->samplerate == 22050 || handle->samplerate == 44100) {
context->sfinfo.format |= SF_FORMAT_PCM_16;
}
}
if (map) {
context->sfinfo.format |= map->format;
}
if (!strcmp(ext, "r8") || !strcmp(ext, "raw")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "r16")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 16000;
} else if (!strcmp(ext, "r24")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_24;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 24000;
} else if (!strcmp(ext, "r32")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_32;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 32000;
} else if (!strcmp(ext, "gsm")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_GSM610;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "ul")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_ULAW;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "al")) {
context->sfinfo.format = SF_FORMAT_RAW | SF_FORMAT_ALAW;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
} else if (!strcmp(ext, "adpcm")) {
context->sfinfo.format = SF_FORMAT_WAV | SF_FORMAT_IMA_ADPCM;
context->sfinfo.channels = 1;
context->sfinfo.samplerate = 8000;
}
if ((mode & SFM_WRITE) && sf_format_check(&context->sfinfo) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error : file format is invalid (0x%08X).\n", context->sfinfo.format);
return SWITCH_STATUS_GENERR;
}
alt_len = strlen(path) + 10;
switch_zmalloc(alt_path, alt_len);
switch_copy_string(alt_path, path, alt_len);
/* This block attempts to add the sample rate to the path
if the sample rate is already present in the path it does nothing
and reverts to the original file name.
*/
if ((last = strrchr(alt_path, ps))) {
last++;
#ifdef WIN32
if (strrchr(last, '/')) {
last = strrchr(alt_path, '/'); /* do not swallow a forward slash if they are intermixed under windows */
last++;
}
#endif
ldup = strdup(last);
switch_assert(ldup);
switch_snprintf(last, alt_len - (last - alt_path), "%d%s%s", handle->samplerate, SWITCH_PATH_SEPARATOR, ldup);
if ((context->handle = sf_open(alt_path, mode, &context->sfinfo))) {
path = alt_path;
} else {
/* Try to find the file at the highest rate possible if we can't find one that matches the exact rate.
If we don't find any, we will default back to the original file name.
*/
for (i = 3; i >= 0; i--) {
switch_snprintf(last, alt_len - (last - alt_path), "%d%s%s", rates[i], SWITCH_PATH_SEPARATOR, ldup);
if ((context->handle = sf_open(alt_path, mode, &context->sfinfo))) {
path = alt_path;
break;
}
}
}
}
if (!context->handle) {
if ((context->handle = sf_open(path, mode, &context->sfinfo)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening File [%s] [%s]\n", path, sf_strerror(context->handle));
status = SWITCH_STATUS_GENERR;
goto end;
}
}
//switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Opening File [%s] rate %dhz\n", path, context->sfinfo.samplerate);
handle->samples = (unsigned int) context->sfinfo.frames;
handle->samplerate = context->sfinfo.samplerate;
handle->channels = (uint8_t) context->sfinfo.channels;
handle->format = context->sfinfo.format;
handle->sections = context->sfinfo.sections;
handle->seekable = context->sfinfo.seekable;
handle->speed = 0;
handle->private_info = context;
if (switch_test_flag(handle, SWITCH_FILE_WRITE_APPEND)) {
handle->pos = sf_seek(context->handle, 0, SEEK_END);
} else {
sf_count_t frames = 0;
sf_command(context->handle, SFC_FILE_TRUNCATE, &frames, sizeof(frames));
}
end:
switch_safe_free(alt_path);
switch_safe_free(ldup);
return status;
}
static switch_status_t sndfile_file_truncate(switch_file_handle_t *handle, int64_t offset)
{
sndfile_context *context = handle->private_info;
sf_command(context->handle, SFC_FILE_TRUNCATE, &offset, sizeof(offset));
handle->pos = 0;
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t sndfile_file_close(switch_file_handle_t *handle)
{
sndfile_context *context = handle->private_info;
sf_close(context->handle);
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t sndfile_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
{
sndfile_context *context = handle->private_info;
if (!handle->seekable) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "File is not seekable\n");
return SWITCH_STATUS_NOTIMPL;
}
*cur_sample = (unsigned int) sf_seek(context->handle, samples, whence);
handle->pos = *cur_sample;
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t sndfile_file_read(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
*len = (size_t) sf_read_raw(context->handle, data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) {
*len = (size_t) sf_readf_int(context->handle, (int *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) {
*len = (size_t) sf_readf_short(context->handle, (short *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) {
*len = (size_t) sf_readf_float(context->handle, (float *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) {
*len = (size_t) sf_readf_double(context->handle, (double *) data, inlen);
} else {
*len = (size_t) sf_readf_int(context->handle, (int *) data, inlen);
}
handle->pos += *len;
handle->sample_count += *len;
return *len ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
}
static switch_status_t sndfile_file_write(switch_file_handle_t *handle, void *data, size_t *len)
{
size_t inlen = *len;
sndfile_context *context = handle->private_info;
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
*len = (size_t) sf_write_raw(context->handle, data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) {
*len = (size_t) sf_writef_int(context->handle, (int *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) {
*len = (size_t) sf_writef_short(context->handle, (short *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) {
*len = (size_t) sf_writef_float(context->handle, (float *) data, inlen);
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) {
*len = (size_t) sf_writef_double(context->handle, (double *) data, inlen);
} else {
*len = (size_t) sf_writef_int(context->handle, (int *) data, inlen);
}
handle->sample_count += *len;
return SWITCH_STATUS_SUCCESS;
}
static switch_status_t sndfile_file_set_string(switch_file_handle_t *handle, switch_audio_col_t col, const char *string)
{
sndfile_context *context = handle->private_info;
return sf_set_string(context->handle, (int) col, string) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
}
static switch_status_t sndfile_file_get_string(switch_file_handle_t *handle, switch_audio_col_t col, const char **string)
{
sndfile_context *context = handle->private_info;
const char *s;
if ((s = sf_get_string(context->handle, (int) col))) {
*string = s;
return SWITCH_STATUS_SUCCESS;
}
return SWITCH_STATUS_FALSE;
}
/* Registration */
static char **supported_formats;
static switch_status_t setup_formats(void)
{
SF_FORMAT_INFO info;
SF_INFO sfinfo;
char buffer[128];
int format, major_count, subtype_count, m, s;
int len, x, skip;
char *extras[] = { "r8", "r16", "r24", "r32", "gsm", "ul", "al", "adpcm", NULL };
int exlen = (sizeof(extras) / sizeof(extras[0]));
buffer[0] = 0;
sf_command(NULL, SFC_GET_LIB_VERSION, buffer, sizeof(buffer));
if (strlen(buffer) < 1) {
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR, "Line %d: could not retrieve lib version.\n", __LINE__);
return SWITCH_STATUS_FALSE;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "\nLibSndFile Version : %s Supported Formats\n", buffer);
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "================================================================================\n");
sf_command(NULL, SFC_GET_FORMAT_MAJOR_COUNT, &major_count, sizeof(int));
sf_command(NULL, SFC_GET_FORMAT_SUBTYPE_COUNT, &subtype_count, sizeof(int));
sfinfo.channels = 1;
len = ((major_count + (exlen + 2)) * sizeof(char *));
supported_formats = switch_core_permanent_alloc(len);
len = 0;
for (m = 0; m < major_count; m++) {
skip = 0;
info.format = m;
sf_command(NULL, SFC_GET_FORMAT_MAJOR, &info, sizeof(info));
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "%s (extension \"%s\")\n", info.name, info.extension);
for (x = 0; x < len; x++) {
if (supported_formats[x] == info.extension) {
skip++;
break;
}
}
if (!skip) {
char *p;
struct format_map *map = switch_core_permanent_alloc(sizeof(*map));
switch_assert(map);
map->ext = switch_core_permanent_strdup(info.extension);
map->uext = switch_core_permanent_strdup(info.extension);
map->format = info.format;
if (map->ext) {
for (p = map->ext; *p; p++) {
*p = (char) switch_tolower(*p);
}
switch_core_hash_insert(globals.format_hash, map->ext, map);
}
if (map->uext) {
for (p = map->uext; *p; p++) {
*p = (char) switch_toupper(*p);
}
switch_core_hash_insert(globals.format_hash, map->uext, map);
}
supported_formats[len++] = (char *) info.extension;
}
format = info.format;
for (s = 0; s < subtype_count; s++) {
info.format = s;
sf_command(NULL, SFC_GET_FORMAT_SUBTYPE, &info, sizeof(info));
format = (format & SF_FORMAT_TYPEMASK) | info.format;
sfinfo.format = format;
/*
if (sf_format_check(&sfinfo)) {
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, " %s\n", info.name);
}
*/
}
}
for (m = 0; m < exlen; m++) {
supported_formats[len++] = extras[m];
}
switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_NOTICE, "================================================================================\n");
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MODULE_LOAD_FUNCTION(mod_sndfile_load)
{
switch_file_interface_t *file_interface;
if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
return SWITCH_STATUS_TERM;
}
switch_core_hash_init(&globals.format_hash, module_pool);
if (setup_formats() != SWITCH_STATUS_SUCCESS) {
return SWITCH_STATUS_FALSE;
}
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
file_interface->interface_name = modname;
file_interface->extens = supported_formats;
file_interface->file_open = sndfile_file_open;
file_interface->file_close = sndfile_file_close;
file_interface->file_truncate = sndfile_file_truncate;
file_interface->file_read = sndfile_file_read;
file_interface->file_write = sndfile_file_write;
file_interface->file_seek = sndfile_file_seek;
file_interface->file_set_string = sndfile_file_set_string;
file_interface->file_get_string = sndfile_file_get_string;
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sndfile_shutdown)
{
switch_core_hash_destroy(&globals.format_hash);
return SWITCH_STATUS_SUCCESS;
}
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4:
*/

View File

@ -38,11 +38,7 @@ public class API {
}
public String execute(String command, String data) {
return freeswitchJNI.API_execute__SWIG_0(swigCPtr, this, command, data);
}
public String execute(String command) {
return freeswitchJNI.API_execute__SWIG_1(swigCPtr, this, command);
return freeswitchJNI.API_execute(swigCPtr, this, command, data);
}
public String executeString(String command) {

View File

@ -125,11 +125,7 @@ public class CoreSession {
}
public void hangup(String cause) {
freeswitchJNI.CoreSession_hangup__SWIG_0(swigCPtr, this, cause);
}
public void hangup() {
freeswitchJNI.CoreSession_hangup__SWIG_1(swigCPtr, this);
freeswitchJNI.CoreSession_hangup(swigCPtr, this, cause);
}
public void hangupState() {
@ -158,23 +154,11 @@ public class CoreSession {
}
public void say(String tosay, String module_name, String say_type, String say_method, String say_gender) {
freeswitchJNI.CoreSession_say__SWIG_0(swigCPtr, this, tosay, module_name, say_type, say_method, say_gender);
}
public void say(String tosay, String module_name, String say_type, String say_method) {
freeswitchJNI.CoreSession_say__SWIG_1(swigCPtr, this, tosay, module_name, say_type, say_method);
freeswitchJNI.CoreSession_say(swigCPtr, this, tosay, module_name, say_type, say_method, say_gender);
}
public void sayPhrase(String phrase_name, String phrase_data, String phrase_lang) {
freeswitchJNI.CoreSession_sayPhrase__SWIG_0(swigCPtr, this, phrase_name, phrase_data, phrase_lang);
}
public void sayPhrase(String phrase_name, String phrase_data) {
freeswitchJNI.CoreSession_sayPhrase__SWIG_1(swigCPtr, this, phrase_name, phrase_data);
}
public void sayPhrase(String phrase_name) {
freeswitchJNI.CoreSession_sayPhrase__SWIG_2(swigCPtr, this, phrase_name);
freeswitchJNI.CoreSession_sayPhrase(swigCPtr, this, phrase_name, phrase_data, phrase_lang);
}
public String hangupCause() {
@ -186,31 +170,11 @@ public class CoreSession {
}
public int recordFile(String file_name, int time_limit, int silence_threshold, int silence_hits) {
return freeswitchJNI.CoreSession_recordFile__SWIG_0(swigCPtr, this, file_name, time_limit, silence_threshold, silence_hits);
}
public int recordFile(String file_name, int time_limit, int silence_threshold) {
return freeswitchJNI.CoreSession_recordFile__SWIG_1(swigCPtr, this, file_name, time_limit, silence_threshold);
}
public int recordFile(String file_name, int time_limit) {
return freeswitchJNI.CoreSession_recordFile__SWIG_2(swigCPtr, this, file_name, time_limit);
}
public int recordFile(String file_name) {
return freeswitchJNI.CoreSession_recordFile__SWIG_3(swigCPtr, this, file_name);
return freeswitchJNI.CoreSession_recordFile(swigCPtr, this, file_name, time_limit, silence_threshold, silence_hits);
}
public int originate(CoreSession a_leg_session, String dest, int timeout, SWIGTYPE_p_switch_state_handler_table_t handlers) {
return freeswitchJNI.CoreSession_originate__SWIG_0(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout, SWIGTYPE_p_switch_state_handler_table_t.getCPtr(handlers));
}
public int originate(CoreSession a_leg_session, String dest, int timeout) {
return freeswitchJNI.CoreSession_originate__SWIG_1(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout);
}
public int originate(CoreSession a_leg_session, String dest) {
return freeswitchJNI.CoreSession_originate__SWIG_2(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest);
return freeswitchJNI.CoreSession_originate(swigCPtr, this, CoreSession.getCPtr(a_leg_session), a_leg_session, dest, timeout, SWIGTYPE_p_switch_state_handler_table_t.getCPtr(handlers));
}
public void destroy() {
@ -246,15 +210,7 @@ public class CoreSession {
}
public int transfer(String extension, String dialplan, String context) {
return freeswitchJNI.CoreSession_transfer__SWIG_0(swigCPtr, this, extension, dialplan, context);
}
public int transfer(String extension, String dialplan) {
return freeswitchJNI.CoreSession_transfer__SWIG_1(swigCPtr, this, extension, dialplan);
}
public int transfer(String extension) {
return freeswitchJNI.CoreSession_transfer__SWIG_2(swigCPtr, this, extension);
return freeswitchJNI.CoreSession_transfer(swigCPtr, this, extension, dialplan, context);
}
public String read(int min_digits, int max_digits, String prompt_audio_file, int timeout, String valid_terminators) {
@ -262,27 +218,15 @@ public class CoreSession {
}
public String playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, String terminators, String audio_files, String bad_input_audio_files, String digits_regex, String var_name) {
return freeswitchJNI.CoreSession_playAndGetDigits__SWIG_0(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex, var_name);
}
public String playAndGetDigits(int min_digits, int max_digits, int max_tries, int timeout, String terminators, String audio_files, String bad_input_audio_files, String digits_regex) {
return freeswitchJNI.CoreSession_playAndGetDigits__SWIG_1(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex);
return freeswitchJNI.CoreSession_playAndGetDigits(swigCPtr, this, min_digits, max_digits, max_tries, timeout, terminators, audio_files, bad_input_audio_files, digits_regex, var_name);
}
public int streamFile(String file, int starting_sample_count) {
return freeswitchJNI.CoreSession_streamFile__SWIG_0(swigCPtr, this, file, starting_sample_count);
}
public int streamFile(String file) {
return freeswitchJNI.CoreSession_streamFile__SWIG_1(swigCPtr, this, file);
return freeswitchJNI.CoreSession_streamFile(swigCPtr, this, file, starting_sample_count);
}
public int sleep(int ms, int sync) {
return freeswitchJNI.CoreSession_sleep__SWIG_0(swigCPtr, this, ms, sync);
}
public int sleep(int ms) {
return freeswitchJNI.CoreSession_sleep__SWIG_1(swigCPtr, this, ms);
return freeswitchJNI.CoreSession_sleep(swigCPtr, this, ms, sync);
}
public int flushEvents() {
@ -322,11 +266,7 @@ public class CoreSession {
}
public void execute(String app, String data) {
freeswitchJNI.CoreSession_execute__SWIG_0(swigCPtr, this, app, data);
}
public void execute(String app) {
freeswitchJNI.CoreSession_execute__SWIG_1(swigCPtr, this, app);
freeswitchJNI.CoreSession_execute(swigCPtr, this, app, data);
}
public void sendEvent(Event sendME) {

View File

@ -50,11 +50,7 @@ public class DTMF {
}
public DTMF(char idigit, SWIGTYPE_p_uint32_t iduration) {
this(freeswitchJNI.new_DTMF__SWIG_0(idigit, SWIGTYPE_p_uint32_t.getCPtr(iduration)), true);
}
public DTMF(char idigit) {
this(freeswitchJNI.new_DTMF__SWIG_1(idigit), true);
this(freeswitchJNI.new_DTMF(idigit, SWIGTYPE_p_uint32_t.getCPtr(iduration)), true);
}
}

View File

@ -62,32 +62,16 @@ public class Event {
this(freeswitchJNI.new_Event__SWIG_0(type, subclass_name), true);
}
public Event(String type) {
this(freeswitchJNI.new_Event__SWIG_1(type), true);
}
public Event(SWIGTYPE_p_switch_event_t wrap_me, int free_me) {
this(freeswitchJNI.new_Event__SWIG_2(SWIGTYPE_p_switch_event_t.getCPtr(wrap_me), free_me), true);
}
public Event(SWIGTYPE_p_switch_event_t wrap_me) {
this(freeswitchJNI.new_Event__SWIG_3(SWIGTYPE_p_switch_event_t.getCPtr(wrap_me)), true);
this(freeswitchJNI.new_Event__SWIG_1(SWIGTYPE_p_switch_event_t.getCPtr(wrap_me), free_me), true);
}
public String serialize(String format) {
return freeswitchJNI.Event_serialize__SWIG_0(swigCPtr, this, format);
}
public String serialize() {
return freeswitchJNI.Event_serialize__SWIG_1(swigCPtr, this);
return freeswitchJNI.Event_serialize(swigCPtr, this, format);
}
public boolean setPriority(SWIGTYPE_p_switch_priority_t priority) {
return freeswitchJNI.Event_setPriority__SWIG_0(swigCPtr, this, SWIGTYPE_p_switch_priority_t.getCPtr(priority));
}
public boolean setPriority() {
return freeswitchJNI.Event_setPriority__SWIG_1(swigCPtr, this);
return freeswitchJNI.Event_setPriority(swigCPtr, this, SWIGTYPE_p_switch_priority_t.getCPtr(priority));
}
public String getHeader(String header_name) {

View File

@ -50,15 +50,6 @@ public class EventConsumer {
return new SWIGTYPE_p_switch_event_types_t(freeswitchJNI.EventConsumer_e_event_id_get(swigCPtr, this), true);
}
public void setNode(SWIGTYPE_p_switch_event_node_t value) {
freeswitchJNI.EventConsumer_node_set(swigCPtr, this, SWIGTYPE_p_switch_event_node_t.getCPtr(value));
}
public SWIGTYPE_p_switch_event_node_t getNode() {
long cPtr = freeswitchJNI.EventConsumer_node_get(swigCPtr, this);
return (cPtr == 0) ? null : new SWIGTYPE_p_switch_event_node_t(cPtr, false);
}
public void setE_callback(String value) {
freeswitchJNI.EventConsumer_e_callback_set(swigCPtr, this, value);
}
@ -84,20 +75,15 @@ public class EventConsumer {
}
public EventConsumer(String event_name, String subclass_name) {
this(freeswitchJNI.new_EventConsumer__SWIG_0(event_name, subclass_name), true);
this(freeswitchJNI.new_EventConsumer(event_name, subclass_name), true);
}
public EventConsumer(String event_name) {
this(freeswitchJNI.new_EventConsumer__SWIG_1(event_name), true);
public int bind(String event_name, String subclass_name) {
return freeswitchJNI.EventConsumer_bind(swigCPtr, this, event_name, subclass_name);
}
public Event pop(int block) {
long cPtr = freeswitchJNI.EventConsumer_pop__SWIG_0(swigCPtr, this, block);
return (cPtr == 0) ? null : new Event(cPtr, true);
}
public Event pop() {
long cPtr = freeswitchJNI.EventConsumer_pop__SWIG_1(swigCPtr, this);
long cPtr = freeswitchJNI.EventConsumer_pop(swigCPtr, this, block);
return (cPtr == 0) ? null : new Event(cPtr, true);
}

View File

@ -17,8 +17,7 @@ class freeswitchJNI {
public final static native void IVRMenu_execute(long jarg1, IVRMenu jarg1_, long jarg2, CoreSession jarg2_, String jarg3);
public final static native long new_API();
public final static native void delete_API(long jarg1);
public final static native String API_execute__SWIG_0(long jarg1, API jarg1_, String jarg2, String jarg3);
public final static native String API_execute__SWIG_1(long jarg1, API jarg1_, String jarg2);
public final static native String API_execute(long jarg1, API jarg1_, String jarg2, String jarg3);
public final static native String API_executeString(long jarg1, API jarg1_, String jarg2);
public final static native String API_getTime(long jarg1, API jarg1_);
public final static native void input_callback_state_t_function_set(long jarg1, input_callback_state_t jarg1_, long jarg2);
@ -38,8 +37,7 @@ class freeswitchJNI {
public final static native char DTMF_digit_get(long jarg1, DTMF jarg1_);
public final static native void DTMF_duration_set(long jarg1, DTMF jarg1_, long jarg2);
public final static native long DTMF_duration_get(long jarg1, DTMF jarg1_);
public final static native long new_DTMF__SWIG_0(char jarg1, long jarg2);
public final static native long new_DTMF__SWIG_1(char jarg1);
public final static native long new_DTMF(char jarg1, long jarg2);
public final static native void delete_DTMF(long jarg1);
public final static native long new_Stream__SWIG_0();
public final static native long new_Stream__SWIG_1(long jarg1);
@ -53,14 +51,10 @@ class freeswitchJNI {
public final static native void Event_mine_set(long jarg1, Event jarg1_, int jarg2);
public final static native int Event_mine_get(long jarg1, Event jarg1_);
public final static native long new_Event__SWIG_0(String jarg1, String jarg2);
public final static native long new_Event__SWIG_1(String jarg1);
public final static native long new_Event__SWIG_2(long jarg1, int jarg2);
public final static native long new_Event__SWIG_3(long jarg1);
public final static native long new_Event__SWIG_1(long jarg1, int jarg2);
public final static native void delete_Event(long jarg1);
public final static native String Event_serialize__SWIG_0(long jarg1, Event jarg1_, String jarg2);
public final static native String Event_serialize__SWIG_1(long jarg1, Event jarg1_);
public final static native boolean Event_setPriority__SWIG_0(long jarg1, Event jarg1_, long jarg2);
public final static native boolean Event_setPriority__SWIG_1(long jarg1, Event jarg1_);
public final static native String Event_serialize(long jarg1, Event jarg1_, String jarg2);
public final static native boolean Event_setPriority(long jarg1, Event jarg1_, long jarg2);
public final static native String Event_getHeader(long jarg1, Event jarg1_, String jarg2);
public final static native String Event_getBody(long jarg1, Event jarg1_);
public final static native String Event_getType(long jarg1, Event jarg1_);
@ -72,19 +66,16 @@ class freeswitchJNI {
public final static native long EventConsumer_events_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_e_event_id_set(long jarg1, EventConsumer jarg1_, long jarg2);
public final static native long EventConsumer_e_event_id_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_node_set(long jarg1, EventConsumer jarg1_, long jarg2);
public final static native long EventConsumer_node_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_e_callback_set(long jarg1, EventConsumer jarg1_, String jarg2);
public final static native String EventConsumer_e_callback_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_e_subclass_name_set(long jarg1, EventConsumer jarg1_, String jarg2);
public final static native String EventConsumer_e_subclass_name_get(long jarg1, EventConsumer jarg1_);
public final static native void EventConsumer_e_cb_arg_set(long jarg1, EventConsumer jarg1_, String jarg2);
public final static native String EventConsumer_e_cb_arg_get(long jarg1, EventConsumer jarg1_);
public final static native long new_EventConsumer__SWIG_0(String jarg1, String jarg2);
public final static native long new_EventConsumer__SWIG_1(String jarg1);
public final static native long new_EventConsumer(String jarg1, String jarg2);
public final static native void delete_EventConsumer(long jarg1);
public final static native long EventConsumer_pop__SWIG_0(long jarg1, EventConsumer jarg1_, int jarg2);
public final static native long EventConsumer_pop__SWIG_1(long jarg1, EventConsumer jarg1_);
public final static native int EventConsumer_bind(long jarg1, EventConsumer jarg1_, String jarg2, String jarg3);
public final static native long EventConsumer_pop(long jarg1, EventConsumer jarg1_, int jarg2);
public final static native void delete_CoreSession(long jarg1);
public final static native void CoreSession_session_set(long jarg1, CoreSession jarg1_, long jarg2);
public final static native long CoreSession_session_get(long jarg1, CoreSession jarg1_);
@ -108,28 +99,19 @@ class freeswitchJNI {
public final static native String CoreSession_voice_name_get(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_answer(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_preAnswer(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hangup__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_hangup__SWIG_1(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_hangup(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_hangupState(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_setVariable(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native void CoreSession_setPrivate(long jarg1, CoreSession jarg1_, String jarg2, long jarg3);
public final static native long CoreSession_getPrivate(long jarg1, CoreSession jarg1_, String jarg2);
public final static native String CoreSession_getVariable(long jarg1, CoreSession jarg1_, String jarg2);
public final static native long CoreSession_process_callback_result(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_say__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6);
public final static native void CoreSession_say__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4, String jarg5);
public final static native void CoreSession_sayPhrase__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native void CoreSession_sayPhrase__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native void CoreSession_sayPhrase__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_say(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4, String jarg5, String jarg6);
public final static native void CoreSession_sayPhrase(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native String CoreSession_hangupCause(long jarg1, CoreSession jarg1_);
public final static native String CoreSession_getState(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_recordFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4, int jarg5);
public final static native int CoreSession_recordFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4);
public final static native int CoreSession_recordFile__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_recordFile__SWIG_3(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_originate__SWIG_0(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3, int jarg4, long jarg5);
public final static native int CoreSession_originate__SWIG_1(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3, int jarg4);
public final static native int CoreSession_originate__SWIG_2(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3);
public final static native int CoreSession_recordFile(long jarg1, CoreSession jarg1_, String jarg2, int jarg3, int jarg4, int jarg5);
public final static native int CoreSession_originate(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_, String jarg3, int jarg4, long jarg5);
public final static native void CoreSession_destroy(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_setDTMFCallback(long jarg1, CoreSession jarg1_, long jarg2, String jarg3);
public final static native int CoreSession_speak(long jarg1, CoreSession jarg1_, String jarg2);
@ -138,16 +120,11 @@ class freeswitchJNI {
public final static native int CoreSession_collectDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, int jarg3);
public final static native String CoreSession_getDigits__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4);
public final static native String CoreSession_getDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, String jarg3, int jarg4, int jarg5);
public final static native int CoreSession_transfer__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native int CoreSession_transfer__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native int CoreSession_transfer__SWIG_2(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_transfer(long jarg1, CoreSession jarg1_, String jarg2, String jarg3, String jarg4);
public final static native String CoreSession_read(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, String jarg4, int jarg5, String jarg6);
public final static native String CoreSession_playAndGetDigits__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9, String jarg10);
public final static native String CoreSession_playAndGetDigits__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9);
public final static native int CoreSession_streamFile__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_streamFile__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
public final static native int CoreSession_sleep__SWIG_0(long jarg1, CoreSession jarg1_, int jarg2, int jarg3);
public final static native int CoreSession_sleep__SWIG_1(long jarg1, CoreSession jarg1_, int jarg2);
public final static native String CoreSession_playAndGetDigits(long jarg1, CoreSession jarg1_, int jarg2, int jarg3, int jarg4, int jarg5, String jarg6, String jarg7, String jarg8, String jarg9, String jarg10);
public final static native int CoreSession_streamFile(long jarg1, CoreSession jarg1_, String jarg2, int jarg3);
public final static native int CoreSession_sleep(long jarg1, CoreSession jarg1_, int jarg2, int jarg3);
public final static native int CoreSession_flushEvents(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_flushDigits(long jarg1, CoreSession jarg1_);
public final static native int CoreSession_setAutoHangup(long jarg1, CoreSession jarg1_, boolean jarg2);
@ -157,8 +134,7 @@ class freeswitchJNI {
public final static native boolean CoreSession_answered(long jarg1, CoreSession jarg1_);
public final static native boolean CoreSession_mediaReady(long jarg1, CoreSession jarg1_);
public final static native void CoreSession_waitForAnswer(long jarg1, CoreSession jarg1_, long jarg2, CoreSession jarg2_);
public final static native void CoreSession_execute__SWIG_0(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native void CoreSession_execute__SWIG_1(long jarg1, CoreSession jarg1_, String jarg2);
public final static native void CoreSession_execute(long jarg1, CoreSession jarg1_, String jarg2, String jarg3);
public final static native void CoreSession_sendEvent(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
public final static native void CoreSession_setEventData(long jarg1, CoreSession jarg1_, long jarg2, Event jarg2_);
public final static native String CoreSession_getXMLCDR(long jarg1, CoreSession jarg1_);

View File

@ -421,11 +421,11 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1API(JNIEn
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
jstring jresult = 0 ;
API *arg1 = (API *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *result = 0 ;
(void)jenv;
@ -450,28 +450,6 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute_1
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1execute_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jstring jresult = 0 ;
API *arg1 = (API *) 0 ;
char *arg2 = (char *) 0 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(API **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (char *)(arg1)->execute((char const *)arg2);
if(result) jresult = jenv->NewStringUTF((const char *)result);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_API_1executeString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jstring jresult = 0 ;
API *arg1 = (API *) 0 ;
@ -760,10 +738,10 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_DTMF_1duration_1
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1DTMF_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jchar jarg1, jlong jarg2) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1DTMF(JNIEnv *jenv, jclass jcls, jchar jarg1, jlong jarg2) {
jlong jresult = 0 ;
char arg1 ;
uint32_t arg2 ;
uint32_t arg2 = (uint32_t) SWITCH_DEFAULT_DTMF_DURATION ;
DTMF *result = 0 ;
uint32_t *argp2 ;
@ -782,20 +760,6 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1DTMF_1_1SWI
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1DTMF_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jchar jarg1) {
jlong jresult = 0 ;
char arg1 ;
DTMF *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = (char)jarg1;
result = (DTMF *)new DTMF(arg1);
*(DTMF **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1DTMF(JNIEnv *jenv, jclass jcls, jlong jarg1) {
DTMF *arg1 = (DTMF *) 0 ;
@ -979,7 +943,7 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1mine_1get(
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg2 = (char *) NULL ;
Event *result = 0 ;
(void)jenv;
@ -1002,29 +966,10 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SW
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
Event *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return 0;
}
result = (Event *)new Event((char const *)arg1);
*(Event **)&jresult = result;
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
jlong jresult = 0 ;
switch_event_t *arg1 = (switch_event_t *) 0 ;
int arg2 ;
int arg2 = (int) 0 ;
Event *result = 0 ;
(void)jenv;
@ -1037,20 +982,6 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SW
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1Event_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1) {
jlong jresult = 0 ;
switch_event_t *arg1 = (switch_event_t *) 0 ;
Event *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = *(switch_event_t **)&jarg1;
result = (Event *)new Event(arg1);
*(Event **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Event(JNIEnv *jenv, jclass jcls, jlong jarg1) {
Event *arg1 = (Event *) 0 ;
@ -1062,10 +993,10 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1Event(JNI
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jstring jresult = 0 ;
Event *arg1 = (Event *) 0 ;
char *arg2 = (char *) 0 ;
char *arg2 = (char *) NULL ;
char *result = 0 ;
(void)jenv;
@ -1084,25 +1015,10 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1seriali
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1serialize_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jstring jresult = 0 ;
Event *arg1 = (Event *) 0 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(Event **)&jarg1;
result = (char *)(arg1)->serialize();
if(result) jresult = jenv->NewStringUTF((const char *)result);
return jresult;
}
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPriority_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPriority(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
jboolean jresult = 0 ;
Event *arg1 = (Event *) 0 ;
switch_priority_t arg2 ;
switch_priority_t arg2 = (switch_priority_t) SWITCH_PRIORITY_NORMAL ;
bool result;
switch_priority_t *argp2 ;
@ -1122,21 +1038,6 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPri
}
SWIGEXPORT jboolean JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1setPriority_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jboolean jresult = 0 ;
Event *arg1 = (Event *) 0 ;
bool result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(Event **)&jarg1;
result = (bool)(arg1)->setPriority();
jresult = (jboolean)result;
return jresult;
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_Event_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jstring jresult = 0 ;
Event *arg1 = (Event *) 0 ;
@ -1341,35 +1242,6 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1e
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1node_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_event_node_t *arg2 = (switch_event_node_t *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
arg2 = *(switch_event_node_t **)&jarg2;
if (arg1) (arg1)->node = arg2;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1node_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_event_node_t *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
result = (switch_event_node_t *) ((arg1)->node);
*(switch_event_node_t **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1e_1callback_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
char *arg2 = (char *) 0 ;
@ -1493,10 +1365,10 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
char *arg2 = (char *) 0 ;
char *arg1 = (char *) NULL ;
char *arg2 = (char *) "" ;
EventConsumer *result = 0 ;
(void)jenv;
@ -1519,25 +1391,6 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsum
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_new_1EventConsumer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
jlong jresult = 0 ;
char *arg1 = (char *) 0 ;
EventConsumer *result = 0 ;
(void)jenv;
(void)jcls;
arg1 = 0;
if (jarg1) {
arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
if (!arg1) return 0;
}
result = (EventConsumer *)new EventConsumer((char const *)arg1);
*(EventConsumer **)&jresult = result;
if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1EventConsumer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
@ -1549,10 +1402,39 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1EventCons
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1bind(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
jint jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) "" ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
result = (int)(arg1)->bind((char const *)arg2,(char const *)arg3);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
jlong jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
int arg2 ;
int arg2 = (int) 0 ;
Event *result = 0 ;
(void)jenv;
@ -1566,21 +1448,6 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1p
}
SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_EventConsumer_1pop_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jlong jresult = 0 ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
Event *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(EventConsumer **)&jarg1;
result = (Event *)(arg1)->pop();
*(Event **)&jresult = result;
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_delete_1CoreSession(JNIEnv *jenv, jclass jcls, jlong jarg1) {
CoreSession *arg1 = (CoreSession *) 0 ;
@ -1961,9 +1828,9 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1preA
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg2 = (char *) "normal_clearing" ;
(void)jenv;
(void)jcls;
@ -1979,17 +1846,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hang
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangup_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
CoreSession *arg1 = (CoreSession *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
(arg1)->hangup();
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangupState(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
CoreSession *arg1 = (CoreSession *) 0 ;
@ -2112,13 +1968,13 @@ SWIGEXPORT jlong JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1pro
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1say_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6) {
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1say(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5, jstring jarg6) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
char *arg5 = (char *) 0 ;
char *arg6 = (char *) 0 ;
char *arg6 = (char *) NULL ;
(void)jenv;
(void)jcls;
@ -2158,50 +2014,11 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1say_
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1say_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jstring jarg5) {
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sayPhrase(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
char *arg5 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return ;
}
arg4 = 0;
if (jarg4) {
arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
if (!arg4) return ;
}
arg5 = 0;
if (jarg5) {
arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
if (!arg5) return ;
}
(arg1)->say((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sayPhrase_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
char *arg3 = (char *) "" ;
char *arg4 = (char *) NULL ;
(void)jenv;
(void)jcls;
@ -2229,49 +2046,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sayP
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sayPhrase_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return ;
}
(arg1)->sayPhrase((char const *)arg2,(char const *)arg3);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sayPhrase_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
(arg1)->sayPhrase((char const *)arg2);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1hangupCause(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -2302,13 +2076,13 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1g
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
int arg4 ;
int arg5 ;
int arg3 = (int) 0 ;
int arg4 = (int) 0 ;
int arg5 = (int) 0 ;
int result;
(void)jenv;
@ -2330,85 +2104,13 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1reco
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
int arg4 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
arg3 = (int)jarg3;
arg4 = (int)jarg4;
result = (int)(arg1)->recordFile(arg2,arg3,arg4);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
arg3 = (int)jarg3;
result = (int)(arg1)->recordFile(arg2,arg3);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1recordFile_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (int)(arg1)->recordFile(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4, jlong jarg5) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4, jlong jarg5) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
int arg4 ;
switch_state_handler_table_t *arg5 = (switch_state_handler_table_t *) 0 ;
int arg4 = (int) 60 ;
switch_state_handler_table_t *arg5 = (switch_state_handler_table_t *) NULL ;
int result;
(void)jenv;
@ -2431,58 +2133,6 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1orig
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jint jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
int arg4 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(CoreSession **)&jarg1;
arg2 = *(CoreSession **)&jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
arg4 = (int)jarg4;
result = (int)(arg1)->originate(arg2,arg3,arg4);
jresult = (jint)result;
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1originate_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
CoreSession *arg2 = (CoreSession *) 0 ;
char *arg3 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
(void)jarg2_;
arg1 = *(CoreSession **)&jarg1;
arg2 = *(CoreSession **)&jarg2;
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
result = (int)(arg1)->originate(arg2,arg3);
jresult = (jint)result;
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1destroy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
CoreSession *arg1 = (CoreSession *) 0 ;
@ -2651,12 +2301,12 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1g
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg4 = (char *) 0 ;
char *arg3 = (char *) NULL ;
char *arg4 = (char *) NULL ;
int result;
(void)jenv;
@ -2687,57 +2337,6 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1tran
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
arg3 = 0;
if (jarg3) {
arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
if (!arg3) return 0;
}
result = (int)(arg1)->transfer(arg2,arg3);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1transfer_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (int)(arg1)->transfer(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1read(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jstring jarg4, jint jarg5, jstring jarg6) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -2773,7 +2372,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1r
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9, jstring jarg10) {
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9, jstring jarg10) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
@ -2784,7 +2383,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1p
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *arg10 = (char *) 0 ;
char *arg10 = (char *) NULL ;
char *result = 0 ;
(void)jenv;
@ -2831,62 +2430,11 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1p
}
SWIGEXPORT jstring JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1playAndGetDigits_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jstring jarg6, jstring jarg7, jstring jarg8, jstring jarg9) {
jstring jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg4 ;
int arg5 ;
char *arg6 = (char *) 0 ;
char *arg7 = (char *) 0 ;
char *arg8 = (char *) 0 ;
char *arg9 = (char *) 0 ;
char *result = 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = (int)jarg2;
arg3 = (int)jarg3;
arg4 = (int)jarg4;
arg5 = (int)jarg5;
arg6 = 0;
if (jarg6) {
arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
if (!arg6) return 0;
}
arg7 = 0;
if (jarg7) {
arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
if (!arg7) return 0;
}
arg8 = 0;
if (jarg8) {
arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
if (!arg8) return 0;
}
arg9 = 0;
if (jarg9) {
arg9 = (char *)jenv->GetStringUTFChars(jarg9, 0);
if (!arg9) return 0;
}
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
if(result) jresult = jenv->NewStringUTF((const char *)result);
if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
if (arg9) jenv->ReleaseStringUTFChars(jarg9, (const char *)arg9);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int arg3 ;
int arg3 = (int) 0 ;
int result;
(void)jenv;
@ -2906,33 +2454,11 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1stre
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1streamFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return 0;
}
result = (int)(arg1)->streamFile(arg2);
jresult = (jint)result;
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sleep_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sleep(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int arg3 ;
int arg3 = (int) 0 ;
int result;
(void)jenv;
@ -2947,23 +2473,6 @@ SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1slee
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sleep_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
int arg2 ;
int result;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = (int)jarg2;
result = (int)(arg1)->sleep(arg2);
jresult = (jint)result;
return jresult;
}
SWIGEXPORT jint JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1flushEvents(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
jint jresult = 0 ;
CoreSession *arg1 = (CoreSession *) 0 ;
@ -3098,10 +2607,10 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1wait
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) 0 ;
char *arg3 = (char *) NULL ;
(void)jenv;
(void)jcls;
@ -3123,24 +2632,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1exec
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1execute_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
CoreSession *arg1 = (CoreSession *) 0 ;
char *arg2 = (char *) 0 ;
(void)jenv;
(void)jcls;
(void)jarg1_;
arg1 = *(CoreSession **)&jarg1;
arg2 = 0;
if (jarg2) {
arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
if (!arg2) return ;
}
(arg1)->execute((char const *)arg2);
if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}
SWIGEXPORT void JNICALL Java_org_freeswitch_swig_freeswitchJNI_CoreSession_1sendEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
CoreSession *arg1 = (CoreSession *) 0 ;
Event *arg2 = (Event *) 0 ;

File diff suppressed because it is too large Load Diff

View File

@ -7975,6 +7975,18 @@ SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_copy(void * jarg1, void * ja
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_reset(void * jarg1) {
int jresult ;
switch_codec_t *arg1 = (switch_codec_t *) 0 ;
switch_status_t result;
arg1 = (switch_codec_t *)jarg1;
result = (switch_status_t)switch_core_codec_reset(arg1);
jresult = result;
return jresult;
}
SWIGEXPORT int SWIGSTDCALL CSharp_switch_core_codec_encode(void * jarg1, void * jarg2, void * jarg3, unsigned long jarg4, unsigned long jarg5, void * jarg6, void * jarg7, void * jarg8, void * jarg9) {
int jresult ;
switch_codec_t *arg1 = (switch_codec_t *) 0 ;
@ -31030,29 +31042,6 @@ SWIGEXPORT int SWIGSTDCALL CSharp_EventConsumer_e_event_id_get(void * jarg1) {
}
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_node_set(void * jarg1, void * jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_event_node_t *arg2 = (switch_event_node_t *) 0 ;
arg1 = (EventConsumer *)jarg1;
arg2 = (switch_event_node_t *)jarg2;
if (arg1) (arg1)->node = arg2;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_EventConsumer_node_get(void * jarg1) {
void * jresult ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
switch_event_node_t *result = 0 ;
arg1 = (EventConsumer *)jarg1;
result = (switch_event_node_t *) ((arg1)->node);
jresult = (void *)result;
return jresult;
}
SWIGEXPORT void SWIGSTDCALL CSharp_EventConsumer_e_callback_set(void * jarg1, char * jarg2) {
EventConsumer *arg1 = (EventConsumer *) 0 ;
char *arg2 = (char *) 0 ;
@ -31145,7 +31134,7 @@ SWIGEXPORT char * SWIGSTDCALL CSharp_EventConsumer_e_cb_arg_get(void * jarg1) {
SWIGEXPORT void * SWIGSTDCALL CSharp_new_EventConsumer(char * jarg1, char * jarg2) {
void * jresult ;
char *arg1 = (char *) 0 ;
char *arg1 = (char *) NULL ;
char *arg2 = (char *) "" ;
EventConsumer *result = 0 ;
@ -31166,6 +31155,22 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_EventConsumer(void * jarg1) {
}
SWIGEXPORT int SWIGSTDCALL CSharp_EventConsumer_bind(void * jarg1, char * jarg2, char * jarg3) {
int jresult ;
EventConsumer *arg1 = (EventConsumer *) 0 ;
char *arg2 = (char *) 0 ;
char *arg3 = (char *) "" ;
int result;
arg1 = (EventConsumer *)jarg1;
arg2 = (char *)jarg2;
arg3 = (char *)jarg3;
result = (int)(arg1)->bind((char const *)arg2,(char const *)arg3);
jresult = result;
return jresult;
}
SWIGEXPORT void * SWIGSTDCALL CSharp_EventConsumer_pop(void * jarg1, int jarg2) {
void * jresult ;
EventConsumer *arg1 = (EventConsumer *) 0 ;

View File

@ -554,17 +554,6 @@ public class EventConsumer : IDisposable {
}
}
public SWIGTYPE_p_switch_event_node node {
set {
freeswitchPINVOKE.EventConsumer_node_set(swigCPtr, SWIGTYPE_p_switch_event_node.getCPtr(value));
}
get {
IntPtr cPtr = freeswitchPINVOKE.EventConsumer_node_get(swigCPtr);
SWIGTYPE_p_switch_event_node ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_switch_event_node(cPtr, false);
return ret;
}
}
public string e_callback {
set {
freeswitchPINVOKE.EventConsumer_e_callback_set(swigCPtr, value);
@ -598,6 +587,11 @@ public class EventConsumer : IDisposable {
public EventConsumer(string event_name, string subclass_name) : this(freeswitchPINVOKE.new_EventConsumer(event_name, subclass_name), true) {
}
public int bind(string event_name, string subclass_name) {
int ret = freeswitchPINVOKE.EventConsumer_bind(swigCPtr, event_name, subclass_name);
return ret;
}
public Event pop(int block) {
IntPtr cPtr = freeswitchPINVOKE.EventConsumer_pop(swigCPtr, block);
Event ret = (cPtr == IntPtr.Zero) ? null : new Event(cPtr, true);
@ -1644,6 +1638,11 @@ public class freeswitch {
return ret;
}
public static switch_status_t switch_core_codec_reset(switch_codec codec) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_reset(switch_codec.getCPtr(codec));
return ret;
}
public static switch_status_t switch_core_codec_encode(switch_codec codec, switch_codec other_codec, SWIGTYPE_p_void decoded_data, uint decoded_data_len, uint decoded_rate, SWIGTYPE_p_void encoded_data, SWIGTYPE_p_unsigned_long encoded_data_len, SWIGTYPE_p_unsigned_long encoded_rate, SWIGTYPE_p_unsigned_int flag) {
switch_status_t ret = (switch_status_t)freeswitchPINVOKE.switch_core_codec_encode(switch_codec.getCPtr(codec), switch_codec.getCPtr(other_codec), SWIGTYPE_p_void.getCPtr(decoded_data), decoded_data_len, decoded_rate, SWIGTYPE_p_void.getCPtr(encoded_data), SWIGTYPE_p_unsigned_long.getCPtr(encoded_data_len), SWIGTYPE_p_unsigned_long.getCPtr(encoded_rate), SWIGTYPE_p_unsigned_int.getCPtr(flag));
return ret;
@ -7007,6 +7006,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_copy")]
public static extern int switch_core_codec_copy(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_reset")]
public static extern int switch_core_codec_reset(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_switch_core_codec_encode")]
public static extern int switch_core_codec_encode(HandleRef jarg1, HandleRef jarg2, HandleRef jarg3, uint jarg4, uint jarg5, HandleRef jarg6, HandleRef jarg7, HandleRef jarg8, HandleRef jarg9);
@ -12404,12 +12406,6 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_e_event_id_get")]
public static extern int EventConsumer_e_event_id_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_set")]
public static extern void EventConsumer_node_set(HandleRef jarg1, HandleRef jarg2);
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_node_get")]
public static extern IntPtr EventConsumer_node_get(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_e_callback_set")]
public static extern void EventConsumer_e_callback_set(HandleRef jarg1, string jarg2);
@ -12434,6 +12430,9 @@ class freeswitchPINVOKE {
[DllImport("mod_managed", EntryPoint="CSharp_delete_EventConsumer")]
public static extern void delete_EventConsumer(HandleRef jarg1);
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_bind")]
public static extern int EventConsumer_bind(HandleRef jarg1, string jarg2, string jarg3);
[DllImport("mod_managed", EntryPoint="CSharp_EventConsumer_pop")]
public static extern IntPtr EventConsumer_pop(HandleRef jarg1, int jarg2);
@ -16430,36 +16429,6 @@ namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_switch_event_node {
private HandleRef swigCPtr;
internal SWIGTYPE_p_switch_event_node(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_switch_event_node() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_switch_event_node obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace FreeSWITCH.Native {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_switch_event_types_t {
private HandleRef swigCPtr;

View File

@ -324,8 +324,6 @@ use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
*swig_events_set = *freeswitchc::EventConsumer_events_set;
*swig_e_event_id_get = *freeswitchc::EventConsumer_e_event_id_get;
*swig_e_event_id_set = *freeswitchc::EventConsumer_e_event_id_set;
*swig_node_get = *freeswitchc::EventConsumer_node_get;
*swig_node_set = *freeswitchc::EventConsumer_node_set;
*swig_e_callback_get = *freeswitchc::EventConsumer_e_callback_get;
*swig_e_callback_set = *freeswitchc::EventConsumer_e_callback_set;
*swig_e_subclass_name_get = *freeswitchc::EventConsumer_e_subclass_name_get;
@ -349,6 +347,7 @@ sub DESTROY {
}
}
*bind = *freeswitchc::EventConsumer_bind;
*pop = *freeswitchc::EventConsumer_pop;
sub DISOWN {
my $self = shift;

File diff suppressed because it is too large Load Diff

View File

@ -198,9 +198,6 @@ class EventConsumer(_object):
__swig_setmethods__["e_event_id"] = _freeswitch.EventConsumer_e_event_id_set
__swig_getmethods__["e_event_id"] = _freeswitch.EventConsumer_e_event_id_get
if _newclass:e_event_id = _swig_property(_freeswitch.EventConsumer_e_event_id_get, _freeswitch.EventConsumer_e_event_id_set)
__swig_setmethods__["node"] = _freeswitch.EventConsumer_node_set
__swig_getmethods__["node"] = _freeswitch.EventConsumer_node_get
if _newclass:node = _swig_property(_freeswitch.EventConsumer_node_get, _freeswitch.EventConsumer_node_set)
__swig_setmethods__["e_callback"] = _freeswitch.EventConsumer_e_callback_set
__swig_getmethods__["e_callback"] = _freeswitch.EventConsumer_e_callback_get
if _newclass:e_callback = _swig_property(_freeswitch.EventConsumer_e_callback_get, _freeswitch.EventConsumer_e_callback_set)
@ -216,6 +213,7 @@ class EventConsumer(_object):
except: self.this = this
__swig_destroy__ = _freeswitch.delete_EventConsumer
__del__ = lambda self : None;
def bind(*args): return _freeswitch.EventConsumer_bind(*args)
def pop(*args): return _freeswitch.EventConsumer_pop(*args)
EventConsumer_swigregister = _freeswitch.EventConsumer_swigregister
EventConsumer_swigregister(EventConsumer)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,38 @@
***************
*** 5555,5561 ****
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EventConsumer_pop" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
result = (Event *)(arg1)->pop(arg2);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
--- 5555,5563 ----
SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "EventConsumer_pop" "', argument " "2"" of type '" "int""'");
}
arg2 = static_cast< int >(val2);
+ Py_BEGIN_ALLOW_THREADS;
result = (Event *)(arg1)->pop(arg2);
+ Py_END_ALLOW_THREADS;
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
***************
*** 5577,5583 ****
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_pop" "', argument " "1"" of type '" "EventConsumer *""'");
}
arg1 = reinterpret_cast< EventConsumer * >(argp1);
result = (Event *)(arg1)->pop();
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
--- 5579,5587 ----
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "EventConsumer_pop" "', argument " "1"" of type '" "EventConsumer *""'");
}
arg1 = reinterpret_cast< EventConsumer * >(argp1);
+ Py_BEGIN_ALLOW_THREADS;
result = (Event *)(arg1)->pop();
+ Py_END_ALLOW_THREADS;
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:

2018
src/switch_core.c.orig Normal file

File diff suppressed because it is too large Load Diff

View File

@ -52,25 +52,35 @@ static void event_handler(switch_event_t *event)
SWITCH_DECLARE_CONSTRUCTOR EventConsumer::EventConsumer(const char *event_name, const char *subclass_name)
{
switch_name_event(event_name, &e_event_id);
switch_core_new_memory_pool(&pool);
if (!zstr(subclass_name)) {
e_subclass_name = switch_core_strdup(pool, subclass_name);
} else {
e_subclass_name = NULL;
}
switch_core_new_memory_pool(&pool);
switch_queue_create(&events, 5000, pool);
if (switch_event_bind_removable(__FILE__, e_event_id, e_subclass_name, event_handler, this, &node) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "bound to %s %s\n", event_name, switch_str_nil(e_subclass_name));
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind to %s %s\n", event_name, switch_str_nil(e_subclass_name));
if (!zstr(event_name)) {
bind(event_name, subclass_name);
}
}
SWITCH_DECLARE(int) EventConsumer::bind(const char *event_name, const char *subclass_name)
{
switch_event_types_t event_id = SWITCH_EVENT_CUSTOM;
switch_name_event(event_name, &event_id);
if (zstr(subclass_name)) {
subclass_name = NULL;
}
if (switch_event_bind(__FILE__, event_id, subclass_name, event_handler, this) == SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "bound to %s %s\n", event_name, switch_str_nil(subclass_name));
return 1;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot bind to %s %s\n", event_name, switch_str_nil(subclass_name));
return 0;
}
}
SWITCH_DECLARE(Event *) EventConsumer::pop(int block)
{
@ -93,9 +103,8 @@ SWITCH_DECLARE(Event *) EventConsumer::pop(int block)
SWITCH_DECLARE_CONSTRUCTOR EventConsumer::~EventConsumer()
{
if (node) {
switch_event_unbind(&node);
}
switch_event_unbind_callback(event_handler);
if (events) {
switch_queue_interrupt_all(events);

View File

@ -1198,7 +1198,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_bind_removable(const char *id, swit
if (node) {
*node = NULL;
}
if (subclass_name) {
if (!(subclass = switch_core_hash_find(CUSTOM_HASH, subclass_name))) {
switch_event_reserve_subclass_detailed(id, subclass_name);

1962
src/switch_time.c.orig Normal file

File diff suppressed because it is too large Load Diff