| Index: device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.mm b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| index 8e730550b4f26c2f9ad01d7dd1a405770ad60f57..ee66fbd4c6c676458333c5ab0232cf3e6eea5d3d 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| +++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| @@ -309,28 +309,28 @@ void BluetoothLowEnergyDeviceMac::DidModifyServices(
|
| void BluetoothLowEnergyDeviceMac::DidUpdateValue(
|
| CBCharacteristic* characteristic,
|
| NSError* error) {
|
| - BluetoothRemoteGattServiceMac* gatt_service =
|
| - GetBluetoothRemoteGattServiceMac(characteristic.service);
|
| - DCHECK(gatt_service);
|
| - gatt_service->DidUpdateValue(characteristic, error);
|
| + BluetoothRemoteGattCharacteristicMac* gatt_characteristic_mac =
|
| + GetBluetoothRemoteGattCharacteristicMac(characteristic);
|
| + DCHECK(gatt_characteristic_mac);
|
| + gatt_characteristic_mac->DidUpdateValue(error);
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::DidWriteValue(
|
| CBCharacteristic* characteristic,
|
| NSError* error) {
|
| - BluetoothRemoteGattServiceMac* gatt_service =
|
| - GetBluetoothRemoteGattServiceMac(characteristic.service);
|
| - DCHECK(gatt_service);
|
| - gatt_service->DidWriteValue(characteristic, error);
|
| + BluetoothRemoteGattCharacteristicMac* gatt_characteristic_mac =
|
| + GetBluetoothRemoteGattCharacteristicMac(characteristic);
|
| + DCHECK(gatt_characteristic_mac);
|
| + gatt_characteristic_mac->DidWriteValue(error);
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::DidUpdateNotificationState(
|
| CBCharacteristic* characteristic,
|
| NSError* error) {
|
| - BluetoothRemoteGattServiceMac* gatt_service =
|
| - GetBluetoothRemoteGattServiceMac(characteristic.service);
|
| - DCHECK(gatt_service);
|
| - gatt_service->DidUpdateNotificationState(characteristic, error);
|
| + BluetoothRemoteGattCharacteristicMac* gatt_characteristic_mac =
|
| + GetBluetoothRemoteGattCharacteristicMac(characteristic);
|
| + DCHECK(gatt_characteristic_mac);
|
| + gatt_characteristic_mac->DidUpdateNotificationState(error);
|
| }
|
|
|
| void BluetoothLowEnergyDeviceMac::DidDiscoverDescriptors(
|
| @@ -463,6 +463,19 @@ BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattServiceMac(
|
| return nullptr;
|
| }
|
|
|
| +device::BluetoothRemoteGattCharacteristicMac*
|
| +BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattCharacteristicMac(
|
| + CBCharacteristic* cb_characteristic) const {
|
| + CBService* cb_service = [cb_characteristic service];
|
| + device::BluetoothRemoteGattServiceMac* gatt_service_mac =
|
| + GetBluetoothRemoteGattServiceMac(cb_service);
|
| + if (!gatt_service_mac) {
|
| + return nullptr;
|
| + }
|
| + return gatt_service_mac->GetBluetoothRemoteGattCharacteristicMac(
|
| + cb_characteristic);
|
| +}
|
| +
|
| device::BluetoothRemoteGattDescriptorMac*
|
| BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattDescriptorMac(
|
| CBDescriptor* cb_descriptor) const {
|
|
|