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

 
(7 intermediate revisions by the same user not shown)
Line 3: Line 3:


== Interface ==
== Interface ==
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#BluetoothClassOfDevice|BluetoothClassOfDevice]]
  [CheckPermissions="bluetooth"]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#BluetoothMajorServiceClass|BluetoothMajorServiceClass]]
* [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#BluetoothMajorDeviceClass|BluetoothMajorDeviceClass]]
 
=== BluetoothClassOfDevice ===
  [Func="Navigator::HasBluetoothSupport"]
  interface BluetoothClassOfDevice
  interface BluetoothClassOfDevice
  {
  {
   /**
   /**
     * The following constants are defined in bluetooth General Access Profile (GAP) specification.
     * The following constants are defined in Assigned Numbers of bluetooth General Access Profile (GAP) spec.
     * See https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband for more information.
     * See https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband for more information.
     */
     */
Line 40: Line 35:
   const octet UNCATEGORIZED = 0x1F;
   const octet UNCATEGORIZED = 0x1F;
   
   
   readonly attribute unsigned short majorServiceClass;
   readonly attribute unsigned short [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#majorServiceClass|majorServiceClass]];
   readonly attribute octet majorDeviceClass;
   readonly attribute octet [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#majorDeviceClass|majorDeviceClass]];
   readonly attribute octet minorDeviceClass;
   readonly attribute octet [[B2G/Bluetooth/WebBluetooth-v2/BluetoothClassOfDevice#minorDeviceClass|minorDeviceClass]];
  };
  };


Line 58: Line 53:


; Default value
; Default value
: LIMITED_DISCOVERABILITY(0x0001)
: 0x0


=== majorDeviceClass ===
=== majorDeviceClass ===
Line 78: Line 73:


; Default value
; Default value
: 0x00
: 0x0


== Reference ==
== Reference ==
[1] https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
[1] https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
Confirmed users
891

edits