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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ |
7 | 7 |
8 #include "device/bluetooth/bluetooth_low_energy_win.h" | 8 #include "device/bluetooth/bluetooth_low_energy_win.h" |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool EnumerateKnownBluetoothLowEnergyGattServiceDevices( | 74 bool EnumerateKnownBluetoothLowEnergyGattServiceDevices( |
75 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 75 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
76 std::string* error) override; | 76 std::string* error) override; |
77 bool EnumerateKnownBluetoothLowEnergyServices( | 77 bool EnumerateKnownBluetoothLowEnergyServices( |
78 const base::FilePath& device_path, | 78 const base::FilePath& device_path, |
79 ScopedVector<BluetoothLowEnergyServiceInfo>* services, | 79 ScopedVector<BluetoothLowEnergyServiceInfo>* services, |
80 std::string* error) override; | 80 std::string* error) override; |
81 | 81 |
82 BLEDevice* SimulateBLEDevice(std::string device_name, | 82 BLEDevice* SimulateBLEDevice(std::string device_name, |
83 BLUETOOTH_ADDRESS device_address); | 83 BLUETOOTH_ADDRESS device_address); |
| 84 BLEDevice* GetSimulatedBLEDevice(std::string device_address); |
84 BLEGattService* SimulateBLEGattService(BLEDevice* device, std::string uuid); | 85 BLEGattService* SimulateBLEGattService(BLEDevice* device, std::string uuid); |
85 | 86 |
86 private: | 87 private: |
87 // Generate an unique attribute handle on |device_address|. | 88 // Generate an unique attribute handle on |device_address|. |
88 USHORT GenerateAUniqueAttributeHandle(std::string device_address); | 89 USHORT GenerateAUniqueAttributeHandle(std::string device_address); |
89 | 90 |
90 // Generate device path for the BLE device with |device_address|. | 91 // Generate device path for the BLE device with |device_address|. |
91 base::string16 GenerateBLEDevicePath(std::string device_address); | 92 base::string16 GenerateBLEDevicePath(std::string device_address); |
92 | 93 |
93 // Generate GATT service device path of the service with | 94 // Generate GATT service device path of the service with |
(...skipping 21 matching lines...) Expand all Loading... |
115 | 116 |
116 // Table to store allocated attribute handle for a device. | 117 // Table to store allocated attribute handle for a device. |
117 BLEAttributeHandleTable attribute_handle_table_; | 118 BLEAttributeHandleTable attribute_handle_table_; |
118 BLEDevicesMap simulated_devices_; | 119 BLEDevicesMap simulated_devices_; |
119 }; | 120 }; |
120 | 121 |
121 } // namespace win | 122 } // namespace win |
122 } // namespace device | 123 } // namespace device |
123 | 124 |
124 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ | 125 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ |
OLD | NEW |