| OLD | NEW |
| 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 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| 7 | 7 |
| 8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" | 8 #include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
| 9 | 9 |
| 10 #include <unordered_map> | 10 #include <unordered_map> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 protected: | 59 protected: |
| 60 void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor, | 60 void SubscribeToNotifications(BluetoothRemoteGattDescriptor* ccc_descriptor, |
| 61 const base::Closure& callback, | 61 const base::Closure& callback, |
| 62 const ErrorCallback& error_callback) override; | 62 const ErrorCallback& error_callback) override; |
| 63 void UnsubscribeFromNotifications( | 63 void UnsubscribeFromNotifications( |
| 64 BluetoothRemoteGattDescriptor* ccc_descriptor, | 64 BluetoothRemoteGattDescriptor* ccc_descriptor, |
| 65 const base::Closure& callback, | 65 const base::Closure& callback, |
| 66 const ErrorCallback& error_callback) override; | 66 const ErrorCallback& error_callback) override; |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 friend class BluetoothLowEnergyDeviceMac; |
| 69 friend class BluetoothRemoteGattDescriptorMac; | 70 friend class BluetoothRemoteGattDescriptorMac; |
| 70 friend class BluetoothRemoteGattServiceMac; | 71 friend class BluetoothRemoteGattServiceMac; |
| 71 friend class BluetoothTestMac; | 72 friend class BluetoothTestMac; |
| 72 | 73 |
| 73 void DiscoverDescriptors(); | 74 void DiscoverDescriptors(); |
| 74 // Called by the BluetoothRemoteGattServiceMac instance when the | 75 // Called by the BluetoothRemoteGattServiceMac instance when the |
| 75 // characteristics value has been read. | 76 // characteristics value has been read. |
| 76 void DidUpdateValue(NSError* error); | 77 void DidUpdateValue(NSError* error); |
| 77 // Updates value_. | 78 // Updates value_. |
| 78 void UpdateValue(); | 79 void UpdateValue(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 // Stream operator for logging. | 139 // Stream operator for logging. |
| 139 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( | 140 DEVICE_BLUETOOTH_EXPORT std::ostream& operator<<( |
| 140 std::ostream& out, | 141 std::ostream& out, |
| 141 const BluetoothRemoteGattCharacteristicMac& characteristic); | 142 const BluetoothRemoteGattCharacteristicMac& characteristic); |
| 142 | 143 |
| 143 } // namespace device | 144 } // namespace device |
| 144 | 145 |
| 145 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 146 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| OLD | NEW |