Index: device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc |
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc |
index 78a504e92b52bdf63e447b639b2a17daec77724f..6ef1bde91fbbfd13e1d74c5ccf5b419e6a092927 100644 |
--- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc |
+++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_service_provider.cc |
@@ -15,7 +15,7 @@ namespace bluez { |
FakeBluetoothGattDescriptorServiceProvider:: |
FakeBluetoothGattDescriptorServiceProvider( |
const dbus::ObjectPath& object_path, |
- Delegate* delegate, |
+ BluetoothGattServiceBlueZ::AttributeValueDelegate* delegate, |
const std::string& uuid, |
const std::vector<std::string>& permissions, |
const dbus::ObjectPath& characteristic_path) |
@@ -29,9 +29,6 @@ FakeBluetoothGattDescriptorServiceProvider:: |
DCHECK(characteristic_path_.IsValid()); |
DCHECK(!uuid.empty()); |
DCHECK(delegate_); |
- DCHECK(base::StartsWith(object_path_.value(), |
- characteristic_path_.value() + "/", |
- base::CompareCase::SENSITIVE)); |
// TODO(armansito): Do something with |permissions|. |
@@ -58,11 +55,11 @@ void FakeBluetoothGattDescriptorServiceProvider::SendValueChanged( |
} |
void FakeBluetoothGattDescriptorServiceProvider::GetValue( |
- const Delegate::ValueCallback& callback, |
- const Delegate::ErrorCallback& error_callback) { |
+ const device::BluetoothLocalGattService::Delegate::ValueCallback& callback, |
+ const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
+ error_callback) { |
VLOG(1) << "GATT descriptor value Get request: " << object_path_.value() |
<< " UUID: " << uuid_; |
- |
// Check if this descriptor is registered. |
FakeBluetoothGattManagerClient* fake_bluetooth_gatt_manager_client = |
static_cast<FakeBluetoothGattManagerClient*>( |
@@ -84,13 +81,14 @@ void FakeBluetoothGattDescriptorServiceProvider::GetValue( |
// Pass on to the delegate. |
DCHECK(delegate_); |
- delegate_->GetDescriptorValue(callback, error_callback); |
+ delegate_->GetValue(callback, error_callback); |
} |
void FakeBluetoothGattDescriptorServiceProvider::SetValue( |
const std::vector<uint8_t>& value, |
const base::Closure& callback, |
- const Delegate::ErrorCallback& error_callback) { |
+ const device::BluetoothLocalGattService::Delegate::ErrorCallback& |
+ error_callback) { |
VLOG(1) << "GATT descriptor value Set request: " << object_path_.value() |
<< " UUID: " << uuid_; |
@@ -115,7 +113,12 @@ void FakeBluetoothGattDescriptorServiceProvider::SetValue( |
// Pass on to the delegate. |
DCHECK(delegate_); |
- delegate_->SetDescriptorValue(value, callback, error_callback); |
+ delegate_->SetValue(value, callback, error_callback); |
+} |
+ |
+const dbus::ObjectPath& |
+FakeBluetoothGattDescriptorServiceProvider::object_path() const { |
+ return object_path_; |
} |
} // namespace bluez |