| 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; | |
| 118 bool connected; | 116 bool connected; |
| 119 }; | 117 }; |
| 120 | 118 |
| 121 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on | 119 // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on |
| 122 // this machine. In case of error, returns false and sets |error| with an error | 120 // this machine. In case of error, returns false and sets |error| with an error |
| 123 // message describing the problem. | 121 // message describing the problem. |
| 124 // Note: This function returns an error if Bluetooth Low Energy is not supported | 122 // Note: This function returns an error if Bluetooth Low Energy is not supported |
| 125 // on this Windows platform. | 123 // on this Windows platform. |
| 126 bool EnumerateKnownBluetoothLowEnergyDevices( | 124 bool EnumerateKnownBluetoothLowEnergyDevices( |
| 127 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 125 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
| 128 std::string* error); | 126 std::string* error); |
| 129 | 127 |
| 130 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( | 128 bool ExtractBluetoothAddressFromDeviceInstanceIdForTesting( |
| 131 const std::string& instance_id, | 129 const std::string& instance_id, |
| 132 BLUETOOTH_ADDRESS* btha, | 130 BLUETOOTH_ADDRESS* btha, |
| 133 std::string* error); | 131 std::string* error); |
| 134 | 132 |
| 135 } // namespace win | 133 } // namespace win |
| 136 } // namespace device | 134 } // namespace device |
| 137 | 135 |
| 138 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ | 136 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_H_ |
| OLD | NEW |