Implementation of the getPrimaryService(s), the getCharacteristic(s) and the getDescriptor(s) functions.

This commit is contained in:
fokinv 2016-03-31 10:35:24 +02:00 committed by Attila Dusnoki
parent 9825ea41b4
commit b01c52c18f
9 changed files with 411 additions and 59 deletions

View file

@ -10,7 +10,10 @@ interface BluetoothRemoteGATTCharacteristic {
readonly attribute DOMString uuid;
readonly attribute BluetoothCharacteristicProperties properties;
readonly attribute ByteString? value;
BluetoothRemoteGATTDescriptor? getDescriptor(/*BluetoothDescriptorUUID descriptor*/);
[Throws]
BluetoothRemoteGATTDescriptor getDescriptor((DOMString or unsigned long) descriptor);
[Throws]
sequence<BluetoothRemoteGATTDescriptor> getDescriptors(optional (DOMString or unsigned long) descriptor);
//Promise<BluetoothRemoteGATTDescriptor> getDescriptor(BluetoothDescriptorUUID descriptor);
//Promise<sequence<BluetoothRemoteGATTDescriptor>>
//getDescriptors(optional BluetoothDescriptorUUID descriptor);

View file

@ -10,7 +10,8 @@ interface BluetoothRemoteGATTServer {
readonly attribute boolean connected;
BluetoothRemoteGATTServer connect();
void disconnect();
BluetoothRemoteGATTService? getPrimaryService();
BluetoothRemoteGATTService? getPrimaryService((DOMString or unsigned long) service);
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,7 +9,9 @@ interface BluetoothRemoteGATTService {
readonly attribute BluetoothDevice device;
readonly attribute DOMString uuid;
readonly attribute boolean isPrimary;
BluetoothRemoteGATTCharacteristic? getCharacteristic(/*DOMString characteristic*/);
BluetoothRemoteGATTCharacteristic? getCharacteristic((DOMString or unsigned long) characteristic);
sequence<BluetoothRemoteGATTCharacteristic>? getCharacteristics
(optional (DOMString or unsigned long) characteristic);
//Promise<BluetoothRemoteGATTCharacteristic>getCharacteristic(BluetoothCharacteristicUUID characteristic);
//Promise<sequence<BluetoothRemoteGATTCharacteristic>>
//getCharacteristics(optional BluetoothCharacteristicUUID characteristic);