mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-15 00:31:57 +00:00
initial import of mod_java from Damjan Jovanovic
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5755 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
%module freeswitch
|
||||
|
||||
/** insert the following includes into generated code so it compiles */
|
||||
%{
|
||||
#include "switch_cpp.h"
|
||||
#include "freeswitch_java.h"
|
||||
%}
|
||||
|
||||
%ignore SwitchToMempool;
|
||||
|
||||
|
||||
|
||||
// I thought we were using swig because it's easier than the alternatives :-)
|
||||
|
||||
%typemap(jtype) jobject dtmfCallback "org.freeswitch.DTMFCallback"
|
||||
%typemap(jstype) jobject dtmfCallback "org.freeswitch.DTMFCallback"
|
||||
|
||||
%typemap(jtype) jobject hangupHook "org.freeswitch.HangupHook"
|
||||
%typemap(jstype) jobject hangupHook "org.freeswitch.HangupHook"
|
||||
|
||||
// Taken from various.i definitions for BYTE
|
||||
%typemap(jni) char *dtmf_buf "jbyteArray"
|
||||
%typemap(jtype) char *dtmf_buf "byte[]"
|
||||
%typemap(jstype) char *dtmf_buf "byte[]"
|
||||
%typemap(in) char *dtmf_buf
|
||||
{
|
||||
$1 = (char*) JCALL2(GetByteArrayElements, jenv, $input, 0);
|
||||
if (!$1) return 0;
|
||||
}
|
||||
%typemap(argout) char *dtmf_buf
|
||||
{
|
||||
JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte*) $1, 0);
|
||||
}
|
||||
%typemap(javain) char *dtmf_buf "$javainput"
|
||||
%typemap(freearg) char *dtmf_buf ""
|
||||
|
||||
%typemap(jni) char *terminator "jbyteArray"
|
||||
%typemap(jtype) char *terminator "byte[]"
|
||||
%typemap(jstype) char *terminator "byte[]"
|
||||
%typemap(in) char *terminator
|
||||
{
|
||||
$1 = (char*) JCALL2(GetByteArrayElements, jenv, $input, 0);
|
||||
if (!$1) return 0;
|
||||
}
|
||||
%typemap(argout) char *terminator
|
||||
{
|
||||
JCALL3(ReleaseByteArrayElements, jenv, $input, (jbyte*) $1, 0);
|
||||
}
|
||||
%typemap(javain) char *terminator "$javainput"
|
||||
%typemap(freearg) char *terminator ""
|
||||
|
||||
|
||||
|
||||
%include "enums.swg"
|
||||
%include switch_cpp.h
|
||||
%include freeswitch_java.h
|
||||
|
||||
Reference in New Issue
Block a user