From e65bc222634ed32194386ba1c0785cc93499309d Mon Sep 17 00:00:00 2001 From: "armansito@chromium.org" Date: Tue, 8 Apr 2014 05:18:28 +0000 Subject: device/bluetooth: Add chromeos::BluetoothRemoteGattServiceChromeOS. Added the chromeos::BluetoothRemoteGattServiceChromeOS class which implements a remote instance of device::BluetoothGattService for the Chrome OS platform. This CL also introduces some minor changes to the GATT API, namely removing the characteristic and descriptor Observer interfaces. Addition, removal, and value changes of remote characteristics will instead be tracked via BluetoothGattService::Observer. BUG=360266,340529 TEST=device_unittests Review URL: https://codereview.chromium.org/224953003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262327 0039d316-1c4b-4281-b951-d872f2087c98 --- chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc') diff --git a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc index 85408b8..c25e71c 100644 --- a/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/chromeos/dbus/fake_bluetooth_gatt_characteristic_client.cc @@ -209,21 +209,21 @@ void FakeBluetoothGattCharacteristicClient::ExposeHeartRateCharacteristics( void FakeBluetoothGattCharacteristicClient::HideHeartRateCharacteristics() { VLOG(2) << "Hiding fake Heart Rate characteristics."; + + // Notify the observers before deleting the properties structures so that they + // can be accessed from the observer method. + NotifyCharacteristicRemoved(dbus::ObjectPath(heart_rate_measurement_path_)); + NotifyCharacteristicRemoved(dbus::ObjectPath(body_sensor_location_path_)); + NotifyCharacteristicRemoved(dbus::ObjectPath(heart_rate_control_point_path_)); + heart_rate_measurement_properties_.reset(); body_sensor_location_properties_.reset(); heart_rate_control_point_properties_.reset(); - std::string hrm_path = heart_rate_measurement_path_; heart_rate_measurement_path_.clear(); - std::string bsl_path = body_sensor_location_path_; body_sensor_location_path_.clear(); - std::string hrcp_path = heart_rate_control_point_path_; heart_rate_control_point_path_.clear(); heart_rate_visible_ = false; - - NotifyCharacteristicRemoved(dbus::ObjectPath(hrm_path)); - NotifyCharacteristicRemoved(dbus::ObjectPath(bsl_path)); - NotifyCharacteristicRemoved(dbus::ObjectPath(hrcp_path)); } void FakeBluetoothGattCharacteristicClient::OnPropertyChanged( -- cgit v1.1