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