| 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 #include "device/bluetooth/bluetooth_low_energy_win_fake.h" | 5 #include "device/bluetooth/bluetooth_low_energy_win_fake.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 | 8 |
| 9 namespace { | 9 namespace { |
| 10 const char kPlatformNotSupported[] = | 10 const char kPlatformNotSupported[] = |
| 11 "Bluetooth Low energy is only supported on Windows 8 and later."; | 11 "Bluetooth Low energy is only supported on Windows 8 and later."; |
| 12 } // namespace | 12 } // namespace |
| 13 | 13 |
| 14 namespace device { | 14 namespace device { |
| 15 namespace win { | 15 namespace win { |
| 16 | 16 |
| 17 BLEDevice::BLEDevice() {} |
| 18 BLEDevice::~BLEDevice() {} |
| 19 |
| 20 BLEGattService::BLEGattService() {} |
| 21 BLEGattService::~BLEGattService() {} |
| 22 |
| 23 BLEGattCharacteristic::BLEGattCharacteristic() {} |
| 24 BLEGattCharacteristic::~BLEGattCharacteristic() {} |
| 25 |
| 26 BLEGattDescriptor::BLEGattDescriptor() {} |
| 27 BLEGattDescriptor::~BLEGattDescriptor() {} |
| 28 |
| 17 BluetoothLowEnergyWrapperFake::BluetoothLowEnergyWrapperFake() {} | 29 BluetoothLowEnergyWrapperFake::BluetoothLowEnergyWrapperFake() {} |
| 18 BluetoothLowEnergyWrapperFake::~BluetoothLowEnergyWrapperFake() {} | 30 BluetoothLowEnergyWrapperFake::~BluetoothLowEnergyWrapperFake() {} |
| 19 | 31 |
| 20 bool BluetoothLowEnergyWrapperFake::EnumerateKnownBluetoothLowEnergyDevices( | 32 bool BluetoothLowEnergyWrapperFake::EnumerateKnownBluetoothLowEnergyDevices( |
| 21 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 33 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
| 22 std::string* error) { | 34 std::string* error) { |
| 23 if (!IsBluetoothLowEnergySupported()) { | 35 if (!IsBluetoothLowEnergySupported()) { |
| 24 *error = kPlatformNotSupported; | 36 *error = kPlatformNotSupported; |
| 25 return false; | 37 return false; |
| 26 } | 38 } |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 std::string BluetoothLowEnergyWrapperFake::BluetoothAddressToCanonicalString( | 230 std::string BluetoothLowEnergyWrapperFake::BluetoothAddressToCanonicalString( |
| 219 const BLUETOOTH_ADDRESS& btha) { | 231 const BLUETOOTH_ADDRESS& btha) { |
| 220 std::string result = base::StringPrintf( | 232 std::string result = base::StringPrintf( |
| 221 "%02X:%02X:%02X:%02X:%02X:%02X", btha.rgBytes[5], btha.rgBytes[4], | 233 "%02X:%02X:%02X:%02X:%02X:%02X", btha.rgBytes[5], btha.rgBytes[4], |
| 222 btha.rgBytes[3], btha.rgBytes[2], btha.rgBytes[1], btha.rgBytes[0]); | 234 btha.rgBytes[3], btha.rgBytes[2], btha.rgBytes[1], btha.rgBytes[0]); |
| 223 return result; | 235 return result; |
| 224 } | 236 } |
| 225 | 237 |
| 226 } // namespace win | 238 } // namespace win |
| 227 } // namespace device | 239 } // namespace device |
| OLD | NEW |