| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 bool incoming_request, | 140 bool incoming_request, |
| 141 const base::Closure& callback, | 141 const base::Closure& callback, |
| 142 const ErrorCallback& error_callback); | 142 const ErrorCallback& error_callback); |
| 143 | 143 |
| 144 // Updates the connection properties of the fake device that will be returned | 144 // Updates the connection properties of the fake device that will be returned |
| 145 // by GetConnInfo. | 145 // by GetConnInfo. |
| 146 void UpdateConnectionInfo(uint16_t connection_rssi, | 146 void UpdateConnectionInfo(uint16_t connection_rssi, |
| 147 uint16_t transmit_power, | 147 uint16_t transmit_power, |
| 148 uint16_t max_transmit_power); | 148 uint16_t max_transmit_power); |
| 149 | 149 |
| 150 // Test specific functions: |
| 151 // Remove all test devices from this client. |
| 152 void RemoveAllDevices(); |
| 153 |
| 154 // Create a test Bluetooth LE device with the given properties. |
| 155 void CreateTestDevice(const dbus::ObjectPath& adapter_path, |
| 156 const std::string name, |
| 157 const std::string alias, |
| 158 const std::string device_address, |
| 159 const std::vector<std::string>& service_uuids); |
| 160 |
| 150 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } | 161 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } |
| 151 | 162 |
| 152 static const char kTestPinCode[]; | 163 static const char kTestPinCode[]; |
| 153 static const int kTestPassKey; | 164 static const int kTestPassKey; |
| 154 | 165 |
| 155 static const char kPairingMethodNone[]; | 166 static const char kPairingMethodNone[]; |
| 156 static const char kPairingMethodPinCode[]; | 167 static const char kPairingMethodPinCode[]; |
| 157 static const char kPairingMethodPassKey[]; | 168 static const char kPairingMethodPassKey[]; |
| 158 | 169 |
| 159 static const char kPairingActionConfirmation[]; | 170 static const char kPairingActionConfirmation[]; |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 int16_t max_transmit_power_; | 330 int16_t max_transmit_power_; |
| 320 | 331 |
| 321 // Controls the fake behavior to allow more extensive UI testing without | 332 // Controls the fake behavior to allow more extensive UI testing without |
| 322 // having to cycle the discovery simulation. | 333 // having to cycle the discovery simulation. |
| 323 bool delay_start_discovery_; | 334 bool delay_start_discovery_; |
| 324 }; | 335 }; |
| 325 | 336 |
| 326 } // namespace bluez | 337 } // namespace bluez |
| 327 | 338 |
| 328 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 339 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
| OLD | NEW |