diff options
author | Sven Gothel <[email protected]> | 2020-07-17 06:39:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-07-17 06:39:13 +0200 |
commit | 54fca5fc8c04a979317b09ab799a4b9968415086 (patch) | |
tree | e83202355ac39ddaa0068f6cd1e21074b8fd7f36 /java/tinyb/dbus | |
parent | 01f42a0665a86558c5c7029ea1cf853a3c95f6c1 (diff) |
dbus java: Add minimalistic toString() implementation; direct_bt toString(): Add uuid for non-native-valid instance's impl.
Diffstat (limited to 'java/tinyb/dbus')
-rw-r--r-- | java/tinyb/dbus/DBusAdapter.java | 5 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusDevice.java | 5 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusGattCharacteristic.java | 5 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusGattDescriptor.java | 5 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusGattService.java | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/java/tinyb/dbus/DBusAdapter.java b/java/tinyb/dbus/DBusAdapter.java index b8866534..5a3760c1 100644 --- a/java/tinyb/dbus/DBusAdapter.java +++ b/java/tinyb/dbus/DBusAdapter.java @@ -235,4 +235,9 @@ public class DBusAdapter extends DBusObject implements BluetoothAdapter { super(instance); } + + @Override + public String toString() { + return "Adapter["+getAddress()+", '"+getName()+"']"; + } } diff --git a/java/tinyb/dbus/DBusDevice.java b/java/tinyb/dbus/DBusDevice.java index ac12d01e..023607ed 100644 --- a/java/tinyb/dbus/DBusDevice.java +++ b/java/tinyb/dbus/DBusDevice.java @@ -255,4 +255,9 @@ public class DBusDevice extends DBusObject implements BluetoothDevice ts_creation = BluetoothUtils.getCurrentMilliseconds(); } final long ts_creation; + + @Override + public String toString() { + return "Device[address["+getAddress()+", "+getAddressType()+"], '"+getName()+"']"; + } } diff --git a/java/tinyb/dbus/DBusGattCharacteristic.java b/java/tinyb/dbus/DBusGattCharacteristic.java index 6e1e0839..719d4369 100644 --- a/java/tinyb/dbus/DBusGattCharacteristic.java +++ b/java/tinyb/dbus/DBusGattCharacteristic.java @@ -114,4 +114,9 @@ public class DBusGattCharacteristic extends DBusObject implements BluetoothGattC public int removeAllCharacteristicListener() { return 0; // FIXME } + + @Override + public String toString() { + return "Characteristic[uuid "+getUUID()+"]"; + } } diff --git a/java/tinyb/dbus/DBusGattDescriptor.java b/java/tinyb/dbus/DBusGattDescriptor.java index 5c59ea8c..bbb9cf04 100644 --- a/java/tinyb/dbus/DBusGattDescriptor.java +++ b/java/tinyb/dbus/DBusGattDescriptor.java @@ -73,4 +73,9 @@ public class DBusGattDescriptor extends DBusObject implements BluetoothGattDescr { super(instance); } + + @Override + public String toString() { + return "Descriptor[uuid "+getUUID()+"]"; + } } diff --git a/java/tinyb/dbus/DBusGattService.java b/java/tinyb/dbus/DBusGattService.java index 092662a8..aead8e2f 100644 --- a/java/tinyb/dbus/DBusGattService.java +++ b/java/tinyb/dbus/DBusGattService.java @@ -77,4 +77,9 @@ public class DBusGattService extends DBusObject implements BluetoothGattService { super(instance); } + + @Override + public String toString() { + return "Service[uuid "+getUUID()+"]"; + } } |