diff options
Diffstat (limited to 'java/jni/helper.cxx')
-rw-r--r-- | java/jni/helper.cxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/java/jni/helper.cxx b/java/jni/helper.cxx index 3ae6acea..9987ae3e 100644 --- a/java/jni/helper.cxx +++ b/java/jni/helper.cxx @@ -183,6 +183,31 @@ tinyb::BluetoothType from_int_to_btype(int type) return result; } +tinyb::TransportType from_int_to_transport_type(int type) +{ + tinyb::TransportType result = tinyb::TransportType::AUTO; + + switch (type) + { + case 0: + result = tinyb::TransportType::AUTO; + break; + + case 1: + result = tinyb::TransportType::BREDR; + break; + + case 2: + result = tinyb::TransportType::LE; + break; + + default: + result = tinyb::TransportType::AUTO; + break; + } + + return result; +} jobject get_bluetooth_type(JNIEnv *env, const char *field_name) { |