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 14 matching lines...) Expand all Loading... |
25 // the Linux desktop. | 25 // the Linux desktop. |
26 class CHROMEOS_EXPORT FakeBluetoothDeviceClient | 26 class CHROMEOS_EXPORT FakeBluetoothDeviceClient |
27 : public BluetoothDeviceClient { | 27 : public BluetoothDeviceClient { |
28 public: | 28 public: |
29 struct Properties : public BluetoothDeviceClient::Properties { | 29 struct Properties : public BluetoothDeviceClient::Properties { |
30 explicit Properties(const PropertyChangedCallback & callback); | 30 explicit Properties(const PropertyChangedCallback & callback); |
31 virtual ~Properties(); | 31 virtual ~Properties(); |
32 | 32 |
33 // dbus::PropertySet override | 33 // dbus::PropertySet override |
34 virtual void Get(dbus::PropertyBase* property, | 34 virtual void Get(dbus::PropertyBase* property, |
35 dbus::PropertySet::GetCallback callback) OVERRIDE; | 35 dbus::PropertySet::GetCallback callback) override; |
36 virtual void GetAll() OVERRIDE; | 36 virtual void GetAll() override; |
37 virtual void Set(dbus::PropertyBase* property, | 37 virtual void Set(dbus::PropertyBase* property, |
38 dbus::PropertySet::SetCallback callback) OVERRIDE; | 38 dbus::PropertySet::SetCallback callback) override; |
39 }; | 39 }; |
40 | 40 |
41 FakeBluetoothDeviceClient(); | 41 FakeBluetoothDeviceClient(); |
42 virtual ~FakeBluetoothDeviceClient(); | 42 virtual ~FakeBluetoothDeviceClient(); |
43 | 43 |
44 // BluetoothDeviceClient overrides | 44 // BluetoothDeviceClient overrides |
45 virtual void Init(dbus::Bus* bus) OVERRIDE; | 45 virtual void Init(dbus::Bus* bus) override; |
46 virtual void AddObserver(Observer* observer) OVERRIDE; | 46 virtual void AddObserver(Observer* observer) override; |
47 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 47 virtual void RemoveObserver(Observer* observer) override; |
48 virtual std::vector<dbus::ObjectPath> GetDevicesForAdapter( | 48 virtual std::vector<dbus::ObjectPath> GetDevicesForAdapter( |
49 const dbus::ObjectPath& adapter_path) OVERRIDE; | 49 const dbus::ObjectPath& adapter_path) override; |
50 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) | 50 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) |
51 OVERRIDE; | 51 override; |
52 virtual void Connect(const dbus::ObjectPath& object_path, | 52 virtual void Connect(const dbus::ObjectPath& object_path, |
53 const base::Closure& callback, | 53 const base::Closure& callback, |
54 const ErrorCallback& error_callback) OVERRIDE; | 54 const ErrorCallback& error_callback) override; |
55 virtual void Disconnect(const dbus::ObjectPath& object_path, | 55 virtual void Disconnect(const dbus::ObjectPath& object_path, |
56 const base::Closure& callback, | 56 const base::Closure& callback, |
57 const ErrorCallback& error_callback) OVERRIDE; | 57 const ErrorCallback& error_callback) override; |
58 virtual void ConnectProfile(const dbus::ObjectPath& object_path, | 58 virtual void ConnectProfile(const dbus::ObjectPath& object_path, |
59 const std::string& uuid, | 59 const std::string& uuid, |
60 const base::Closure& callback, | 60 const base::Closure& callback, |
61 const ErrorCallback& error_callback) OVERRIDE; | 61 const ErrorCallback& error_callback) override; |
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( | 72 virtual void StartConnectionMonitor( |
73 const dbus::ObjectPath& object_path, | 73 const dbus::ObjectPath& object_path, |
74 const base::Closure& callback, | 74 const base::Closure& callback, |
75 const ErrorCallback& error_callback) OVERRIDE; | 75 const ErrorCallback& error_callback) override; |
76 virtual void StopConnectionMonitor( | 76 virtual void StopConnectionMonitor( |
77 const dbus::ObjectPath& object_path, | 77 const dbus::ObjectPath& object_path, |
78 const base::Closure& callback, | 78 const base::Closure& callback, |
79 const ErrorCallback& error_callback) OVERRIDE; | 79 const ErrorCallback& error_callback) override; |
80 | 80 |
81 void SetSimulationIntervalMs(int interval_ms); | 81 void SetSimulationIntervalMs(int interval_ms); |
82 | 82 |
83 // Simulates discovery of devices for the given adapter. | 83 // Simulates discovery of devices for the given adapter. |
84 void BeginDiscoverySimulation(const dbus::ObjectPath& adapter_path); | 84 void BeginDiscoverySimulation(const dbus::ObjectPath& adapter_path); |
85 void EndDiscoverySimulation(const dbus::ObjectPath& adapter_path); | 85 void EndDiscoverySimulation(const dbus::ObjectPath& adapter_path); |
86 | 86 |
87 // Simulates incoming pairing of devices for the given adapter. | 87 // Simulates incoming pairing of devices for the given adapter. |
88 void BeginIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); | 88 void BeginIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); |
89 void EndIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); | 89 void EndIncomingPairingSimulation(const dbus::ObjectPath& adapter_path); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 int simulation_interval_ms_; | 249 int simulation_interval_ms_; |
250 uint32_t discovery_simulation_step_; | 250 uint32_t discovery_simulation_step_; |
251 uint32_t incoming_pairing_simulation_step_; | 251 uint32_t incoming_pairing_simulation_step_; |
252 bool pairing_cancelled_; | 252 bool pairing_cancelled_; |
253 bool connection_monitor_started_; | 253 bool connection_monitor_started_; |
254 }; | 254 }; |
255 | 255 |
256 } // namespace chromeos | 256 } // namespace chromeos |
257 | 257 |
258 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 258 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
OLD | NEW |