diff options
author | Sven Gothel <[email protected]> | 2020-05-25 21:34:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-25 21:34:38 +0200 |
commit | 3021035aa42a8d8075615e5159e9ebd2d70b58ae (patch) | |
tree | c67a827f4e10229665d793ebd93378ca023fdd74 /java/jni | |
parent | 589e2718189a4501c3611cbceffc3a90d2ff7ef5 (diff) |
DBTDevice/HCIComm: More 'snappy' connect method names and drop unused LE min/max ce_len,filter params
Show device on connection failure.
Diffstat (limited to 'java/jni')
-rw-r--r-- | java/jni/direct_bt/DBTAdapter.cxx | 2 | ||||
-rw-r--r-- | java/jni/direct_bt/DBTDevice.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/java/jni/direct_bt/DBTAdapter.cxx b/java/jni/direct_bt/DBTAdapter.cxx index cdca300d..73cf8534 100644 --- a/java/jni/direct_bt/DBTAdapter.cxx +++ b/java/jni/direct_bt/DBTAdapter.cxx @@ -586,7 +586,7 @@ jobject Java_direct_1bt_tinyb_DBTAdapter_connectDevice(JNIEnv *env, jobject obj, std::shared_ptr<JavaAnonObj> jDeviceRef = device->getJavaObject(); JavaGlobalObj::check(jDeviceRef, E_FILE_LINE); - device->connectHCIDefault(); + device->connectDefault(); return JavaGlobalObj::GetObject(jDeviceRef); } } catch(...) { diff --git a/java/jni/direct_bt/DBTDevice.cxx b/java/jni/direct_bt/DBTDevice.cxx index 073b1ee0..6968581e 100644 --- a/java/jni/direct_bt/DBTDevice.cxx +++ b/java/jni/direct_bt/DBTDevice.cxx @@ -291,7 +291,7 @@ jboolean Java_direct_1bt_tinyb_DBTDevice_connectImpl(JNIEnv *env, jobject obj) try { DBTDevice *device = getInstance<DBTDevice>(env, obj); JavaGlobalObj::check(device->getJavaObject(), E_FILE_LINE); - uint16_t hciHandle = device->connectHCIDefault(); + uint16_t hciHandle = device->connectDefault(); if( 0 == hciHandle ) { return JNI_FALSE; } @@ -326,15 +326,15 @@ jboolean Java_direct_1bt_tinyb_DBTDevice_connectImpl(JNIEnv *env, jobject obj, uint16_t hciHandle; switch( device->addressType ) { case BDAddressType::BDADDR_LE_PUBLIC: - hciHandle = device->le_connectHCI(HCIAddressType::HCIADDR_LE_PUBLIC, HCIAddressType::HCIADDR_LE_PUBLIC, - interval, window, min_interval, max_interval, latency, timeout); + hciHandle = device->connectLE(HCIAddressType::HCIADDR_LE_PUBLIC, HCIAddressType::HCIADDR_LE_PUBLIC, + interval, window, min_interval, max_interval, latency, timeout); break; case BDAddressType::BDADDR_LE_RANDOM: - hciHandle = device->le_connectHCI(HCIAddressType::HCIADDR_LE_RANDOM, HCIAddressType::HCIADDR_LE_PUBLIC, - interval, window, min_interval, max_interval, latency, timeout); + hciHandle = device->connectLE(HCIAddressType::HCIADDR_LE_RANDOM, HCIAddressType::HCIADDR_LE_PUBLIC, + interval, window, min_interval, max_interval, latency, timeout); break; default: - hciHandle = device->connectHCIDefault(); + hciHandle = device->connectDefault(); break; } if( 0 == hciHandle ) { |