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

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

Issue 2074563002: bluetooth: mac: write characteristic implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@read_characteristicscan_servicescan_cleanup
Patch Set: Merge from top of tree Created 4 years, 5 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 17 matching lines...) Expand all
28 }; 28 };
29 29
30 void DidDiscoverCharacteristics(CBService* service, NSError* error) { 30 void DidDiscoverCharacteristics(CBService* service, NSError* error) {
31 device_mac_->DidDiscoverCharacteristics(service, error); 31 device_mac_->DidDiscoverCharacteristics(service, error);
32 }; 32 };
33 33
34 void DidUpdateValue(CBCharacteristic* characteristic, NSError* error) { 34 void DidUpdateValue(CBCharacteristic* characteristic, NSError* error) {
35 device_mac_->DidUpdateValue(characteristic, error); 35 device_mac_->DidUpdateValue(characteristic, error);
36 } 36 }
37 37
38 void DidWriteValue(CBCharacteristic* characteristic, NSError* error) {
39 device_mac_->DidWriteValue(characteristic, error);
40 }
41
38 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); } 42 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
39 43
40 private: 44 private:
41 BluetoothLowEnergyDeviceMac* device_mac_; 45 BluetoothLowEnergyDeviceMac* device_mac_;
42 }; 46 };
43 47
44 } // namespace device 48 } // namespace device
45 49
46 @implementation BluetoothLowEnergyPeripheralDelegate 50 @implementation BluetoothLowEnergyPeripheralDelegate
47 51
(...skipping 25 matching lines...) Expand all
73 error:(NSError*)error { 77 error:(NSError*)error {
74 bridge_->DidDiscoverCharacteristics(service, error); 78 bridge_->DidDiscoverCharacteristics(service, error);
75 } 79 }
76 80
77 - (void)peripheral:(CBPeripheral*)peripheral 81 - (void)peripheral:(CBPeripheral*)peripheral
78 didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic 82 didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic
79 error:(NSError*)error { 83 error:(NSError*)error {
80 bridge_->DidUpdateValue(characteristic, error); 84 bridge_->DidUpdateValue(characteristic, error);
81 } 85 }
82 86
87 - (void)peripheral:(CBPeripheral*)peripheral
88 didWriteValueForCharacteristic:(nonnull CBCharacteristic*)characteristic
89 error:(nullable NSError*)error {
90 bridge_->DidWriteValue(characteristic, error);
91 }
83 @end 92 @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