Error handling

This commit is contained in:
zakorgy 2016-04-06 16:31:29 +02:00 committed by Attila Dusnoki
parent b851045415
commit 27ad1437a1
8 changed files with 61 additions and 76 deletions

View file

@ -20,6 +20,7 @@ interface BluetoothRemoteGATTCharacteristic {
[Throws]
ByteString readValue();
//Promise<DataView> readValue();
[Throws]
void writeValue(sequence<octet> value);
//Promise<void> writeValue(BufferSource value);
//Promise<void> startNotifications();

View file

@ -12,6 +12,7 @@ interface BluetoothRemoteGATTDescriptor {
[Throws]
ByteString readValue();
//Promise<DataView> readValue();
[Throws]
void writeValue(sequence<octet> value);
//Promise<void> writeValue(BufferSource value);
};

View file

@ -8,10 +8,14 @@
interface BluetoothRemoteGATTServer {
readonly attribute BluetoothDevice device;
readonly attribute boolean connected;
[Throws]
BluetoothRemoteGATTServer connect();
[Throws]
void disconnect();
BluetoothRemoteGATTService? getPrimaryService((DOMString or unsigned long) service);
sequence<BluetoothRemoteGATTService>? getPrimaryServices(optional (DOMString or unsigned long) service);
[Throws]
BluetoothRemoteGATTService getPrimaryService((DOMString or unsigned long) service);
[Throws]
sequence<BluetoothRemoteGATTService> getPrimaryServices(optional (DOMString or unsigned long) service);
//Promise<BluetoothRemoteGATTService> getPrimaryService(BluetoothServiceUUID service);
//Promise<sequence<BluetoothRemoteGATTService>>getPrimaryServices(optional BluetoothServiceUUID service);
//Promise<BluetoothRemoteGATTServer> connect();

View file

@ -9,8 +9,10 @@ interface BluetoothRemoteGATTService {
readonly attribute BluetoothDevice device;
readonly attribute DOMString uuid;
readonly attribute boolean isPrimary;
BluetoothRemoteGATTCharacteristic? getCharacteristic((DOMString or unsigned long) characteristic);
sequence<BluetoothRemoteGATTCharacteristic>? getCharacteristics
[Throws]
BluetoothRemoteGATTCharacteristic getCharacteristic((DOMString or unsigned long) characteristic);
[Throws]
sequence<BluetoothRemoteGATTCharacteristic> getCharacteristics
(optional (DOMString or unsigned long) characteristic);
//Promise<BluetoothRemoteGATTCharacteristic>getCharacteristic(BluetoothCharacteristicUUID characteristic);
//Promise<sequence<BluetoothRemoteGATTCharacteristic>>