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

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

Issue 2595373003: Bluetooth: mac: Working on macOS descriptor implementation. (Closed)
Patch Set: Fixes Created 3 years, 11 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 26 matching lines...) Expand all
37 37
38 void DidWriteValue(CBCharacteristic* characteristic, NSError* error) { 38 void DidWriteValue(CBCharacteristic* characteristic, NSError* error) {
39 device_mac_->DidWriteValue(characteristic, error); 39 device_mac_->DidWriteValue(characteristic, error);
40 } 40 }
41 41
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,
48 NSError* error) {
49 device_mac_->DidDiscoverDescriptors(characteristic, error);
50 }
51
47 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); } 52 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
48 53
49 private: 54 private:
50 BluetoothLowEnergyDeviceMac* device_mac_; 55 BluetoothLowEnergyDeviceMac* device_mac_;
51 }; 56 };
52 57
53 } // namespace device 58 } // namespace device
54 59
55 @implementation BluetoothLowEnergyPeripheralDelegate 60 @implementation BluetoothLowEnergyPeripheralDelegate
56 61
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 error:(nullable NSError*)error { 99 error:(nullable NSError*)error {
95 bridge_->DidWriteValue(characteristic, error); 100 bridge_->DidWriteValue(characteristic, error);
96 } 101 }
97 102
98 - (void)peripheral:(CBPeripheral*)peripheral 103 - (void)peripheral:(CBPeripheral*)peripheral
99 didUpdateNotificationStateForCharacteristic: 104 didUpdateNotificationStateForCharacteristic:
100 (nonnull CBCharacteristic*)characteristic 105 (nonnull CBCharacteristic*)characteristic
101 error:(nullable NSError*)error { 106 error:(nullable NSError*)error {
102 bridge_->DidUpdateNotificationState(characteristic, error); 107 bridge_->DidUpdateNotificationState(characteristic, error);
103 } 108 }
109
110 - (void)peripheral:(CBPeripheral*)peripheral
111 didDiscoverDescriptorsForCharacteristic:(CBCharacteristic*)characteristic
112 error:(nullable NSError*)error {
113 bridge_->DidDiscoverDescriptors(characteristic, error);
114 }
115
104 @end 116 @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