diff options
Diffstat (limited to 'java/tinyb')
-rw-r--r-- | java/tinyb/dbus/DBusAdapter.java | 10 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusDevice.java | 17 | ||||
-rw-r--r-- | java/tinyb/dbus/DBusGattCharacteristic.java | 13 |
3 files changed, 38 insertions, 2 deletions
diff --git a/java/tinyb/dbus/DBusAdapter.java b/java/tinyb/dbus/DBusAdapter.java index 2a46f4c7..5b4b26fb 100644 --- a/java/tinyb/dbus/DBusAdapter.java +++ b/java/tinyb/dbus/DBusAdapter.java @@ -149,8 +149,8 @@ public class DBusAdapter extends DBusObject implements BluetoothAdapter public native boolean getDiscovering(); @Override - public boolean addStatusListener(final AdapterStatusListener l) { - throw new UnsupportedOperationException(); // FIXME + public boolean addStatusListener(final AdapterStatusListener l, final BluetoothDevice deviceMatch) { + return false; // FIXME } @Override @@ -159,6 +159,11 @@ public class DBusAdapter extends DBusObject implements BluetoothAdapter } @Override + public int removeAllStatusListener() { + return 0; // FIXME + } + + @Override public native void enableDiscoveringNotifications(BluetoothNotification<Boolean> callback); @Override @@ -179,6 +184,7 @@ public class DBusAdapter extends DBusObject implements BluetoothAdapter setDiscoveryFilter(uuidsFmt, rssi, pathloss, transportType.ordinal()); } + @SuppressWarnings("unchecked") public void setRssiDiscoveryFilter(final int rssi) { setDiscoveryFilter(Collections.EMPTY_LIST, rssi, 0, TransportType.AUTO); } diff --git a/java/tinyb/dbus/DBusDevice.java b/java/tinyb/dbus/DBusDevice.java index f01bd9e1..fbbebc62 100644 --- a/java/tinyb/dbus/DBusDevice.java +++ b/java/tinyb/dbus/DBusDevice.java @@ -33,10 +33,12 @@ import java.util.Map; import org.tinyb.BluetoothDevice; import org.tinyb.BluetoothException; +import org.tinyb.BluetoothGattCharacteristic; import org.tinyb.BluetoothGattService; import org.tinyb.BluetoothManager; import org.tinyb.BluetoothNotification; import org.tinyb.BluetoothType; +import org.tinyb.GATTCharacteristicListener; public class DBusDevice extends DBusObject implements BluetoothDevice { @@ -202,6 +204,21 @@ public class DBusDevice extends DBusObject implements BluetoothDevice @Override public native void disableServicesResolvedNotifications(); + @Override + public boolean addCharacteristicListener(final GATTCharacteristicListener listener, final BluetoothGattCharacteristic characteristicMatch) { + return false; // FIXME + } + + @Override + public boolean removeCharacteristicListener(final GATTCharacteristicListener l) { + return false; // FIXME + } + + @Override + public int removeAllCharacteristicListener() { + return 0; // FIXME + } + private native void delete(); private DBusDevice(final long instance) diff --git a/java/tinyb/dbus/DBusGattCharacteristic.java b/java/tinyb/dbus/DBusGattCharacteristic.java index 3ca5ab93..6e1e0839 100644 --- a/java/tinyb/dbus/DBusGattCharacteristic.java +++ b/java/tinyb/dbus/DBusGattCharacteristic.java @@ -37,6 +37,7 @@ import org.tinyb.BluetoothGattService; import org.tinyb.BluetoothManager; import org.tinyb.BluetoothNotification; import org.tinyb.BluetoothType; +import org.tinyb.GATTCharacteristicListener; public class DBusGattCharacteristic extends DBusObject implements BluetoothGattCharacteristic { @@ -101,4 +102,16 @@ public class DBusGattCharacteristic extends DBusObject implements BluetoothGattC { super(instance); } + @Override + public boolean addCharacteristicListener(final GATTCharacteristicListener listener) { + return false; // FIXME + } + @Override + public boolean removeCharacteristicListener(final GATTCharacteristicListener l) { + return false; // FIXME + } + @Override + public int removeAllCharacteristicListener() { + return 0; // FIXME + } } |