Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: device/bluetooth/dbus/fake_bluetooth_device_client.h

Issue 2354933003: arc: bluetooth: Clean up arc_bluetooth_bridge (Closed)
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // Create a test Bluetooth device with the given properties. 157 // Create a test Bluetooth device with the given properties.
158 void CreateTestDevice(const dbus::ObjectPath& adapter_path, 158 void CreateTestDevice(const dbus::ObjectPath& adapter_path,
159 const std::string name, 159 const std::string name,
160 const std::string alias, 160 const std::string alias,
161 const std::string device_address, 161 const std::string device_address,
162 const std::vector<std::string>& service_uuids, 162 const std::vector<std::string>& service_uuids,
163 device::BluetoothTransport type); 163 device::BluetoothTransport type);
164 164
165 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } 165 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; }
166 166
167 // Updates the inquiry RSSI property of fake device with object path
168 // |object_path| to |rssi|, if the fake device exists.
169 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi);
170
167 static const char kTestPinCode[]; 171 static const char kTestPinCode[];
168 static const int kTestPassKey; 172 static const int kTestPassKey;
169 173
170 static const char kPairingMethodNone[]; 174 static const char kPairingMethodNone[];
171 static const char kPairingMethodPinCode[]; 175 static const char kPairingMethodPinCode[];
172 static const char kPairingMethodPassKey[]; 176 static const char kPairingMethodPassKey[];
173 177
174 static const char kPairingActionConfirmation[]; 178 static const char kPairingActionConfirmation[];
175 static const char kPairingActionDisplay[]; 179 static const char kPairingActionDisplay[];
176 static const char kPairingActionFail[]; 180 static const char kPairingActionFail[];
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 void RejectSimulatedPairing(const dbus::ObjectPath& object_path, 277 void RejectSimulatedPairing(const dbus::ObjectPath& object_path,
274 const ErrorCallback& error_callback); 278 const ErrorCallback& error_callback);
275 void FailSimulatedPairing(const dbus::ObjectPath& object_path, 279 void FailSimulatedPairing(const dbus::ObjectPath& object_path,
276 const ErrorCallback& error_callback); 280 const ErrorCallback& error_callback);
277 void AddInputDeviceIfNeeded(const dbus::ObjectPath& object_path, 281 void AddInputDeviceIfNeeded(const dbus::ObjectPath& object_path,
278 Properties* properties); 282 Properties* properties);
279 283
280 // If fake device with |object_path| exists, sets its inquiry RSSI property 284 // If fake device with |object_path| exists, sets its inquiry RSSI property
281 // to false and notifies that the property changed. 285 // to false and notifies that the property changed.
282 void InvalidateDeviceRSSI(const dbus::ObjectPath& object_path); 286 void InvalidateDeviceRSSI(const dbus::ObjectPath& object_path);
283 // Updates the inquiry RSSI property of fake device with object path
284 // |object_path| to |rssi|, if the fake device exists.
285 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi);
286 287
287 void PinCodeCallback(const dbus::ObjectPath& object_path, 288 void PinCodeCallback(const dbus::ObjectPath& object_path,
288 const base::Closure& callback, 289 const base::Closure& callback,
289 const ErrorCallback& error_callback, 290 const ErrorCallback& error_callback,
290 BluetoothAgentServiceProvider::Delegate::Status status, 291 BluetoothAgentServiceProvider::Delegate::Status status,
291 const std::string& pincode); 292 const std::string& pincode);
292 void PasskeyCallback(const dbus::ObjectPath& object_path, 293 void PasskeyCallback(const dbus::ObjectPath& object_path,
293 const base::Closure& callback, 294 const base::Closure& callback,
294 const ErrorCallback& error_callback, 295 const ErrorCallback& error_callback,
295 BluetoothAgentServiceProvider::Delegate::Status status, 296 BluetoothAgentServiceProvider::Delegate::Status status,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 int16_t max_transmit_power_; 340 int16_t max_transmit_power_;
340 341
341 // Controls the fake behavior to allow more extensive UI testing without 342 // Controls the fake behavior to allow more extensive UI testing without
342 // having to cycle the discovery simulation. 343 // having to cycle the discovery simulation.
343 bool delay_start_discovery_; 344 bool delay_start_discovery_;
344 }; 345 };
345 346
346 } // namespace bluez 347 } // namespace bluez
347 348
348 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ 349 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698