OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_LOW_ENERGY_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <setupapi.h> | 9 #include <setupapi.h> |
10 // #include <bthledef.h> | 10 // #include <bthledef.h> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 bool IsBluetoothLowEnergySupported(); | 106 bool IsBluetoothLowEnergySupported(); |
107 | 107 |
108 struct BluetoothLowEnergyDeviceInfo { | 108 struct BluetoothLowEnergyDeviceInfo { |
109 BluetoothLowEnergyDeviceInfo(); | 109 BluetoothLowEnergyDeviceInfo(); |
110 ~BluetoothLowEnergyDeviceInfo(); | 110 ~BluetoothLowEnergyDeviceInfo(); |
111 | 111 |
112 base::FilePath path; | 112 base::FilePath path; |
113 std::string id; | 113 std::string id; |
114 std::string friendly_name; | 114 std::string friendly_name; |
115 BLUETOOTH_ADDRESS address; | 115 BLUETOOTH_ADDRESS address; |
| 116 bool visible; |
| 117 bool authenticated; |
116 bool connected; | 118 bool connected; |
117 }; | 119 }; |
118 | 120 |
119 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on | 121 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on |
120 // this machine. In case of error, returns false and sets |error| with an error | 122 // this machine. In case of error, returns false and sets |error| with an error |
121 // message describing the problem. | 123 // message describing the problem. |
122 // Note: This function returns an error if Bluetooth Low Energy is not supported | 124 // Note: This function returns an error if Bluetooth Low Energy is not supported |
123 // on this Windows platform. | 125 // on this Windows platform. |
124 bool EnumerateKnownBluetoothLowEnergyDevices( | 126 bool EnumerateKnownBluetoothLowEnergyDevices( |
125 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 127 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
126 std::string* error); | 128 std::string* error); |
127 | 129 |
128 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( | 130 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( |
129 const std::string& instance_id, | 131 const std::string& instance_id, |
130 BLUETOOTH_ADDRESS* btha, | 132 BLUETOOTH_ADDRESS* btha, |
131 std::string* error); | 133 std::string* error); |
132 | 134 |
133 } // namespace win | 135 } // namespace win |
134 } // namespace device | 136 } // namespace device |
135 | 137 |
136 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ | 138 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ |
OLD | NEW |