diff options
author | Sven Gothel <[email protected]> | 2021-10-29 05:15:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-10-29 05:15:46 +0200 |
commit | b01c83eb0102fc81fa03e0cef8adbfbf1bd432b9 (patch) | |
tree | 52d481906f3b55bb9683405b1bdd26658844ec5a /java/jni | |
parent | dfcc4c549e591992aee20fab1564d26ce3e4e17b (diff) |
BTAdapter::[get|set]SecureConnections*() align and complete on Java side
Diffstat (limited to 'java/jni')
-rw-r--r-- | java/jni/direct_bt/DBTAdapter.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx index a9898dbc..524f2064 100644 --- a/java/jni/direct_bt/DBTAdapter.cxx +++ b/java/jni/direct_bt/DBTAdapter.cxx @@ -888,6 +888,17 @@ jboolean Java_jau_direct_1bt_DBTAdapter_setPowered(JNIEnv *env, jobject obj, jbo return JNI_FALSE; } +jboolean Java_jau_direct_1bt_DBTAdapter_getSecureConnectionsEnabled(JNIEnv *env, jobject obj) { + try { + BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj); + jau::JavaGlobalObj::check(adapter->getJavaObject(), E_FILE_LINE); + return adapter->getSecureConnectionsEnabled() ? JNI_TRUE : JNI_FALSE; + } catch(...) { + rethrow_and_raise_java_exception(env); + } + return JNI_FALSE; +} + jboolean Java_jau_direct_1bt_DBTAdapter_setSecureConnections(JNIEnv *env, jobject obj, jboolean enable) { try { BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj); |