2
0

esl_wrap.cpp 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237
  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 3.0.2
  4. *
  5. * This file is not intended to be easily readable and contains a number of
  6. * coding conventions designed to improve portability and efficiency. Do not make
  7. * changes to this file unless you know what you are doing--modify the SWIG
  8. * interface file instead.
  9. * ----------------------------------------------------------------------------- */
  10. #define SWIGJAVA
  11. #ifdef __cplusplus
  12. /* SwigValueWrapper is described in swig.swg */
  13. template<typename T> class SwigValueWrapper {
  14. struct SwigMovePointer {
  15. T *ptr;
  16. SwigMovePointer(T *p) : ptr(p) { }
  17. ~SwigMovePointer() { delete ptr; }
  18. SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  19. } pointer;
  20. SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  21. SwigValueWrapper(const SwigValueWrapper<T>& rhs);
  22. public:
  23. SwigValueWrapper() : pointer(0) { }
  24. SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  25. operator T&() const { return *pointer.ptr; }
  26. T *operator&() { return pointer.ptr; }
  27. };
  28. template <typename T> T SwigValueInit() {
  29. return T();
  30. }
  31. #endif
  32. /* -----------------------------------------------------------------------------
  33. * This section contains generic SWIG labels for method/variable
  34. * declarations/attributes, and other compiler dependent labels.
  35. * ----------------------------------------------------------------------------- */
  36. /* template workaround for compilers that cannot correctly implement the C++ standard */
  37. #ifndef SWIGTEMPLATEDISAMBIGUATOR
  38. # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
  39. # define SWIGTEMPLATEDISAMBIGUATOR template
  40. # elif defined(__HP_aCC)
  41. /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
  42. /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
  43. # define SWIGTEMPLATEDISAMBIGUATOR template
  44. # else
  45. # define SWIGTEMPLATEDISAMBIGUATOR
  46. # endif
  47. #endif
  48. /* inline attribute */
  49. #ifndef SWIGINLINE
  50. # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  51. # define SWIGINLINE inline
  52. # else
  53. # define SWIGINLINE
  54. # endif
  55. #endif
  56. /* attribute recognised by some compilers to avoid 'unused' warnings */
  57. #ifndef SWIGUNUSED
  58. # if defined(__GNUC__)
  59. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  60. # define SWIGUNUSED __attribute__ ((__unused__))
  61. # else
  62. # define SWIGUNUSED
  63. # endif
  64. # elif defined(__ICC)
  65. # define SWIGUNUSED __attribute__ ((__unused__))
  66. # else
  67. # define SWIGUNUSED
  68. # endif
  69. #endif
  70. #ifndef SWIG_MSC_UNSUPPRESS_4505
  71. # if defined(_MSC_VER)
  72. # pragma warning(disable : 4505) /* unreferenced local function has been removed */
  73. # endif
  74. #endif
  75. #ifndef SWIGUNUSEDPARM
  76. # ifdef __cplusplus
  77. # define SWIGUNUSEDPARM(p)
  78. # else
  79. # define SWIGUNUSEDPARM(p) p SWIGUNUSED
  80. # endif
  81. #endif
  82. /* internal SWIG method */
  83. #ifndef SWIGINTERN
  84. # define SWIGINTERN static SWIGUNUSED
  85. #endif
  86. /* internal inline SWIG method */
  87. #ifndef SWIGINTERNINLINE
  88. # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  89. #endif
  90. /* exporting methods */
  91. #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  92. # ifndef GCC_HASCLASSVISIBILITY
  93. # define GCC_HASCLASSVISIBILITY
  94. # endif
  95. #endif
  96. #ifndef SWIGEXPORT
  97. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  98. # if defined(STATIC_LINKED)
  99. # define SWIGEXPORT
  100. # else
  101. # define SWIGEXPORT __declspec(dllexport)
  102. # endif
  103. # else
  104. # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  105. # define SWIGEXPORT __attribute__ ((visibility("default")))
  106. # else
  107. # define SWIGEXPORT
  108. # endif
  109. # endif
  110. #endif
  111. /* calling conventions for Windows */
  112. #ifndef SWIGSTDCALL
  113. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  114. # define SWIGSTDCALL __stdcall
  115. # else
  116. # define SWIGSTDCALL
  117. # endif
  118. #endif
  119. /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  120. #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  121. # define _CRT_SECURE_NO_DEPRECATE
  122. #endif
  123. /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  124. #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  125. # define _SCL_SECURE_NO_DEPRECATE
  126. #endif
  127. /* Fix for jlong on some versions of gcc on Windows */
  128. #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
  129. typedef long long __int64;
  130. #endif
  131. /* Fix for jlong on 64-bit x86 Solaris */
  132. #if defined(__x86_64)
  133. # ifdef _LP64
  134. # undef _LP64
  135. # endif
  136. #endif
  137. #include <jni.h>
  138. #include <stdlib.h>
  139. #include <string.h>
  140. /* Support for throwing Java exceptions */
  141. typedef enum {
  142. SWIG_JavaOutOfMemoryError = 1,
  143. SWIG_JavaIOException,
  144. SWIG_JavaRuntimeException,
  145. SWIG_JavaIndexOutOfBoundsException,
  146. SWIG_JavaArithmeticException,
  147. SWIG_JavaIllegalArgumentException,
  148. SWIG_JavaNullPointerException,
  149. SWIG_JavaDirectorPureVirtual,
  150. SWIG_JavaUnknownError
  151. } SWIG_JavaExceptionCodes;
  152. typedef struct {
  153. SWIG_JavaExceptionCodes code;
  154. const char *java_exception;
  155. } SWIG_JavaExceptions_t;
  156. static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  157. jclass excep;
  158. static const SWIG_JavaExceptions_t java_exceptions[] = {
  159. { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
  160. { SWIG_JavaIOException, "java/io/IOException" },
  161. { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
  162. { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
  163. { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
  164. { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
  165. { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
  166. { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
  167. { SWIG_JavaUnknownError, "java/lang/UnknownError" },
  168. { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" }
  169. };
  170. const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
  171. while (except_ptr->code != code && except_ptr->code)
  172. except_ptr++;
  173. jenv->ExceptionClear();
  174. excep = jenv->FindClass(except_ptr->java_exception);
  175. if (excep)
  176. jenv->ThrowNew(excep, msg);
  177. }
  178. /* Contract support */
  179. #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
  180. #include "esl.h"
  181. #include "esl_oop.h"
  182. #ifdef __cplusplus
  183. extern "C" {
  184. #endif
  185. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1event_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  186. ESLevent *arg1 = (ESLevent *) 0 ;
  187. esl_event_t *arg2 = (esl_event_t *) 0 ;
  188. (void)jenv;
  189. (void)jcls;
  190. (void)jarg1_;
  191. arg1 = *(ESLevent **)&jarg1;
  192. arg2 = *(esl_event_t **)&jarg2;
  193. if (arg1) (arg1)->event = arg2;
  194. }
  195. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1event_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  196. jlong jresult = 0 ;
  197. ESLevent *arg1 = (ESLevent *) 0 ;
  198. esl_event_t *result = 0 ;
  199. (void)jenv;
  200. (void)jcls;
  201. (void)jarg1_;
  202. arg1 = *(ESLevent **)&jarg1;
  203. result = (esl_event_t *) ((arg1)->event);
  204. *(esl_event_t **)&jresult = result;
  205. return jresult;
  206. }
  207. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1string_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  208. ESLevent *arg1 = (ESLevent *) 0 ;
  209. char *arg2 = (char *) 0 ;
  210. (void)jenv;
  211. (void)jcls;
  212. (void)jarg1_;
  213. arg1 = *(ESLevent **)&jarg1;
  214. arg2 = 0;
  215. if (jarg2) {
  216. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  217. if (!arg2) return ;
  218. }
  219. {
  220. delete [] arg1->serialized_string;
  221. if (arg2) {
  222. arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]);
  223. strcpy((char *)arg1->serialized_string, (const char *)arg2);
  224. } else {
  225. arg1->serialized_string = 0;
  226. }
  227. }
  228. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  229. }
  230. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1string_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  231. jstring jresult = 0 ;
  232. ESLevent *arg1 = (ESLevent *) 0 ;
  233. char *result = 0 ;
  234. (void)jenv;
  235. (void)jcls;
  236. (void)jarg1_;
  237. arg1 = *(ESLevent **)&jarg1;
  238. result = (char *) ((arg1)->serialized_string);
  239. if (result) jresult = jenv->NewStringUTF((const char *)result);
  240. return jresult;
  241. }
  242. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1mine_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  243. ESLevent *arg1 = (ESLevent *) 0 ;
  244. int arg2 ;
  245. (void)jenv;
  246. (void)jcls;
  247. (void)jarg1_;
  248. arg1 = *(ESLevent **)&jarg1;
  249. arg2 = (int)jarg2;
  250. if (arg1) (arg1)->mine = arg2;
  251. }
  252. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1mine_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  253. jint jresult = 0 ;
  254. ESLevent *arg1 = (ESLevent *) 0 ;
  255. int result;
  256. (void)jenv;
  257. (void)jcls;
  258. (void)jarg1_;
  259. arg1 = *(ESLevent **)&jarg1;
  260. result = (int) ((arg1)->mine);
  261. jresult = (jint)result;
  262. return jresult;
  263. }
  264. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLevent_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) {
  265. jlong jresult = 0 ;
  266. char *arg1 = (char *) 0 ;
  267. char *arg2 = (char *) NULL ;
  268. ESLevent *result = 0 ;
  269. (void)jenv;
  270. (void)jcls;
  271. arg1 = 0;
  272. if (jarg1) {
  273. arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
  274. if (!arg1) return 0;
  275. }
  276. arg2 = 0;
  277. if (jarg2) {
  278. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  279. if (!arg2) return 0;
  280. }
  281. result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2);
  282. *(ESLevent **)&jresult = result;
  283. if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  284. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  285. return jresult;
  286. }
  287. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLevent_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2) {
  288. jlong jresult = 0 ;
  289. esl_event_t *arg1 = (esl_event_t *) 0 ;
  290. int arg2 = (int) 0 ;
  291. ESLevent *result = 0 ;
  292. (void)jenv;
  293. (void)jcls;
  294. arg1 = *(esl_event_t **)&jarg1;
  295. arg2 = (int)jarg2;
  296. result = (ESLevent *)new ESLevent(arg1,arg2);
  297. *(ESLevent **)&jresult = result;
  298. return jresult;
  299. }
  300. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLevent_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  301. jlong jresult = 0 ;
  302. ESLevent *arg1 = (ESLevent *) 0 ;
  303. ESLevent *result = 0 ;
  304. (void)jenv;
  305. (void)jcls;
  306. (void)jarg1_;
  307. arg1 = *(ESLevent **)&jarg1;
  308. result = (ESLevent *)new ESLevent(arg1);
  309. *(ESLevent **)&jresult = result;
  310. return jresult;
  311. }
  312. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLevent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  313. ESLevent *arg1 = (ESLevent *) 0 ;
  314. (void)jenv;
  315. (void)jcls;
  316. arg1 = *(ESLevent **)&jarg1;
  317. delete arg1;
  318. }
  319. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  320. jstring jresult = 0 ;
  321. ESLevent *arg1 = (ESLevent *) 0 ;
  322. char *arg2 = (char *) NULL ;
  323. char *result = 0 ;
  324. (void)jenv;
  325. (void)jcls;
  326. (void)jarg1_;
  327. arg1 = *(ESLevent **)&jarg1;
  328. arg2 = 0;
  329. if (jarg2) {
  330. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  331. if (!arg2) return 0;
  332. }
  333. result = (char *)(arg1)->serialize((char const *)arg2);
  334. if (result) jresult = jenv->NewStringUTF((const char *)result);
  335. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  336. return jresult;
  337. }
  338. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  339. jboolean jresult = 0 ;
  340. ESLevent *arg1 = (ESLevent *) 0 ;
  341. esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
  342. esl_priority_t *argp2 ;
  343. bool result;
  344. (void)jenv;
  345. (void)jcls;
  346. (void)jarg1_;
  347. arg1 = *(ESLevent **)&jarg1;
  348. argp2 = *(esl_priority_t **)&jarg2;
  349. if (!argp2) {
  350. SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null esl_priority_t");
  351. return 0;
  352. }
  353. arg2 = *argp2;
  354. result = (bool)(arg1)->setPriority(arg2);
  355. jresult = (jboolean)result;
  356. return jresult;
  357. }
  358. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
  359. jstring jresult = 0 ;
  360. ESLevent *arg1 = (ESLevent *) 0 ;
  361. char *arg2 = (char *) 0 ;
  362. int arg3 = (int) -1 ;
  363. char *result = 0 ;
  364. (void)jenv;
  365. (void)jcls;
  366. (void)jarg1_;
  367. arg1 = *(ESLevent **)&jarg1;
  368. arg2 = 0;
  369. if (jarg2) {
  370. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  371. if (!arg2) return 0;
  372. }
  373. arg3 = (int)jarg3;
  374. result = (char *)(arg1)->getHeader((char const *)arg2,arg3);
  375. if (result) jresult = jenv->NewStringUTF((const char *)result);
  376. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  377. return jresult;
  378. }
  379. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getBody(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  380. jstring jresult = 0 ;
  381. ESLevent *arg1 = (ESLevent *) 0 ;
  382. char *result = 0 ;
  383. (void)jenv;
  384. (void)jcls;
  385. (void)jarg1_;
  386. arg1 = *(ESLevent **)&jarg1;
  387. result = (char *)(arg1)->getBody();
  388. if (result) jresult = jenv->NewStringUTF((const char *)result);
  389. return jresult;
  390. }
  391. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  392. jstring jresult = 0 ;
  393. ESLevent *arg1 = (ESLevent *) 0 ;
  394. char *result = 0 ;
  395. (void)jenv;
  396. (void)jcls;
  397. (void)jarg1_;
  398. arg1 = *(ESLevent **)&jarg1;
  399. result = (char *)(arg1)->getType();
  400. if (result) jresult = jenv->NewStringUTF((const char *)result);
  401. return jresult;
  402. }
  403. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1addBody(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  404. jboolean jresult = 0 ;
  405. ESLevent *arg1 = (ESLevent *) 0 ;
  406. char *arg2 = (char *) 0 ;
  407. bool result;
  408. (void)jenv;
  409. (void)jcls;
  410. (void)jarg1_;
  411. arg1 = *(ESLevent **)&jarg1;
  412. arg2 = 0;
  413. if (jarg2) {
  414. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  415. if (!arg2) return 0;
  416. }
  417. result = (bool)(arg1)->addBody((char const *)arg2);
  418. jresult = (jboolean)result;
  419. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  420. return jresult;
  421. }
  422. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1addHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  423. jboolean jresult = 0 ;
  424. ESLevent *arg1 = (ESLevent *) 0 ;
  425. char *arg2 = (char *) 0 ;
  426. char *arg3 = (char *) 0 ;
  427. bool result;
  428. (void)jenv;
  429. (void)jcls;
  430. (void)jarg1_;
  431. arg1 = *(ESLevent **)&jarg1;
  432. arg2 = 0;
  433. if (jarg2) {
  434. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  435. if (!arg2) return 0;
  436. }
  437. arg3 = 0;
  438. if (jarg3) {
  439. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  440. if (!arg3) return 0;
  441. }
  442. result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
  443. jresult = (jboolean)result;
  444. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  445. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  446. return jresult;
  447. }
  448. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1pushHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  449. jboolean jresult = 0 ;
  450. ESLevent *arg1 = (ESLevent *) 0 ;
  451. char *arg2 = (char *) 0 ;
  452. char *arg3 = (char *) 0 ;
  453. bool result;
  454. (void)jenv;
  455. (void)jcls;
  456. (void)jarg1_;
  457. arg1 = *(ESLevent **)&jarg1;
  458. arg2 = 0;
  459. if (jarg2) {
  460. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  461. if (!arg2) return 0;
  462. }
  463. arg3 = 0;
  464. if (jarg3) {
  465. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  466. if (!arg3) return 0;
  467. }
  468. result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3);
  469. jresult = (jboolean)result;
  470. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  471. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  472. return jresult;
  473. }
  474. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1unshiftHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  475. jboolean jresult = 0 ;
  476. ESLevent *arg1 = (ESLevent *) 0 ;
  477. char *arg2 = (char *) 0 ;
  478. char *arg3 = (char *) 0 ;
  479. bool result;
  480. (void)jenv;
  481. (void)jcls;
  482. (void)jarg1_;
  483. arg1 = *(ESLevent **)&jarg1;
  484. arg2 = 0;
  485. if (jarg2) {
  486. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  487. if (!arg2) return 0;
  488. }
  489. arg3 = 0;
  490. if (jarg3) {
  491. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  492. if (!arg3) return 0;
  493. }
  494. result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3);
  495. jresult = (jboolean)result;
  496. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  497. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  498. return jresult;
  499. }
  500. SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1delHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  501. jboolean jresult = 0 ;
  502. ESLevent *arg1 = (ESLevent *) 0 ;
  503. char *arg2 = (char *) 0 ;
  504. bool result;
  505. (void)jenv;
  506. (void)jcls;
  507. (void)jarg1_;
  508. arg1 = *(ESLevent **)&jarg1;
  509. arg2 = 0;
  510. if (jarg2) {
  511. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  512. if (!arg2) return 0;
  513. }
  514. result = (bool)(arg1)->delHeader((char const *)arg2);
  515. jresult = (jboolean)result;
  516. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  517. return jresult;
  518. }
  519. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1firstHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  520. jstring jresult = 0 ;
  521. ESLevent *arg1 = (ESLevent *) 0 ;
  522. char *result = 0 ;
  523. (void)jenv;
  524. (void)jcls;
  525. (void)jarg1_;
  526. arg1 = *(ESLevent **)&jarg1;
  527. result = (char *)(arg1)->firstHeader();
  528. if (result) jresult = jenv->NewStringUTF((const char *)result);
  529. return jresult;
  530. }
  531. SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1nextHeader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  532. jstring jresult = 0 ;
  533. ESLevent *arg1 = (ESLevent *) 0 ;
  534. char *result = 0 ;
  535. (void)jenv;
  536. (void)jcls;
  537. (void)jarg1_;
  538. arg1 = *(ESLevent **)&jarg1;
  539. result = (char *)(arg1)->nextHeader();
  540. if (result) jresult = jenv->NewStringUTF((const char *)result);
  541. return jresult;
  542. }
  543. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jstring jarg3, jstring jarg4) {
  544. jlong jresult = 0 ;
  545. char *arg1 = (char *) 0 ;
  546. int arg2 ;
  547. char *arg3 = (char *) 0 ;
  548. char *arg4 = (char *) 0 ;
  549. ESLconnection *result = 0 ;
  550. (void)jenv;
  551. (void)jcls;
  552. arg1 = 0;
  553. if (jarg1) {
  554. arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
  555. if (!arg1) return 0;
  556. }
  557. arg2 = (int)jarg2;
  558. arg3 = 0;
  559. if (jarg3) {
  560. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  561. if (!arg3) return 0;
  562. }
  563. arg4 = 0;
  564. if (jarg4) {
  565. arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
  566. if (!arg4) return 0;
  567. }
  568. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4);
  569. *(ESLconnection **)&jresult = result;
  570. if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  571. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  572. if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  573. return jresult;
  574. }
  575. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jstring jarg3) {
  576. jlong jresult = 0 ;
  577. char *arg1 = (char *) 0 ;
  578. int arg2 ;
  579. char *arg3 = (char *) 0 ;
  580. ESLconnection *result = 0 ;
  581. (void)jenv;
  582. (void)jcls;
  583. arg1 = 0;
  584. if (jarg1) {
  585. arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
  586. if (!arg1) return 0;
  587. }
  588. arg2 = (int)jarg2;
  589. arg3 = 0;
  590. if (jarg3) {
  591. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  592. if (!arg3) return 0;
  593. }
  594. result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3);
  595. *(ESLconnection **)&jresult = result;
  596. if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  597. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  598. return jresult;
  599. }
  600. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4) {
  601. jlong jresult = 0 ;
  602. char *arg1 = (char *) 0 ;
  603. char *arg2 = (char *) 0 ;
  604. char *arg3 = (char *) 0 ;
  605. char *arg4 = (char *) 0 ;
  606. ESLconnection *result = 0 ;
  607. (void)jenv;
  608. (void)jcls;
  609. arg1 = 0;
  610. if (jarg1) {
  611. arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
  612. if (!arg1) return 0;
  613. }
  614. arg2 = 0;
  615. if (jarg2) {
  616. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  617. if (!arg2) return 0;
  618. }
  619. arg3 = 0;
  620. if (jarg3) {
  621. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  622. if (!arg3) return 0;
  623. }
  624. arg4 = 0;
  625. if (jarg4) {
  626. arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
  627. if (!arg4) return 0;
  628. }
  629. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  630. *(ESLconnection **)&jresult = result;
  631. if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  632. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  633. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  634. if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  635. return jresult;
  636. }
  637. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
  638. jlong jresult = 0 ;
  639. char *arg1 = (char *) 0 ;
  640. char *arg2 = (char *) 0 ;
  641. char *arg3 = (char *) 0 ;
  642. ESLconnection *result = 0 ;
  643. (void)jenv;
  644. (void)jcls;
  645. arg1 = 0;
  646. if (jarg1) {
  647. arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
  648. if (!arg1) return 0;
  649. }
  650. arg2 = 0;
  651. if (jarg2) {
  652. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  653. if (!arg2) return 0;
  654. }
  655. arg3 = 0;
  656. if (jarg3) {
  657. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  658. if (!arg3) return 0;
  659. }
  660. result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3);
  661. *(ESLconnection **)&jresult = result;
  662. if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  663. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  664. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  665. return jresult;
  666. }
  667. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_new_1ESLconnection_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jint jarg1) {
  668. jlong jresult = 0 ;
  669. int arg1 ;
  670. ESLconnection *result = 0 ;
  671. (void)jenv;
  672. (void)jcls;
  673. arg1 = (int)jarg1;
  674. result = (ESLconnection *)new ESLconnection(arg1);
  675. *(ESLconnection **)&jresult = result;
  676. return jresult;
  677. }
  678. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLconnection(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  679. ESLconnection *arg1 = (ESLconnection *) 0 ;
  680. (void)jenv;
  681. (void)jcls;
  682. arg1 = *(ESLconnection **)&jarg1;
  683. delete arg1;
  684. }
  685. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1socketDescriptor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  686. jint jresult = 0 ;
  687. ESLconnection *arg1 = (ESLconnection *) 0 ;
  688. int result;
  689. (void)jenv;
  690. (void)jcls;
  691. (void)jarg1_;
  692. arg1 = *(ESLconnection **)&jarg1;
  693. result = (int)(arg1)->socketDescriptor();
  694. jresult = (jint)result;
  695. return jresult;
  696. }
  697. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1connected(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  698. jint jresult = 0 ;
  699. ESLconnection *arg1 = (ESLconnection *) 0 ;
  700. int result;
  701. (void)jenv;
  702. (void)jcls;
  703. (void)jarg1_;
  704. arg1 = *(ESLconnection **)&jarg1;
  705. result = (int)(arg1)->connected();
  706. jresult = (jint)result;
  707. return jresult;
  708. }
  709. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1getInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  710. jlong jresult = 0 ;
  711. ESLconnection *arg1 = (ESLconnection *) 0 ;
  712. ESLevent *result = 0 ;
  713. (void)jenv;
  714. (void)jcls;
  715. (void)jarg1_;
  716. arg1 = *(ESLconnection **)&jarg1;
  717. result = (ESLevent *)(arg1)->getInfo();
  718. *(ESLevent **)&jresult = result;
  719. return jresult;
  720. }
  721. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1send(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  722. jint jresult = 0 ;
  723. ESLconnection *arg1 = (ESLconnection *) 0 ;
  724. char *arg2 = (char *) 0 ;
  725. int result;
  726. (void)jenv;
  727. (void)jcls;
  728. (void)jarg1_;
  729. arg1 = *(ESLconnection **)&jarg1;
  730. arg2 = 0;
  731. if (jarg2) {
  732. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  733. if (!arg2) return 0;
  734. }
  735. result = (int)(arg1)->send((char const *)arg2);
  736. jresult = (jint)result;
  737. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  738. return jresult;
  739. }
  740. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1sendRecv(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  741. jlong jresult = 0 ;
  742. ESLconnection *arg1 = (ESLconnection *) 0 ;
  743. char *arg2 = (char *) 0 ;
  744. ESLevent *result = 0 ;
  745. (void)jenv;
  746. (void)jcls;
  747. (void)jarg1_;
  748. arg1 = *(ESLconnection **)&jarg1;
  749. arg2 = 0;
  750. if (jarg2) {
  751. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  752. if (!arg2) return 0;
  753. }
  754. result = (ESLevent *)(arg1)->sendRecv((char const *)arg2);
  755. *(ESLevent **)&jresult = result;
  756. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  757. return jresult;
  758. }
  759. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1api(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  760. jlong jresult = 0 ;
  761. ESLconnection *arg1 = (ESLconnection *) 0 ;
  762. char *arg2 = (char *) 0 ;
  763. char *arg3 = (char *) NULL ;
  764. ESLevent *result = 0 ;
  765. (void)jenv;
  766. (void)jcls;
  767. (void)jarg1_;
  768. arg1 = *(ESLconnection **)&jarg1;
  769. arg2 = 0;
  770. if (jarg2) {
  771. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  772. if (!arg2) return 0;
  773. }
  774. arg3 = 0;
  775. if (jarg3) {
  776. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  777. if (!arg3) return 0;
  778. }
  779. result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3);
  780. *(ESLevent **)&jresult = result;
  781. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  782. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  783. return jresult;
  784. }
  785. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1bgapi(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
  786. jlong jresult = 0 ;
  787. ESLconnection *arg1 = (ESLconnection *) 0 ;
  788. char *arg2 = (char *) 0 ;
  789. char *arg3 = (char *) NULL ;
  790. char *arg4 = (char *) NULL ;
  791. ESLevent *result = 0 ;
  792. (void)jenv;
  793. (void)jcls;
  794. (void)jarg1_;
  795. arg1 = *(ESLconnection **)&jarg1;
  796. arg2 = 0;
  797. if (jarg2) {
  798. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  799. if (!arg2) return 0;
  800. }
  801. arg3 = 0;
  802. if (jarg3) {
  803. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  804. if (!arg3) return 0;
  805. }
  806. arg4 = 0;
  807. if (jarg4) {
  808. arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
  809. if (!arg4) return 0;
  810. }
  811. result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4);
  812. *(ESLevent **)&jresult = result;
  813. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  814. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  815. if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  816. return jresult;
  817. }
  818. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1sendEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  819. jlong jresult = 0 ;
  820. ESLconnection *arg1 = (ESLconnection *) 0 ;
  821. ESLevent *arg2 = (ESLevent *) 0 ;
  822. ESLevent *result = 0 ;
  823. (void)jenv;
  824. (void)jcls;
  825. (void)jarg1_;
  826. (void)jarg2_;
  827. arg1 = *(ESLconnection **)&jarg1;
  828. arg2 = *(ESLevent **)&jarg2;
  829. result = (ESLevent *)(arg1)->sendEvent(arg2);
  830. *(ESLevent **)&jresult = result;
  831. return jresult;
  832. }
  833. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1sendMSG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
  834. jint jresult = 0 ;
  835. ESLconnection *arg1 = (ESLconnection *) 0 ;
  836. ESLevent *arg2 = (ESLevent *) 0 ;
  837. char *arg3 = (char *) NULL ;
  838. int result;
  839. (void)jenv;
  840. (void)jcls;
  841. (void)jarg1_;
  842. (void)jarg2_;
  843. arg1 = *(ESLconnection **)&jarg1;
  844. arg2 = *(ESLevent **)&jarg2;
  845. arg3 = 0;
  846. if (jarg3) {
  847. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  848. if (!arg3) return 0;
  849. }
  850. result = (int)(arg1)->sendMSG(arg2,(char const *)arg3);
  851. jresult = (jint)result;
  852. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  853. return jresult;
  854. }
  855. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1recvEvent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  856. jlong jresult = 0 ;
  857. ESLconnection *arg1 = (ESLconnection *) 0 ;
  858. ESLevent *result = 0 ;
  859. (void)jenv;
  860. (void)jcls;
  861. (void)jarg1_;
  862. arg1 = *(ESLconnection **)&jarg1;
  863. result = (ESLevent *)(arg1)->recvEvent();
  864. *(ESLevent **)&jresult = result;
  865. return jresult;
  866. }
  867. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1recvEventTimed(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  868. jlong jresult = 0 ;
  869. ESLconnection *arg1 = (ESLconnection *) 0 ;
  870. int arg2 ;
  871. ESLevent *result = 0 ;
  872. (void)jenv;
  873. (void)jcls;
  874. (void)jarg1_;
  875. arg1 = *(ESLconnection **)&jarg1;
  876. arg2 = (int)jarg2;
  877. result = (ESLevent *)(arg1)->recvEventTimed(arg2);
  878. *(ESLevent **)&jresult = result;
  879. return jresult;
  880. }
  881. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1filter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  882. jlong jresult = 0 ;
  883. ESLconnection *arg1 = (ESLconnection *) 0 ;
  884. char *arg2 = (char *) 0 ;
  885. char *arg3 = (char *) 0 ;
  886. ESLevent *result = 0 ;
  887. (void)jenv;
  888. (void)jcls;
  889. (void)jarg1_;
  890. arg1 = *(ESLconnection **)&jarg1;
  891. arg2 = 0;
  892. if (jarg2) {
  893. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  894. if (!arg2) return 0;
  895. }
  896. arg3 = 0;
  897. if (jarg3) {
  898. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  899. if (!arg3) return 0;
  900. }
  901. result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3);
  902. *(ESLevent **)&jresult = result;
  903. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  904. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  905. return jresult;
  906. }
  907. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1events(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
  908. jint jresult = 0 ;
  909. ESLconnection *arg1 = (ESLconnection *) 0 ;
  910. char *arg2 = (char *) 0 ;
  911. char *arg3 = (char *) 0 ;
  912. int result;
  913. (void)jenv;
  914. (void)jcls;
  915. (void)jarg1_;
  916. arg1 = *(ESLconnection **)&jarg1;
  917. arg2 = 0;
  918. if (jarg2) {
  919. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  920. if (!arg2) return 0;
  921. }
  922. arg3 = 0;
  923. if (jarg3) {
  924. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  925. if (!arg3) return 0;
  926. }
  927. result = (int)(arg1)->events((char const *)arg2,(char const *)arg3);
  928. jresult = (jint)result;
  929. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  930. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  931. return jresult;
  932. }
  933. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1execute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
  934. jlong jresult = 0 ;
  935. ESLconnection *arg1 = (ESLconnection *) 0 ;
  936. char *arg2 = (char *) 0 ;
  937. char *arg3 = (char *) NULL ;
  938. char *arg4 = (char *) NULL ;
  939. ESLevent *result = 0 ;
  940. (void)jenv;
  941. (void)jcls;
  942. (void)jarg1_;
  943. arg1 = *(ESLconnection **)&jarg1;
  944. arg2 = 0;
  945. if (jarg2) {
  946. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  947. if (!arg2) return 0;
  948. }
  949. arg3 = 0;
  950. if (jarg3) {
  951. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  952. if (!arg3) return 0;
  953. }
  954. arg4 = 0;
  955. if (jarg4) {
  956. arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
  957. if (!arg4) return 0;
  958. }
  959. result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4);
  960. *(ESLevent **)&jresult = result;
  961. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  962. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  963. if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  964. return jresult;
  965. }
  966. SWIGEXPORT jlong JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1executeAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
  967. jlong jresult = 0 ;
  968. ESLconnection *arg1 = (ESLconnection *) 0 ;
  969. char *arg2 = (char *) 0 ;
  970. char *arg3 = (char *) NULL ;
  971. char *arg4 = (char *) NULL ;
  972. ESLevent *result = 0 ;
  973. (void)jenv;
  974. (void)jcls;
  975. (void)jarg1_;
  976. arg1 = *(ESLconnection **)&jarg1;
  977. arg2 = 0;
  978. if (jarg2) {
  979. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  980. if (!arg2) return 0;
  981. }
  982. arg3 = 0;
  983. if (jarg3) {
  984. arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
  985. if (!arg3) return 0;
  986. }
  987. arg4 = 0;
  988. if (jarg4) {
  989. arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
  990. if (!arg4) return 0;
  991. }
  992. result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4);
  993. *(ESLevent **)&jresult = result;
  994. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  995. if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  996. if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  997. return jresult;
  998. }
  999. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1setAsyncExecute(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  1000. jint jresult = 0 ;
  1001. ESLconnection *arg1 = (ESLconnection *) 0 ;
  1002. char *arg2 = (char *) 0 ;
  1003. int result;
  1004. (void)jenv;
  1005. (void)jcls;
  1006. (void)jarg1_;
  1007. arg1 = *(ESLconnection **)&jarg1;
  1008. arg2 = 0;
  1009. if (jarg2) {
  1010. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  1011. if (!arg2) return 0;
  1012. }
  1013. result = (int)(arg1)->setAsyncExecute((char const *)arg2);
  1014. jresult = (jint)result;
  1015. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  1016. return jresult;
  1017. }
  1018. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1setEventLock(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  1019. jint jresult = 0 ;
  1020. ESLconnection *arg1 = (ESLconnection *) 0 ;
  1021. char *arg2 = (char *) 0 ;
  1022. int result;
  1023. (void)jenv;
  1024. (void)jcls;
  1025. (void)jarg1_;
  1026. arg1 = *(ESLconnection **)&jarg1;
  1027. arg2 = 0;
  1028. if (jarg2) {
  1029. arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
  1030. if (!arg2) return 0;
  1031. }
  1032. result = (int)(arg1)->setEventLock((char const *)arg2);
  1033. jresult = (jint)result;
  1034. if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  1035. return jresult;
  1036. }
  1037. SWIGEXPORT jint JNICALL Java_org_freeswitch_esl_eslJNI_ESLconnection_1disconnect(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  1038. jint jresult = 0 ;
  1039. ESLconnection *arg1 = (ESLconnection *) 0 ;
  1040. int result;
  1041. (void)jenv;
  1042. (void)jcls;
  1043. (void)jarg1_;
  1044. arg1 = *(ESLconnection **)&jarg1;
  1045. result = (int)(arg1)->disconnect();
  1046. jresult = (jint)result;
  1047. return jresult;
  1048. }
  1049. SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_eslSetLogLevel(JNIEnv *jenv, jclass jcls, jint jarg1) {
  1050. int arg1 ;
  1051. (void)jenv;
  1052. (void)jcls;
  1053. arg1 = (int)jarg1;
  1054. eslSetLogLevel(arg1);
  1055. }
  1056. #ifdef __cplusplus
  1057. }
  1058. #endif