| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_BLUETOOTH_TEST_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Simulates GattConnection disconnecting. | 122 // Simulates GattConnection disconnecting. |
| 123 virtual void SimulateGattDisconnection(BluetoothDevice* device) {} | 123 virtual void SimulateGattDisconnection(BluetoothDevice* device) {} |
| 124 | 124 |
| 125 // Simulates success of discovering services. |uuids| is used to create a | 125 // Simulates success of discovering services. |uuids| is used to create a |
| 126 // service for each UUID string. Multiple UUIDs with the same value produce | 126 // service for each UUID string. Multiple UUIDs with the same value produce |
| 127 // multiple service instances. | 127 // multiple service instances. |
| 128 virtual void SimulateGattServicesDiscovered( | 128 virtual void SimulateGattServicesDiscovered( |
| 129 BluetoothDevice* device, | 129 BluetoothDevice* device, |
| 130 const std::vector<std::string>& uuids) {} | 130 const std::vector<std::string>& uuids) {} |
| 131 | 131 |
| 132 // Simulates a GATT Services changed event. |
| 133 virtual void SimulateGattServicesChanged(BluetoothDevice* device) {} |
| 134 |
| 132 // Simulates remove of a |service|. | 135 // Simulates remove of a |service|. |
| 133 virtual void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) { | 136 virtual void SimulateGattServiceRemoved(BluetoothRemoteGattService* service) { |
| 134 } | 137 } |
| 135 | 138 |
| 136 // Simulates failure to discover services. | 139 // Simulates failure to discover services. |
| 137 virtual void SimulateGattServicesDiscoveryError(BluetoothDevice* device) {} | 140 virtual void SimulateGattServicesDiscoveryError(BluetoothDevice* device) {} |
| 138 | 141 |
| 139 // Simulates a Characteristic on a service. | 142 // Simulates a Characteristic on a service. |
| 140 virtual void SimulateGattCharacteristic(BluetoothRemoteGattService* service, | 143 virtual void SimulateGattCharacteristic(BluetoothRemoteGattService* service, |
| 141 const std::string& uuid, | 144 const std::string& uuid, |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 int actual_error_callback_calls_ = 0; | 409 int actual_error_callback_calls_ = 0; |
| 407 bool unexpected_success_callback_ = false; | 410 bool unexpected_success_callback_ = false; |
| 408 bool unexpected_error_callback_ = false; | 411 bool unexpected_error_callback_ = false; |
| 409 | 412 |
| 410 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; | 413 base::WeakPtrFactory<BluetoothTestBase> weak_factory_; |
| 411 }; | 414 }; |
| 412 | 415 |
| 413 } // namespace device | 416 } // namespace device |
| 414 | 417 |
| 415 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ | 418 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_TEST_H_ |
| OLD | NEW |