diff options
author | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 13:32:55 +0000 |
---|---|---|
committer | armansito@chromium.org <armansito@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-10 13:32:55 +0000 |
commit | 9389175ac37ae00e7f020bf4b29ab8e7e074b963 (patch) | |
tree | c361980e90378ff91e42a2a3260f0f9489c06125 /chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | |
parent | 0e1886438d1e5aeb04b6c88014aeabf57452da64 (diff) | |
download | chromium_src-9389175ac37ae00e7f020bf4b29ab8e7e074b963.zip chromium_src-9389175ac37ae00e7f020bf4b29ab8e7e074b963.tar.gz chromium_src-9389175ac37ae00e7f020bf4b29ab8e7e074b963.tar.bz2 |
device/bluetooth: Add chromeos::BluetoothRemoteGattCharacteristicChromeOS.
Added the chromeos::BluetoothRemoteGattCharacteristicChromeOS class which
implements a remote instance of device::BluetoothGattCharacteristic for the
Chrome OS platform.
BUG=360266,340529
TEST=device_unittests
Review URL: https://codereview.chromium.org/228643004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262964 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc')
-rw-r--r-- | chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc index c25e71c..55784a9 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc @@ -49,7 +49,10 @@ void FakeBluetoothGattCharacteristicClient::Properties::Get( dbus::PropertyBase* property, dbus::PropertySet::GetCallback callback) { VLOG(1) << "Get " << property->name(); - callback.Run(false); + + // TODO(armansito): Return success or failure here based on characteristic + // read permission. + callback.Run(true); } void FakeBluetoothGattCharacteristicClient::Properties::GetAll() { @@ -116,8 +119,8 @@ FakeBluetoothGattCharacteristicClient::GetProperties( return heart_rate_measurement_properties_.get(); } if (object_path.value() == body_sensor_location_path_) { - DCHECK(heart_rate_measurement_properties_.get()); - return heart_rate_measurement_properties_.get(); + DCHECK(body_sensor_location_properties_.get()); + return body_sensor_location_properties_.get(); } if (object_path.value() == heart_rate_control_point_path_) { DCHECK(heart_rate_control_point_properties_.get()); @@ -226,6 +229,21 @@ void FakeBluetoothGattCharacteristicClient::HideHeartRateCharacteristics() { heart_rate_visible_ = false; } +dbus::ObjectPath +FakeBluetoothGattCharacteristicClient::GetHeartRateMeasurementPath() const { + return dbus::ObjectPath(heart_rate_measurement_path_); +} + +dbus::ObjectPath +FakeBluetoothGattCharacteristicClient::GetBodySensorLocationPath() const { + return dbus::ObjectPath(body_sensor_location_path_); +} + +dbus::ObjectPath +FakeBluetoothGattCharacteristicClient::GetHeartRateControlPointPath() const { + return dbus::ObjectPath(heart_rate_control_point_path_); +} + void FakeBluetoothGattCharacteristicClient::OnPropertyChanged( const dbus::ObjectPath& object_path, const std::string& property_name) { |