Module: BluetoothClassOfDeviceMapper

BluetoothClassOfDeviceMapper:

  • BluetoothClassOfDeviceMapper is a mapper that helps settings/bluetooth apps to decide the icon type. Since platform exposed the 'number' type for class of device(Major Service Classes, Major Device Classes, Minor Device Classes), the helper will map the input number to specific device type. And the decision is referenced from Baseband. (Assigned numbers for Baseband identifies the Inquiry Access codes and Class of Device/Service (CoD) fields.)[3] According to the specifications described, we define the device type in Gaia side entirely. And the naming of device type we given is also mapping to CSS style sheet.

  • [1] Bluetooth API v1, BluetoothDevice icon property: https://developer.mozilla.org/en-US/docs/Web/API/BluetoothDevice.icon

  • [2] Bluetooth API v2, BluetoothClassOfDevice object: https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/ BluetoothClassOfDevice
  • [3] Bluetooth Class of Device Reference: https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
  • We can update the mapper if the specifications Baseband is updated.
Source: