Luis Hector Chavez | 2256d98 | 2017-12-14 21:17:47 -0800 | [diff] [blame] | 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 | |
| 5 | #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |
| 6 | #define DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |
| 7 | |
| 8 | #include "device/bluetooth/bluetooth_export.h" |
| 9 | |
| 10 | // This file is for enums and small types common to several |
| 11 | // parts of bluetooth. |
| 12 | |
| 13 | namespace device { |
| 14 | |
| 15 | // Devices and adapters can support a number of transports, |
| 16 | // and bluetooth hosts can scan for devices based on the |
| 17 | // transports they support. |
| 18 | enum BluetoothTransport : uint8_t { |
| 19 | BLUETOOTH_TRANSPORT_INVALID = 0x00, |
| 20 | // Valid transports are given as a bitset. |
| 21 | BLUETOOTH_TRANSPORT_CLASSIC = 0x01, |
| 22 | BLUETOOTH_TRANSPORT_LE = 0x02, |
| 23 | BLUETOOTH_TRANSPORT_DUAL = |
| 24 | (BLUETOOTH_TRANSPORT_CLASSIC | BLUETOOTH_TRANSPORT_LE) |
| 25 | }; |
| 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, |
| 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 | |
| 47 | } // namespace device |
| 48 | |
| 49 | #endif // DEVICE_BLUETOOTH_BLUETOOTH_TYPES_H_ |