B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter: Difference between revisions

remove 'a' prefix for method parameters
(add start/stopAdvertising)
(remove 'a' prefix for method parameters)
 
Line 27: Line 27:
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#enable.28.29|enable()]];
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#enable.28.29|enable()]];
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#disable.28.29|disable()]];
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#disable.28.29|disable()]];
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setName.28.29|setName(DOMString aName)]];
   [NewObject, AvailableIn=CertifiedApps] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setName.28.29|setName(DOMString name)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setDiscoverable.28.29|setDiscoverable(boolean aDiscoverable)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setDiscoverable.28.29|setDiscoverable(boolean discoverable)]];
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startDiscovery.28.29|startDiscovery()]];
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startDiscovery.28.29|startDiscovery()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopDiscovery.28.29|stopDiscovery()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopDiscovery.28.29|stopDiscovery()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#pair.28.29|pair(DOMString aAddress)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#pair.28.29|pair(DOMString address)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#unpair.28.29|unpair(DOMString aAddress)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#unpair.28.29|unpair(DOMString address)]];
   sequence<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDevice|BluetoothDevice]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#getPairedDevices.28.29|getPairedDevices()]];
   sequence<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDevice|BluetoothDevice]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#getPairedDevices.28.29|getPairedDevices()]];
   
   
   // BLE methods
   // BLE methods
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startLeScan.28sequence.3CDOMString.3E_aServiceUuids.29|startLeScan(sequence<DOMString> aServiceUuids)]];
   [NewObject] Promise<[[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]]> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startLeScan.28sequence.3CDOMString.3E_serviceUuids.29|startLeScan(sequence<DOMString> aServiceUuids)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopLeScan.28BluetoothDiscoveryHandle_aDiscoveryHandle.29|stopLeScan(BluetoothDiscoveryHandle aDiscoveryHandle)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopLeScan.28BluetoothDiscoveryHandle_aDiscoveryHandle.29|stopLeScan(BluetoothDiscoveryHandle discoveryHandle)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startAdvertising.28optional_BluetoothAdvertisingData_advData.29|startAdvertising(optional BluetoothAdvertisingData advData)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startAdvertising.28optional_BluetoothAdvertisingData_advData.29|startAdvertising(optional BluetoothAdvertisingData advData)]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopAdvertising.28.29|stopAdvertising()]];
   [NewObject] Promise<void> [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopAdvertising.28.29|stopAdvertising()]];
Line 297: Line 297:
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#enable.28.29|BluetoothAdapter.enable()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#enable.28.29|BluetoothAdapter.enable()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#disable.28.29|BluetoothAdapter.disable()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#disable.28.29|BluetoothAdapter.disable()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setName.28DOMString_aName.29|BluetoothAdapter.setName(DOMString aName)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setName.28DOMString_aName.29|BluetoothAdapter.setName(DOMString name)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setDiscoverable.28boolean_aDiscoverable.29|BluetoothAdapter.setDiscoverable(boolean aDiscoverable)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#setDiscoverable.28boolean_aDiscoverable.29|BluetoothAdapter.setDiscoverable(boolean discoverable)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startDiscovery.28.29|BluetoothAdapter.startDiscovery()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startDiscovery.28.29|BluetoothAdapter.startDiscovery()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopDiscovery.28.29|BluetoothAdapter.stopDiscovery()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopDiscovery.28.29|BluetoothAdapter.stopDiscovery()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#pair.28DOMString_aDeviceAddress.29|BluetoothAdapter.pair(DOMString aDeviceAddress)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#pair.28DOMString_aDeviceAddress.29|BluetoothAdapter.pair(DOMString deviceAddress)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#unpair.28DOMString_aDeviceAddress.29|BluetoothAdapter.unpair(DOMString aDeviceAddress)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#unpair.28DOMString_aDeviceAddress.29|BluetoothAdapter.unpair(DOMString deviceAddress)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#getPairedDevices.28.29|BluetoothAdapter.getPairedDevices()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#getPairedDevices.28.29|BluetoothAdapter.getPairedDevices()]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startLeScan.28sequence.3CDOMString.3E_aServiceUuids.29|BluetoothAdapter.startLeScan(sequence<DOMString> aServiceUuids)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startLeScan.28sequence.3CDOMString.3E_aServiceUuids.29|BluetoothAdapter.startLeScan(sequence<DOMString> serviceUuids)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopLeScan.28BluetoothDiscoveryHandle_aDiscoveryHandle.29|BluetoothAdapter.stopLeScan(BluetoothDiscoveryHandle aDiscoveryHandle)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopLeScan.28BluetoothDiscoveryHandle_aDiscoveryHandle.29|BluetoothAdapter.stopLeScan(BluetoothDiscoveryHandle discoveryHandle)]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startAdvertising.28optional_BluetoothAdvertisingData_advData.29|startAdvertising(optional BluetoothAdvertisingData advData)]];
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#startAdvertising.28optional_BluetoothAdvertisingData_advData.29|startAdvertising(optional BluetoothAdvertisingData advData)]];
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopAdvertising.28.29|stopAdvertising()]];
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#stopAdvertising.28.29|stopAdvertising()]];
Line 346: Line 346:
  });
  });


