Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
26 #include "jau_direct_bt_DBTNativeDownlink.h"
41 JavaUplink *javaUplink = castInstance<JavaUplink>(nativeInstance);
44 if(
nullptr == javaClazz ) {
47 jmethodID mNotifyDeleted =
search_method(env, javaClazz,
"notifyDeleted",
"()V",
false);
49 if(
nullptr == mNotifyDeleted ) {
54 DBG_JNI_PRINT(
"Java_jau_direct_1bt_DBTNativeDownlink_initNativeJavaObject %p -> %s", javaUplink, javaUplink->
toString().c_str());
64 JavaUplink *javaUplink = castInstance<JavaUplink>(nativeInstance);
65 DBG_JNI_PRINT(
"Java_jau_direct_1bt_DBTNativeDownlink_deleteNativeJavaObject %p -> %s", javaUplink, javaUplink->
toString().c_str());
void setJavaObject(std::shared_ptr< JavaAnon > objRef) noexcept
Assigns a new shared JavaAnon reference, replaced item might be deleted via JNI from dtor.
std::shared_ptr< JavaAnon > getJavaObject() noexcept
virtual std::string toString() const noexcept
#define DBG_JNI_PRINT(...)
Use for environment-variable environment::DEBUG_JNI conditional debug messages, prefix '[elapsed_time...
void Java_jau_direct_1bt_DBTNativeDownlink_deleteNativeJavaObject(JNIEnv *env, jobject obj, jlong nativeInstance)
jclass search_class(JNIEnv *env, const char *clazz_name)
void java_exception_check_and_throw(JNIEnv *env, const char *file, int line)
Throws a C++ exception if a java exception occurred, otherwise do nothing.
jmethodID search_method(JNIEnv *env, jclass clazz, const char *method_name, const char *prototype, bool is_static)
void Java_jau_direct_1bt_DBTNativeDownlink_initNativeJavaObject(JNIEnv *env, jobject obj, jlong nativeInstance)
#define rethrow_and_raise_java_exception(E)
Re-throw current exception and raise respective java exception using any matching function above.
Implementation for JavaAnon, by simply wrapping a JNIGlobalRef instance.
Sharing the anonymous Java object (JavaAnon), i.e.