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

Side by Side 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: Addressing msarda's comment 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 13 matching lines...) Expand all
24 } 24 }
25 25
26 void DidDiscoverPrimaryServices(NSError* error) { 26 void DidDiscoverPrimaryServices(NSError* error) {
27 device_mac_->DidDiscoverPrimaryServices(error); 27 device_mac_->DidDiscoverPrimaryServices(error);
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) {
35 device_mac_->DidUpdateValue(characteristic, error);
36 }
37
34 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); } 38 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
35 39
36 private: 40 private:
37 BluetoothLowEnergyDeviceMac* device_mac_; 41 BluetoothLowEnergyDeviceMac* device_mac_;
38 }; 42 };
39 43
40 } // namespace device 44 } // namespace device
41 45
42 @implementation BluetoothLowEnergyPeripheralDelegate 46 @implementation BluetoothLowEnergyPeripheralDelegate
43 47
(...skipping 19 matching lines...) Expand all
63 didDiscoverServices:(NSError*)error { 67 didDiscoverServices:(NSError*)error {
64 bridge_->DidDiscoverPrimaryServices(error); 68 bridge_->DidDiscoverPrimaryServices(error);
65 } 69 }
66 70
67 - (void)peripheral:(CBPeripheral*)peripheral 71 - (void)peripheral:(CBPeripheral*)peripheral
68 didDiscoverCharacteristicsForService:(CBService*)service 72 didDiscoverCharacteristicsForService:(CBService*)service
69 error:(NSError*)error { 73 error:(NSError*)error {
70 bridge_->DidDiscoverCharacteristics(service, error); 74 bridge_->DidDiscoverCharacteristics(service, error);
71 } 75 }
72 76
77 - (void)peripheral:(CBPeripheral*)peripheral
78 didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic
79 error:(NSError*)error {
80 bridge_->DidUpdateValue(characteristic, error);
81 }
82
73 @end 83 @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