IJniApi.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-07
  6. * Changed: 2023-04-11
  7. *
  8. * */
  9. #ifndef LS_STD_I_JNI_API_HPP
  10. #define LS_STD_I_JNI_API_HPP
  11. #include <jni.h>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <string>
  14. namespace ls::std::core::experimental::interface_type
  15. {
  16. class LS_STD_DYNAMIC_GOAL IJniApi
  17. {
  18. public:
  19. IJniApi();
  20. virtual ~IJniApi();
  21. virtual jboolean callBooleanMethod(jobject _javaObject, jmethodID _methodId) = 0;
  22. virtual jbyte callByteMethod(jobject _javaObject, jmethodID _methodId) = 0;
  23. virtual jchar callCharMethod(jobject _javaObject, jmethodID _methodId) = 0;
  24. virtual jdouble callDoubleMethod(jobject _javaObject, jmethodID _methodId) = 0;
  25. virtual jfloat callFloatMethod(jobject _javaObject, jmethodID _methodId) = 0;
  26. virtual jint callIntMethod(jobject _javaObject, jmethodID _methodId) = 0;
  27. virtual jlong callLongMethod(jobject _javaObject, jmethodID _methodId) = 0;
  28. virtual jshort callShortMethod(jobject _javaObject, jmethodID _methodId) = 0;
  29. virtual jclass findClass(const ::std::string &_classPath) = 0;
  30. virtual jmethodID getMethodId(jclass _javaClass, const char *_methodIdentifier, const char *_methodSignature) = 0;
  31. };
  32. }
  33. #endif