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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_peripheral_delegate.mm

Issue 2767813002: Bluetooth: macOS: Implementing read/write for descriptors (Closed)
Patch Set: . 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/bluetooth_low_energy_peripheral_delegate.h" 5 #include "device/bluetooth/bluetooth_low_energy_peripheral_delegate.h"
6 6
7 #include "device/bluetooth/bluetooth_adapter_mac.h" 7 #include "device/bluetooth/bluetooth_adapter_mac.h"
8 #include "device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h" 8 #include "device/bluetooth/bluetooth_low_energy_discovery_manager_mac.h"
9 9
10 namespace device { 10 namespace device {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 void DidUpdateNotificationState(CBCharacteristic* characteristic, 42 void DidUpdateNotificationState(CBCharacteristic* characteristic,
43 NSError* error) { 43 NSError* error) {
44 device_mac_->DidUpdateNotificationState(characteristic, error); 44 device_mac_->DidUpdateNotificationState(characteristic, error);
45 } 45 }
46 46
47 void DidDiscoverDescriptors(CBCharacteristic* characteristic, 47 void DidDiscoverDescriptors(CBCharacteristic* characteristic,
48 NSError* error) { 48 NSError* error) {
49 device_mac_->DidDiscoverDescriptors(characteristic, error); 49 device_mac_->DidDiscoverDescriptors(characteristic, error);
50 } 50 }
51 51
52 void DidUpdateValueForDescriptor(CBDescriptor* descriptor, NSError* error) {
53 device_mac_->DidUpdateValueForDescriptor(descriptor, error);
54 }
55
56 void DidWriteValueForDescriptor(CBDescriptor* descriptor, NSError* error) {
57 device_mac_->DidWriteValueForDescriptor(descriptor, error);
58 }
59
52 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); } 60 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
53 61
54 private: 62 private:
55 BluetoothLowEnergyDeviceMac* device_mac_; 63 BluetoothLowEnergyDeviceMac* device_mac_;
56 }; 64 };
57 65
58 } // namespace device 66 } // namespace device
59 67
60 @implementation BluetoothLowEnergyPeripheralDelegate 68 @implementation BluetoothLowEnergyPeripheralDelegate
61 69
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 error:(nullable NSError*)error { 114 error:(nullable NSError*)error {
107 bridge_->DidUpdateNotificationState(characteristic, error); 115 bridge_->DidUpdateNotificationState(characteristic, error);
108 } 116 }
109 117
110 - (void)peripheral:(CBPeripheral*)peripheral 118 - (void)peripheral:(CBPeripheral*)peripheral
111 didDiscoverDescriptorsForCharacteristic:(CBCharacteristic*)characteristic 119 didDiscoverDescriptorsForCharacteristic:(CBCharacteristic*)characteristic
112 error:(nullable NSError*)error { 120 error:(nullable NSError*)error {
113 bridge_->DidDiscoverDescriptors(characteristic, error); 121 bridge_->DidDiscoverDescriptors(characteristic, error);
114 } 122 }
115 123
124 - (void)peripheral:(CBPeripheral*)peripheral
125 didUpdateValueForDescriptor:(CBDescriptor*)descriptor
126 error:(nullable NSError*)error {
127 bridge_->DidUpdateValueForDescriptor(descriptor, error);
128 }
129
130 - (void)peripheral:(CBPeripheral*)peripheral
131 didWriteValueForDescriptor:(CBDescriptor*)descriptor
132 error:(nullable NSError*)error {
133 bridge_->DidWriteValueForDescriptor(descriptor, error);
134 }
135
116 @end 136 @end
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_low_energy_device_mac.mm ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698