diff options
author | Sven Gothel <[email protected]> | 2020-05-28 06:06:46 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-28 06:06:46 +0200 |
commit | 9f91fa9a33a35a893555e68a761db5a600d96867 (patch) | |
tree | 7884010c54e9b78b2fd19196a88f83092aede945 /java/tinyb/dbus/DBusDevice.java | |
parent | 1da27ac4831a6ae64e059ec29eb186e653a1a4e5 (diff) |
DBTDevice/BluetoothDevice: Expose getCreationTimestamp() and add BluetoothAddressType getAddressType()
Diffstat (limited to 'java/tinyb/dbus/DBusDevice.java')
-rw-r--r-- | java/tinyb/dbus/DBusDevice.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/java/tinyb/dbus/DBusDevice.java b/java/tinyb/dbus/DBusDevice.java index bc57d063..735ca79f 100644 --- a/java/tinyb/dbus/DBusDevice.java +++ b/java/tinyb/dbus/DBusDevice.java @@ -31,6 +31,7 @@ package tinyb.dbus; import java.util.List; import java.util.Map; +import org.tinyb.BluetoothAddressType; import org.tinyb.BluetoothDevice; import org.tinyb.BluetoothException; import org.tinyb.BluetoothGattCharacteristic; @@ -38,11 +39,15 @@ import org.tinyb.BluetoothGattService; import org.tinyb.BluetoothManager; import org.tinyb.BluetoothNotification; import org.tinyb.BluetoothType; +import org.tinyb.BluetoothUtils; import org.tinyb.GATTCharacteristicListener; public class DBusDevice extends DBusObject implements BluetoothDevice { @Override + public final long getCreationTimestamp() { return ts_creation; } + + @Override public native BluetoothType getBluetoothType(); @Override public native DBusDevice clone(); @@ -100,6 +105,9 @@ public class DBusDevice extends DBusObject implements BluetoothDevice public native String getAddress(); @Override + public BluetoothAddressType getAddressType() { return BluetoothAddressType.BDADDR_LE_PUBLIC; /* FIXME */} + + @Override public native String getName(); @Override @@ -231,6 +239,7 @@ public class DBusDevice extends DBusObject implements BluetoothDevice private DBusDevice(final long instance) { super(instance); + ts_creation = BluetoothUtils.getCurrentMilliseconds(); } - + final long ts_creation; } |