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

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

Issue 2094633003: Bluetooth: Mac: implementation for start notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@write_read_characteristicscan_servicescan_cleanup
Patch Set: Addressing msarda's comments 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 21 matching lines...) Expand all
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) { 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,
43 NSError* error) {
44 device_mac_->DidUpdateNotificationState(characteristic, error);
45 }
46
42 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); } 47 CBPeripheral* GetPeripheral() { return device_mac_->GetPeripheral(); }
43 48
44 private: 49 private:
45 BluetoothLowEnergyDeviceMac* device_mac_; 50 BluetoothLowEnergyDeviceMac* device_mac_;
46 }; 51 };
47 52
48 } // namespace device 53 } // namespace device
49 54
50 @implementation BluetoothLowEnergyPeripheralDelegate 55 @implementation BluetoothLowEnergyPeripheralDelegate
51 56
(...skipping 30 matching lines...) Expand all
82 didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic 87 didUpdateValueForCharacteristic:(CBCharacteristic*)characteristic
83 error:(NSError*)error { 88 error:(NSError*)error {
84 bridge_->DidUpdateValue(characteristic, error); 89 bridge_->DidUpdateValue(characteristic, error);
85 } 90 }
86 91
87 - (void)peripheral:(CBPeripheral*)peripheral 92 - (void)peripheral:(CBPeripheral*)peripheral
88 didWriteValueForCharacteristic:(nonnull CBCharacteristic*)characteristic 93 didWriteValueForCharacteristic:(nonnull CBCharacteristic*)characteristic
89 error:(nullable NSError*)error { 94 error:(nullable NSError*)error {
90 bridge_->DidWriteValue(characteristic, error); 95 bridge_->DidWriteValue(characteristic, error);
91 } 96 }
97
98 - (void)peripheral:(CBPeripheral*)peripheral
99 didUpdateNotificationStateForCharacteristic:
100 (nonnull CBCharacteristic*)characteristic
101 error:(nullable NSError*)error {
102 bridge_->DidUpdateNotificationState(characteristic, error);
103 }
92 @end 104 @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