bluetooth_common.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef DEVICE_BLUETOOTH_BLUETOOTH_COMMON_H_
  5. #define DEVICE_BLUETOOTH_BLUETOOTH_COMMON_H_
  6. #include "device/bluetooth/bluetooth_export.h"
  7. // This file is for enums and small types common to several
  8. // parts of bluetooth.
  9. namespace device {
  10. // Devices and adapters can support a number of transports,
  11. // and bluetooth hosts can scan for devices based on the
  12. // transports they support.
  13. enum BluetoothTransport : uint8_t {
  14. BLUETOOTH_TRANSPORT_INVALID = 0x00,
  15. // Valid transports are given as a bitset.
  16. BLUETOOTH_TRANSPORT_CLASSIC = 0x01,
  17. BLUETOOTH_TRANSPORT_LE = 0x02,
  18. BLUETOOTH_TRANSPORT_DUAL =
  19. (BLUETOOTH_TRANSPORT_CLASSIC | BLUETOOTH_TRANSPORT_LE)
  20. };
  21. // Possible values that may be returned by BluetoothDevice::GetDeviceType(),
  22. // representing different types of bluetooth device that we support or are aware
  23. // of decoded from the bluetooth class information. These values are persisted
  24. // to logs. Entries should not be renumbered and numeric values should never be
  25. // reused.
  26. enum class BluetoothDeviceType {
  27. UNKNOWN = 0,
  28. COMPUTER = 1,
  29. PHONE = 2,
  30. MODEM = 3,
  31. AUDIO = 4,
  32. CAR_AUDIO = 5,
  33. VIDEO = 6,
  34. PERIPHERAL = 7,
  35. JOYSTICK = 8,
  36. GAMEPAD = 9,
  37. KEYBOARD = 10,
  38. MOUSE = 11,
  39. TABLET = 12,
  40. KEYBOARD_MOUSE_COMBO = 13,
  41. kMaxValue = KEYBOARD_MOUSE_COMBO
  42. };
  43. } // namespace device
  44. #endif // DEVICE_BLUETOOTH_BLUETOOTH_COMMON_H_