diff options
author | Sven Gothel <[email protected]> | 2021-09-16 05:43:29 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-09-16 05:43:29 +0200 |
commit | 454980623432158c7a072ede23f28e422d8b4fe8 (patch) | |
tree | 757c3794468c575c982296ea10c424b1896ce823 /java/jni | |
parent | 4a3b6a4137d5c30e2d685bc3487e7e257cb0a71b (diff) |
Refine BTRole and add GATTRole, throughout BTAdapter, BTDevice (C++/Java) and BTGattHandler (C++) incl. well referenced API doc
Diffstat (limited to 'java/jni')
-rw-r--r-- | java/jni/direct_bt/DBTDevice.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/jni/direct_bt/DBTDevice.cxx b/java/jni/direct_bt/DBTDevice.cxx index a76c0e4d..13ef92c1 100644 --- a/java/jni/direct_bt/DBTDevice.cxx +++ b/java/jni/direct_bt/DBTDevice.cxx @@ -313,6 +313,17 @@ void Java_jau_direct_1bt_DBTDevice_deleteImpl(JNIEnv *env, jobject obj, jlong na } } +jbyte Java_jau_direct_1bt_DBTDevice_getRoleImpl(JNIEnv *env, jobject obj) +{ + try { + BTDevice *device = getJavaUplinkObject<BTDevice>(env, obj); + return (jbyte) number( device->getRole() ); + } catch(...) { + rethrow_and_raise_java_exception(env); + } + return (jbyte) number( BTRole::None ); +} + jbyte Java_jau_direct_1bt_DBTDevice_disconnectImpl(JNIEnv *env, jobject obj) { try { |