Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |
| 7 | 7 |
| 8 #include "device/bluetooth/bluetooth_export.h" | 8 #include "device/bluetooth/bluetooth_export.h" |
| 9 | 9 |
| 10 // This file is for enums and small types common to several | 10 // This file is for enums and small types common to several |
| 11 // parts of bluetooth. | 11 // parts of bluetooth. |
| 12 | 12 |
| 13 namespace device { | 13 namespace device { |
| 14 | 14 |
| 15 // Devices and adapters can support a number of transports, | 15 // Devices and adapters can support a number of transports, |
| 16 // and bluetooth hosts can scan for devices based on the | 16 // and bluetooth hosts can scan for devices based on the |
| 17 // transports they support. | 17 // transports they support. |
| 18 enum BluetoothTransport : uint8_t { | 18 enum BluetoothTransport : uint8_t { |
| 19 BLUETOOTH_TRANSPORT_INVALID = 0x00, | 19 BLUETOOTH_TRANSPORT_INVALID = 0x00, |
| 20 // Valid transports are given as a bitset. | 20 // Valid transports are given as a bitset. |
| 21 BLUETOOTH_TRANSPORT_CLASSIC = 0x01, | 21 BLUETOOTH_TRANSPORT_CLASSIC = 0x01, |
| 22 BLUETOOTH_TRANSPORT_LE = 0x02, | 22 BLUETOOTH_TRANSPORT_LE = 0x02, |
| 23 BLUETOOTH_TRANSPORT_DUAL = | 23 BLUETOOTH_TRANSPORT_DUAL = |
| 24 (BLUETOOTH_TRANSPORT_CLASSIC | BLUETOOTH_TRANSPORT_LE) | 24 (BLUETOOTH_TRANSPORT_CLASSIC | BLUETOOTH_TRANSPORT_LE) |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 // Possible values that may be returned by BluetoothDevice::GetDeviceType(), | |
| 28 // representing different types of bluetooth device that we support or are aware | |
| 29 // of decoded from the bluetooth class information. | |
| 30 enum class BluetoothDeviceType { | |
| 31 UNKNOWN, | |
|
fukino
2016/10/05 06:34:45
BLUETOOTH_DEVICE_TYPE_UNKNOWN is more consistent w
ortuno
2016/10/05 06:59:11
Makes sense. I think we added the prefix to Blueto
| |
| 32 COMPUTER, | |
| 33 PHONE, | |
| 34 MODEM, | |
| 35 AUDIO, | |
| 36 CAR_AUDIO, | |
| 37 VIDEO, | |
| 38 PERIPHERAL, | |
| 39 JOYSTICK, | |
| 40 GAMEPAD, | |
| 41 KEYBOARD, | |
| 42 MOUSE, | |
| 43 TABLET, | |
| 44 KEYBOARD_MOUSE_COMBO | |
| 45 }; | |
| 46 | |
| 27 } // namespace device | 47 } // namespace device |
| 28 | 48 |
| 29 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ | 49 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |
| OLD | NEW |