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

Unified Diff: chromeos/dbus/bluetooth_device_client.h

Issue 735893002: Add GetConnectionInfo function for BluetoothDevice, replacing the existing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_device_client.cc » ('j') | chromeos/dbus/bluetooth_device_client.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/bluetooth_device_client.h
diff --git a/chromeos/dbus/bluetooth_device_client.h b/chromeos/dbus/bluetooth_device_client.h
index a09b4ef528a5800dc87ddcace2648afcbb29b078..312258d678e201134f6425a8ff2f1ac2b12f22b6 100644
--- a/chromeos/dbus/bluetooth_device_client.h
+++ b/chromeos/dbus/bluetooth_device_client.h
@@ -80,20 +80,6 @@ class CHROMEOS_EXPORT BluetoothDeviceClient : public DBusClient {
// discovered during inquiry. Read-only.
dbus::Property<int16> rssi;
- // Received signal strength indicator when a connection is open to the
- // device. This property is not set unless connection monitor is enabled.
- // Read-only.
- dbus::Property<int16> connection_rssi;
-
- // The transmit power level of the host when a connection is open
- // to the device. This property is not set unless connection monitor is
- // enabled. Read-only.
- dbus::Property<int16> connection_tx_power;
-
- // The maximum transmit power level of the host that can be set
- // when connected to the device. Read-only.
- dbus::Property<int16> connection_tx_power_max;
-
Properties(dbus::ObjectProxy* object_proxy,
const std::string& interface_name,
const PropertyChangedCallback& callback);
@@ -184,18 +170,18 @@ class CHROMEOS_EXPORT BluetoothDeviceClient : public DBusClient {
const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
- // Starts connection monitor for the device with object path
- // |object_path|. Connection monitor is a mode the connection properties,
- // RSSI and TX power are tracked and updated when they change.
- virtual void StartConnectionMonitor(const dbus::ObjectPath& object_path,
- const base::Closure& callback,
- const ErrorCallback& error_callback) = 0;
-
- // Stops connection monitor for the device with object path
- // |object_path|.
- virtual void StopConnectionMonitor(const dbus::ObjectPath& object_path,
- const base::Closure& callback,
- const ErrorCallback& error_callback) = 0;
+ // The callback invoked for as successful GetConnInfo API call with the
+ // RSSI, TX power, and maximum TX power of the current connection.
+ typedef base::Callback<void(int16 rssi,
+ int16 transmit_power,
+ int16 max_transmit_power)> ConnInfoCallback;
+
+ // Returns the RSSI, TX power, and maximum TX power of a connection to the
+ // device with object path |object_path|. If the device is not connected, then
+ // an error will be returned.
+ virtual void GetConnInfo(const dbus::ObjectPath& object_path,
+ const ConnInfoCallback& callback,
+ const ErrorCallback& error_callback) = 0;
// Creates the instance.
static BluetoothDeviceClient* Create();
« no previous file with comments | « no previous file | chromeos/dbus/bluetooth_device_client.cc » ('j') | chromeos/dbus/bluetooth_device_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698