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 <memory> | 8 #include <memory> |
9 #include <set> | 9 #include <set> |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual void OnStartCharacteristicNotification() = 0; | 97 virtual void OnStartCharacteristicNotification() = 0; |
98 virtual void OnWriteGattDescriptorValue( | 98 virtual void OnWriteGattDescriptorValue( |
99 const std::vector<uint8_t>& value) = 0; | 99 const std::vector<uint8_t>& value) = 0; |
100 }; | 100 }; |
101 | 101 |
102 BluetoothLowEnergyWrapperFake(); | 102 BluetoothLowEnergyWrapperFake(); |
103 ~BluetoothLowEnergyWrapperFake() override; | 103 ~BluetoothLowEnergyWrapperFake() override; |
104 | 104 |
105 bool IsBluetoothLowEnergySupported() override; | 105 bool IsBluetoothLowEnergySupported() override; |
106 bool EnumerateKnownBluetoothLowEnergyDevices( | 106 bool EnumerateKnownBluetoothLowEnergyDevices( |
107 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 107 std::vector<std::unique_ptr<BluetoothLowEnergyDeviceInfo>>* devices, |
108 std::string* error) override; | 108 std::string* error) override; |
109 bool EnumerateKnownBluetoothLowEnergyGattServiceDevices( | 109 bool EnumerateKnownBluetoothLowEnergyGattServiceDevices( |
110 ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, | 110 std::vector<std::unique_ptr<BluetoothLowEnergyDeviceInfo>>* devices, |
111 std::string* error) override; | 111 std::string* error) override; |
112 bool EnumerateKnownBluetoothLowEnergyServices( | 112 bool EnumerateKnownBluetoothLowEnergyServices( |
113 const base::FilePath& device_path, | 113 const base::FilePath& device_path, |
114 ScopedVector<BluetoothLowEnergyServiceInfo>* services, | 114 std::vector<std::unique_ptr<BluetoothLowEnergyServiceInfo>>* services, |
115 std::string* error) override; | 115 std::string* error) override; |
116 HRESULT ReadCharacteristicsOfAService( | 116 HRESULT ReadCharacteristicsOfAService( |
117 base::FilePath& service_path, | 117 base::FilePath& service_path, |
118 const PBTH_LE_GATT_SERVICE service, | 118 const PBTH_LE_GATT_SERVICE service, |
119 std::unique_ptr<BTH_LE_GATT_CHARACTERISTIC>* out_included_characteristics, | 119 std::unique_ptr<BTH_LE_GATT_CHARACTERISTIC>* out_included_characteristics, |
120 USHORT* out_counts) override; | 120 USHORT* out_counts) override; |
121 HRESULT ReadDescriptorsOfACharacteristic( | 121 HRESULT ReadDescriptorsOfACharacteristic( |
122 base::FilePath& service_path, | 122 base::FilePath& service_path, |
123 const PBTH_LE_GATT_CHARACTERISTIC characteristic, | 123 const PBTH_LE_GATT_CHARACTERISTIC characteristic, |
124 std::unique_ptr<BTH_LE_GATT_DESCRIPTOR>* out_included_descriptors, | 124 std::unique_ptr<BTH_LE_GATT_DESCRIPTOR>* out_included_descriptors, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 BLEDevicesMap simulated_devices_; | 230 BLEDevicesMap simulated_devices_; |
231 Observer* observer_; | 231 Observer* observer_; |
232 GattCharacteristicObserverTable gatt_characteristic_observers_; | 232 GattCharacteristicObserverTable gatt_characteristic_observers_; |
233 GattCharacteristic* remembered_characteristic_; | 233 GattCharacteristic* remembered_characteristic_; |
234 }; | 234 }; |
235 | 235 |
236 } // namespace win | 236 } // namespace win |
237 } // namespace device | 237 } // namespace device |
238 | 238 |
239 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ | 239 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ |
OLD | NEW |