=== setName(DOMString aName) ===
=== setName(DOMString name) ===


; Description
; Description
Line 353: Line 353:


; Parameters
; Parameters
: ''aName''
: ''name''
:: A DOMString representing the new name to set.
:: A DOMString representing the new name to set.


Line 369: Line 369:
  });
  });


=== setDiscoverable(boolean aDiscoverable) ===
=== setDiscoverable(boolean discoverable) ===


; Description
; Description
Line 376: Line 376:


; Parameters   
; Parameters   
: ''aDiscoverable''
: ''discoverable''
:: A boolean indicating if the device is discoverable (true) or not (false).  
:: A boolean indicating if the device is discoverable (true) or not (false).  


Line 434: Line 434:
  });
  });


=== pair(DOMString aDeviceAddress) ===
=== pair(DOMString deviceAddress) ===


; Description
; Description
Line 441: Line 441:


; Parameters
; Parameters
: ''aDeviceAddress''
: ''deviceAddress''
:: A DOMString object representing the address of the device to pair with.
:: A DOMString object representing the address of the device to pair with.


Line 456: Line 456:
  });
  });


=== unpair(DOMString aDeviceAddress) ===
=== unpair(DOMString deviceAddress) ===


; Description
; Description
Line 462: Line 462:


; Parameters
; Parameters
: ''aDeviceAddress''
: ''deviceAddress''
:: A DOMString object representing the address of the device to unpair from.
:: A DOMString object representing the address of the device to unpair from.


Line 482: Line 482:
  }
  }


=== startLeScan(sequence<DOMString> aServiceUuids) ===
=== startLeScan(sequence<DOMString> serviceUuids) ===


; Description
; Description
Line 488: Line 488:


; Parameters
; Parameters
: ''aServiceUuids''
: ''serviceUuids''
:: A DOMString array of service UUIDs to seek for.  Standardized service UUIDs are listed in [https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx here]. An empty array means to seek for devices advertising any service.
:: A DOMString array of service UUIDs to seek for.  Standardized service UUIDs are listed in [https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx here]. An empty array means to seek for devices advertising any service.


Line 517: Line 517:
  });
  });


=== stopLeScan(BluetoothDiscoveryHandle aDiscoveryHandle) ===
=== stopLeScan(BluetoothDiscoveryHandle discoveryHandle) ===


; Description
; Description
Line 523: Line 523:


; Parameters
; Parameters
: ''aDiscoveryHandle''
: ''discoveryHandle''
:: The [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]] of the ongoing scan to stop.
:: The [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle|BluetoothDiscoveryHandle]] of the ongoing scan to stop.


120

edits