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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "chromeos/chromeos_export.h" | 14 #include "chromeos/chromeos_export.h" |
15 #include "chromeos/dbus/dbus_client_implementation_type.h" | 15 #include "chromeos/dbus/dbus_client_implementation_type.h" |
16 #include "chromeos/dbus/experimental_bluetooth_agent_service_provider.h" | 16 #include "chromeos/dbus/experimental_bluetooth_agent_service_provider.h" |
17 #include "chromeos/dbus/experimental_bluetooth_device_client.h" | 17 #include "chromeos/dbus/experimental_bluetooth_device_client.h" |
| 18 #include "chromeos/dbus/experimental_bluetooth_profile_service_provider.h" |
18 #include "dbus/object_path.h" | 19 #include "dbus/object_path.h" |
19 #include "dbus/property.h" | 20 #include "dbus/property.h" |
20 | 21 |
21 namespace chromeos { | 22 namespace chromeos { |
22 | 23 |
23 // FakeBluetoothDeviceClient simulates the behavior of the Bluetooth Daemon | 24 // FakeBluetoothDeviceClient simulates the behavior of the Bluetooth Daemon |
24 // device objects and is used both in test cases in place of a mock and on | 25 // device objects and is used both in test cases in place of a mock and on |
25 // the Linux desktop. | 26 // the Linux desktop. |
26 class CHROMEOS_EXPORT FakeBluetoothDeviceClient | 27 class CHROMEOS_EXPORT FakeBluetoothDeviceClient |
27 : public ExperimentalBluetoothDeviceClient { | 28 : public ExperimentalBluetoothDeviceClient { |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 const dbus::ObjectPath& object_path, | 172 const dbus::ObjectPath& object_path, |
172 const base::Closure& callback, | 173 const base::Closure& callback, |
173 const ErrorCallback& error_callback, | 174 const ErrorCallback& error_callback, |
174 ExperimentalBluetoothAgentServiceProvider::Delegate::Status status); | 175 ExperimentalBluetoothAgentServiceProvider::Delegate::Status status); |
175 void SimulateKeypress( | 176 void SimulateKeypress( |
176 uint16 entered, | 177 uint16 entered, |
177 const dbus::ObjectPath& object_path, | 178 const dbus::ObjectPath& object_path, |
178 const base::Closure& callback, | 179 const base::Closure& callback, |
179 const ErrorCallback& error_callback); | 180 const ErrorCallback& error_callback); |
180 | 181 |
| 182 void ConnectionCallback( |
| 183 const dbus::ObjectPath& object_path, |
| 184 const base::Closure& callback, |
| 185 const ErrorCallback& error_callback, |
| 186 ExperimentalBluetoothProfileServiceProvider::Delegate::Status status); |
| 187 void DisconnectionCallback( |
| 188 const dbus::ObjectPath& object_path, |
| 189 const base::Closure& callback, |
| 190 const ErrorCallback& error_callback, |
| 191 ExperimentalBluetoothProfileServiceProvider::Delegate::Status status); |
| 192 |
181 // List of observers interested in event notifications from us. | 193 // List of observers interested in event notifications from us. |
182 ObserverList<Observer> observers_; | 194 ObserverList<Observer> observers_; |
183 | 195 |
184 // Static properties we return. | 196 // Static properties we return. |
185 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap; | 197 typedef std::map<const dbus::ObjectPath, Properties *> PropertiesMap; |
186 PropertiesMap properties_map_; | 198 PropertiesMap properties_map_; |
187 std::vector<dbus::ObjectPath> device_list_; | 199 std::vector<dbus::ObjectPath> device_list_; |
188 | 200 |
189 int simulation_interval_ms_; | 201 int simulation_interval_ms_; |
190 uint32_t discovery_simulation_step_; | 202 uint32_t discovery_simulation_step_; |
191 bool pairing_cancelled_; | 203 bool pairing_cancelled_; |
192 }; | 204 }; |
193 | 205 |
194 } // namespace chromeos | 206 } // namespace chromeos |
195 | 207 |
196 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ | 208 #endif // CHROMEOS_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ |
OLD | NEW |