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

Unified Diff: device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm

Issue 2767813002: Bluetooth: macOS: Implementing read/write for descriptors (Closed)
Patch Set: NSString/NSNumber type for descriptor value Created 3 years, 8 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 4f8a1b853928ee53d48ad465865045002c99f75d..e0287fff8a6e0848c61d8a5c0d5dff4e7f3b41ab 100644
--- a/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
+++ b/device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm
@@ -49,6 +49,14 @@ class BluetoothLowEnergyPeripheralBridge {
device_mac_->DidDiscoverDescriptors(characteristic, error);
}
+ void DidUpdateValueForDescriptor(CBDescriptor* descriptor, NSError* error) {
+ device_mac_->DidUpdateValueForDescriptor(descriptor, error);
+ }
+
+ void DidWriteValueForDescriptor(CBDescriptor* descriptor, NSError* error) {
+ device_mac_->DidWriteValueForDescriptor(descriptor, error);
+ }
+
CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
private:
@@ -113,4 +121,16 @@ class BluetoothLowEnergyPeripheralBridge {
bridge_->DidDiscoverDescriptors(characteristic, error);
}
+- (void)peripheral:(CBPeripheral*)peripheral
+ didUpdateValueForDescriptor:(CBDescriptor*)descriptor
+ error:(nullable NSError*)error {
+ bridge_->DidUpdateValueForDescriptor(descriptor, error);
+}
+
+- (void)peripheral:(CBPeripheral*)peripheral
+ didWriteValueForDescriptor:(CBDescriptor*)descriptor
+ error:(nullable NSError*)error {
+ bridge_->DidWriteValueForDescriptor(descriptor, error);
+}
+
@end

Powered by Google App Engine
This is Rietveld 408576698