aboutsummaryrefslogtreecommitdiffstats
path: root/java/jni
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2022-01-13 05:36:46 +0100
committerSven Gothel <[email protected]>2022-01-13 05:36:46 +0100
commitd9a3326e83951c9f1378ff53845c4193a798a352 (patch)
tree242622f7e8c335fdb08f8c7ba08de49dd058abf5 /java/jni
parent48ff06cd7a4ebe0e22f82ac949624130f66dcdd1 (diff)
Add BTAdapter::setServerConnSecurity(..)
Diffstat (limited to 'java/jni')
-rw-r--r--java/jni/direct_bt/DBTAdapter.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx
index 27e50b75..60db4b36 100644
--- a/java/jni/direct_bt/DBTAdapter.cxx
+++ b/java/jni/direct_bt/DBTAdapter.cxx
@@ -845,6 +845,18 @@ jboolean Java_jau_direct_1bt_DBTAdapter_setSecureConnections(JNIEnv *env, jobjec
return JNI_FALSE;
}
+void Java_jau_direct_1bt_DBTAdapter_setServerConnSecurityImpl(JNIEnv *env, jobject obj, jbyte jsec_level, jbyte jio_cap) {
+ try {
+ BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj);
+ jau::JavaGlobalObj::check(adapter->getJavaObject(), E_FILE_LINE);
+
+ adapter->setServerConnSecurity( to_BTSecurityLevel( static_cast<uint8_t>(jsec_level) ),
+ to_SMPIOCapability( static_cast<uint8_t>(jio_cap) ) );
+ } catch(...) {
+ rethrow_and_raise_java_exception(env);
+ }
+}
+
void Java_jau_direct_1bt_DBTAdapter_setSMPKeyPath(JNIEnv *env, jobject obj, jstring jpath) {
try {
BTAdapter *adapter = jau::getJavaUplinkObject<BTAdapter>(env, obj);