Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm

Issue 2052513002: Read characteristic implementation on macOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@characteristicscan_servicescan_cleanup
Patch Set: Removing ReadRemoteCharacteristic_AfterDeleted test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
diff --git a/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm b/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
index 19b628b720296e50b0e0564b030b321fa55ab39b..451a0c845392501270fdefa7674ea2476849a18e 100644
--- a/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
+++ b/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
@@ -31,6 +31,10 @@ class BluetoothLowEnergyPeripheralBridge {
device_mac_->DidDiscoverCharacteristics(service, error);
};
+ void DidReadValue(CBCharacteristic* characteristic, NSError* error) {
+ device_mac_->DidReadValue(characteristic, error);
+ }
+
CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
private:
@@ -70,4 +74,10 @@ class BluetoothLowEnergyPeripheralBridge {
bridge_->DidDiscoverCharacteristics(service, error);
}
+- (void)peripheral:(CBPeripheral*)peripheral
+ didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic
+ error:(NSError*)error {
+ bridge_->DidReadValue(characteristic, error);
ortuno 2016/06/16 18:22:18 We can't assume this a is Read Value result becaus
jlebel 2016/06/22 18:03:58 Done.
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698