2
0

java_native_methods.h 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /**
  2. * $Id$
  3. *
  4. * Copyright (C) 2013 Konstantin Mosesov
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * This file is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. *
  14. * This file is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. */
  24. #ifndef __JAVA_NATIVE_METHODS_H__
  25. #define __JAVA_NATIVE_METHODS_H__
  26. #include "../../str.h"
  27. #include "../../sr_module.h"
  28. #include <jni.h>
  29. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1ERR(JNIEnv *, jobject, jstring);
  30. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1WARN(JNIEnv *, jobject, jstring);
  31. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1NOTICE(JNIEnv *, jobject, jstring);
  32. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1INFO(JNIEnv *, jobject, jstring);
  33. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1DBG(JNIEnv *, jobject, jstring);
  34. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1CRIT(JNIEnv *, jobject, jstring);
  35. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1ALERT(JNIEnv *, jobject, jstring);
  36. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1GEN1(JNIEnv *, jobject, jint, jstring);
  37. JNIEXPORT void JNICALL Java_org_siprouter_NativeMethods_LM_1GEN2(JNIEnv *, jobject, jint, jint, jstring);
  38. JNIEXPORT jint JNICALL Java_org_siprouter_NativeMethods_KamExec(JNIEnv *, jobject, jstring, jobjectArray);
  39. int KamExec(JNIEnv *, char *, int, char **);
  40. JNIEXPORT jobject JNICALL Java_org_siprouter_SipMsg_ParseSipMsg(JNIEnv *, jobject);
  41. JNIEXPORT jstring JNICALL Java_org_siprouter_SipMsg_getMsgType(JNIEnv *, jobject);
  42. JNIEXPORT jstring JNICALL Java_org_siprouter_SipMsg_getStatus(JNIEnv *, jobject);
  43. JNIEXPORT jstring JNICALL Java_org_siprouter_SipMsg_getRURI(JNIEnv *, jobject);
  44. JNIEXPORT jobject JNICALL Java_org_siprouter_SipMsg_getSrcAddress(JNIEnv *, jobject);
  45. JNIEXPORT jobject JNICALL Java_org_siprouter_SipMsg_getDstAddress(JNIEnv *, jobject);
  46. JNIEXPORT jstring JNICALL Java_org_siprouter_SipMsg_getBuffer(JNIEnv *, jobject);
  47. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  48. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  49. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_seturi(JNIEnv *, jobject, jstring);
  50. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_rewriteuri(JNIEnv *, jobject, jstring);
  51. jint cf_seturi(JNIEnv *, jobject, jstring, char *);
  52. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  53. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  54. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_add_1local_1rport(JNIEnv *, jobject);
  55. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_append_1branch(JNIEnv *, jobject, jstring);
  56. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_drop(JNIEnv *, jobject);
  57. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_force_1rport(JNIEnv *, jobject);
  58. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_add_1rport(JNIEnv *, jobject);
  59. jint cf_force_rport(JNIEnv *, jobject, char *);
  60. // not confirmed as working
  61. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_force_1send_1socket(JNIEnv *, jobject, jstring, jint);
  62. // not confirmed as working
  63. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_forward(JNIEnv *, jobject, jstring, jint);
  64. JNIEXPORT jboolean JNICALL Java_org_siprouter_CoreMethods_isflagset(JNIEnv *, jobject, jint);
  65. JNIEXPORT void JNICALL Java_org_siprouter_CoreMethods_setflag(JNIEnv *, jobject, jint);
  66. JNIEXPORT void JNICALL Java_org_siprouter_CoreMethods_resetflag(JNIEnv *, jobject, jint);
  67. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_revert_1uri(JNIEnv *, jobject);
  68. JNIEXPORT jint JNICALL Java_org_siprouter_CoreMethods_route(JNIEnv *, jobject, jobject);
  69. #endif