| 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 1e25ff41326e93ba4a4cd90c7abf1a91906eeaab..dd93a2abce3104ef4673c3279cfd2ea3547412e2 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| +++ b/device/bluetooth/bluetooth_low_energy_device_mac.mm
|
| @@ -320,28 +320,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(
|
| @@ -474,6 +474,19 @@ BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattServiceMac(
|
| return nullptr;
|
| }
|
|
|
| +BluetoothRemoteGattCharacteristicMac*
|
| +BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattCharacteristicMac(
|
| + CBCharacteristic* cb_characteristic) const {
|
| + CBService* cb_service = [cb_characteristic service];
|
| + BluetoothRemoteGattServiceMac* gatt_service_mac =
|
| + GetBluetoothRemoteGattServiceMac(cb_service);
|
| + if (!gatt_service_mac) {
|
| + return nullptr;
|
| + }
|
| + return gatt_service_mac->GetBluetoothRemoteGattCharacteristicMac(
|
| + cb_characteristic);
|
| +}
|
| +
|
| BluetoothRemoteGattDescriptorMac*
|
| BluetoothLowEnergyDeviceMac::GetBluetoothRemoteGattDescriptorMac(
|
| CBDescriptor* cb_descriptor) const {
|
|
|