java_native_methods.h 4.4 KB

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