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

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

Issue 2440043002: bluetooth: bluez: GetName uses 'name' instead of 'alias'. (Closed)
Patch Set: Android needs StartLowEnergyDiscoverySession; Browser test needs s/alias/name/ Created 4 years, 1 month 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
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/bind.h" 13 #include "base/bind.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/optional.h"
16 #include "dbus/object_path.h" 17 #include "dbus/object_path.h"
17 #include "dbus/property.h" 18 #include "dbus/property.h"
18 #include "device/bluetooth/bluetooth_common.h" 19 #include "device/bluetooth/bluetooth_common.h"
19 #include "device/bluetooth/bluetooth_export.h" 20 #include "device/bluetooth/bluetooth_export.h"
20 #include "device/bluetooth/dbus/bluetooth_agent_service_provider.h" 21 #include "device/bluetooth/dbus/bluetooth_agent_service_provider.h"
21 #include "device/bluetooth/dbus/bluetooth_device_client.h" 22 #include "device/bluetooth/dbus/bluetooth_device_client.h"
22 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h" 23 #include "device/bluetooth/dbus/bluetooth_profile_service_provider.h"
23 24
24 namespace bluez { 25 namespace bluez {
25 26
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void UpdateConnectionInfo(uint16_t connection_rssi, 150 void UpdateConnectionInfo(uint16_t connection_rssi,
150 uint16_t transmit_power, 151 uint16_t transmit_power,
151 uint16_t max_transmit_power); 152 uint16_t max_transmit_power);
152 153
153 // Test specific functions: 154 // Test specific functions:
154 // Remove all test devices from this client. 155 // Remove all test devices from this client.
155 void RemoveAllDevices(); 156 void RemoveAllDevices();
156 157
157 // Create a test Bluetooth device with the given properties. 158 // Create a test Bluetooth device with the given properties.
158 void CreateTestDevice(const dbus::ObjectPath& adapter_path, 159 void CreateTestDevice(const dbus::ObjectPath& adapter_path,
159 const std::string name, 160 const base::Optional<std::string> name,
160 const std::string alias, 161 const std::string alias,
161 const std::string device_address, 162 const std::string device_address,
162 const std::vector<std::string>& service_uuids, 163 const std::vector<std::string>& service_uuids,
163 device::BluetoothTransport type); 164 device::BluetoothTransport type);
164 165
165 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; } 166 void set_delay_start_discovery(bool value) { delay_start_discovery_ = value; }
166 167
167 // Updates the inquiry RSSI property of fake device with object path 168 // Updates the inquiry RSSI property of fake device with object path
168 // |object_path| to |rssi|, if the fake device exists. 169 // |object_path| to |rssi|, if the fake device exists.
169 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi); 170 void UpdateDeviceRSSI(const dbus::ObjectPath& object_path, int16_t rssi);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 int16_t max_transmit_power_; 341 int16_t max_transmit_power_;
341 342
342 // Controls the fake behavior to allow more extensive UI testing without 343 // Controls the fake behavior to allow more extensive UI testing without
343 // having to cycle the discovery simulation. 344 // having to cycle the discovery simulation.
344 bool delay_start_discovery_; 345 bool delay_start_discovery_;
345 }; 346 };
346 347
347 } // namespace bluez 348 } // namespace bluez
348 349
349 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_ 350 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluez/bluetooth_device_bluez.cc ('k') | device/bluetooth/dbus/fake_bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698