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 <cstdint> | 8 #include <cstdint> |
9 #include <map> | 9 #include <map> |
10 #include <memory> | 10 #include <memory> |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 // by GetConnInfo. | 149 // by GetConnInfo. |
150 void UpdateConnectionInfo(uint16_t connection_rssi, | 150 void UpdateConnectionInfo(uint16_t connection_rssi, |
151 uint16_t transmit_power, | 151 uint16_t transmit_power, |
152 uint16_t max_transmit_power); | 152 uint16_t max_transmit_power); |
153 | 153 |
154 // Test specific functions: | 154 // Test specific functions: |
155 // Remove all test devices from this client. | 155 // Remove all test devices from this client. |
156 void RemoveAllDevices(); | 156 void RemoveAllDevices(); |
157 | 157 |
158 // Create a test Bluetooth device with the given properties. | 158 // Create a test Bluetooth device with the given properties. |
159 void CreateTestDevice(const dbus::ObjectPath& adapter_path, | 159 void CreateTestDevice( |
160 const base::Optional<std::string> name, | 160 const dbus::ObjectPath& adapter_path, |
161 const std::string alias, | 161 const base::Optional<std::string> name, |
162 const std::string device_address, | 162 const std::string alias, |
163 const std::vector<std::string>& service_uuids, | 163 const std::string device_address, |
164 device::BluetoothTransport type); | 164 const std::vector<std::string>& service_uuids, |
| 165 device::BluetoothTransport type, |
| 166 const std::unordered_map<std::string, std::vector<uint8_t>>& |
| 167 service_data); |
165 | 168 |
166 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } | 169 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } |
167 | 170 |
168 // Updates the inquiry RSSI property of fake device with object path | 171 // Updates the inquiry RSSI property of fake device with object path |
169 // |object_path| to |rssi|, if the fake device exists. | 172 // |object_path| to |rssi|, if the fake device exists. |
170 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi); | 173 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi); |
171 | 174 |
172 static const char kTestPinCode[]; | 175 static const char kTestPinCode[]; |
173 static const int kTestPassKey; | 176 static const int kTestPassKey; |
174 | 177 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 int16_t max_transmit_power_; | 348 int16_t max_transmit_power_; |
346 | 349 |
347 // Controls the fake behavior to allow more extensive UI testing without | 350 // Controls the fake behavior to allow more extensive UI testing without |
348 // having to cycle the discovery simulation. | 351 // having to cycle the discovery simulation. |
349 bool delay_start_discovery_; | 352 bool delay_start_discovery_; |
350 }; | 353 }; |
351 | 354 |
352 } // namespace bluez | 355 } // namespace bluez |
353 | 356 |
354 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 357 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
OLD | NEW |