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 CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual void DisconnectProfile(const dbus::ObjectPath& object_path, | 62 virtual void DisconnectProfile(const dbus::ObjectPath& object_path, |
63 const std::string& uuid, | 63 const std::string& uuid, |
64 const base::Closure& callback, | 64 const base::Closure& callback, |
65 const ErrorCallback& error_callback) OVERRIDE; | 65 const ErrorCallback& error_callback) OVERRIDE; |
66 virtual void Pair(const dbus::ObjectPath& object_path, | 66 virtual void Pair(const dbus::ObjectPath& object_path, |
67 const base::Closure& callback, | 67 const base::Closure& callback, |
68 const ErrorCallback& error_callback) OVERRIDE; | 68 const ErrorCallback& error_callback) OVERRIDE; |
69 virtual void CancelPairing(const dbus::ObjectPath& object_path, | 69 virtual void CancelPairing(const dbus::ObjectPath& object_path, |
70 const base::Closure& callback, | 70 const base::Closure& callback, |
71 const ErrorCallback& error_callback) OVERRIDE; | 71 const ErrorCallback& error_callback) OVERRIDE; |
| 72 virtual void StartConnectionMonitor( |
| 73 const dbus::ObjectPath& object_path, |
| 74 const base::Closure& callback, |
| 75 const ErrorCallback& error_callback) OVERRIDE; |
| 76 virtual void StopConnectionMonitor( |
| 77 const dbus::ObjectPath& object_path, |
| 78 const base::Closure& callback, |
| 79 const ErrorCallback& error_callback) OVERRIDE; |
72 | 80 |
73 void SetSimulationIntervalMs(int interval_ms); | 81 void SetSimulationIntervalMs(int interval_ms); |
74 | 82 |
75 // Simulates discovery of devices for the given adapter. | 83 // Simulates discovery of devices for the given adapter. |
76 void BeginDiscoverySimulation(const dbus::ObjectPath& adapter_path); | 84 void BeginDiscoverySimulation(const dbus::ObjectPath& adapter_path); |
77 void EndDiscoverySimulation(const dbus::ObjectPath& adapter_path); | 85 void EndDiscoverySimulation(const dbus::ObjectPath& adapter_path); |
78 | 86 |
79 // Simulates incoming pairing of devices for the given adapter. | 87 // Simulates incoming pairing of devices for the given adapter. |
80 void BeginIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); | 88 void BeginIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); |
81 void EndIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); | 89 void EndIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void RejectSimulatedPairing( | 193 void RejectSimulatedPairing( |
186 const dbus::ObjectPath& object_path, | 194 const dbus::ObjectPath& object_path, |
187 const ErrorCallback& error_callback); | 195 const ErrorCallback& error_callback); |
188 void FailSimulatedPairing( | 196 void FailSimulatedPairing( |
189 const dbus::ObjectPath& object_path, | 197 const dbus::ObjectPath& object_path, |
190 const ErrorCallback& error_callback); | 198 const ErrorCallback& error_callback); |
191 void AddInputDeviceIfNeeded( | 199 void AddInputDeviceIfNeeded( |
192 const dbus::ObjectPath& object_path, | 200 const dbus::ObjectPath& object_path, |
193 Properties* properties); | 201 Properties* properties); |
194 | 202 |
195 // Updates the RSSI property of fake device with object path |object_path| | 203 // Updates the inquiry RSSI property of fake device with object path |
196 // to |rssi|, if the fake device exists. | 204 // |object_path| to |rssi|, if the fake device exists. |
197 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16 rssi); | 205 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16 rssi); |
198 | 206 |
199 void PinCodeCallback( | 207 void PinCodeCallback( |
200 const dbus::ObjectPath& object_path, | 208 const dbus::ObjectPath& object_path, |
201 const base::Closure& callback, | 209 const base::Closure& callback, |
202 const ErrorCallback& error_callback, | 210 const ErrorCallback& error_callback, |
203 BluetoothAgentServiceProvider::Delegate::Status status, | 211 BluetoothAgentServiceProvider::Delegate::Status status, |
204 const std::string& pincode); | 212 const std::string& pincode); |
205 void PasskeyCallback( | 213 void PasskeyCallback( |
206 const dbus::ObjectPath& object_path, | 214 const dbus::ObjectPath& object_path, |
(...skipping 28 matching lines...) Expand all Loading... |
235 | 243 |
236 // Static properties we return. | 244 // Static properties we return. |
237 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap; | 245 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap; |
238 PropertiesMap properties_map_; | 246 PropertiesMap properties_map_; |
239 std::vector<dbus::ObjectPath> device_list_; | 247 std::vector<dbus::ObjectPath> device_list_; |
240 | 248 |
241 int simulation_interval_ms_; | 249 int simulation_interval_ms_; |
242 uint32_t discovery_simulation_step_; | 250 uint32_t discovery_simulation_step_; |
243 uint32_t incoming_pairing_simulation_step_; | 251 uint32_t incoming_pairing_simulation_step_; |
244 bool pairing_cancelled_; | 252 bool pairing_cancelled_; |
| 253 bool connection_monitor_started_; |
245 }; | 254 }; |
246 | 255 |
247 } // namespace chromeos | 256 } // namespace chromeos |
248 | 257 |
249 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 258 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
OLD | NEW |