summaryrefslogtreecommitdiffstats
path: root/java/tinyb
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-25 03:51:37 +0200
committerSven Gothel <[email protected]>2020-05-25 03:51:37 +0200
commit98fd49f1a5989dd2da466e0058daa626e6f51d58 (patch)
treed72c16fdf01ffb37ace6cc7b0bf2d4544861ec2f /java/tinyb
parent771ce6d37c05fec2fa7b573645ad745f34ad855b (diff)
Expose Whitelist (auto-)connect management to BluetoothAdapter.java, impl in DBTAdapter.java only at this point.
Instead of using the "string definition" of addressType, we introduce a universal BluetoothAddressType (java) which corresponds with BDAddressType (C++). BluetoothAddressType (java) supports a string conversion, which also accepts the D-Bus names "", "public" and "random" - as also used in TinyB. ++++ Further adds HCIWhitelistConnectType (java) representing the same C++ type.
Diffstat (limited to 'java/tinyb')
-rw-r--r--java/tinyb/dbus/DBusAdapter.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/java/tinyb/dbus/DBusAdapter.java b/java/tinyb/dbus/DBusAdapter.java
index 8666e8d3..b8866534 100644
--- a/java/tinyb/dbus/DBusAdapter.java
+++ b/java/tinyb/dbus/DBusAdapter.java
@@ -34,12 +34,14 @@ import java.util.List;
import java.util.UUID;
import org.tinyb.BluetoothAdapter;
+import org.tinyb.BluetoothAddressType;
import org.tinyb.BluetoothDevice;
import org.tinyb.AdapterStatusListener;
import org.tinyb.BluetoothException;
import org.tinyb.BluetoothManager;
import org.tinyb.BluetoothNotification;
import org.tinyb.BluetoothType;
+import org.tinyb.HCIWhitelistConnectType;
import org.tinyb.TransportType;
public class DBusAdapter extends DBusObject implements BluetoothAdapter
@@ -63,6 +65,30 @@ public class DBusAdapter extends DBusObject implements BluetoothAdapter
return find(name, address, 0);
}
+ @Override
+ public boolean isDeviceWhitelisted(final String address) {
+ return false; // FIXME
+ }
+
+ @Override
+ public boolean addDeviceToWhitelist(final String address, final BluetoothAddressType address_type,
+ final HCIWhitelistConnectType ctype,
+ final short min_interval, final short max_interval,
+ final short latency, final short timeout) {
+ return false; // FIXME
+ }
+
+ @Override
+ public boolean addDeviceToWhitelist(final String address, final BluetoothAddressType address_type,
+ final HCIWhitelistConnectType ctype) {
+ return false; // FIXME
+ }
+
+ @Override
+ public boolean removeDeviceFromWhitelist(final String address, final BluetoothAddressType address_type) {
+ return false; // FIXME
+ }
+
/* D-Bus method calls: */
@Override