| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 friend class BluetoothRemoteGattDescriptorMac; | 69 friend class BluetoothRemoteGattDescriptorMac; |
| 70 friend class BluetoothRemoteGattServiceMac; | 70 friend class BluetoothRemoteGattServiceMac; |
| 71 friend class BluetoothTestMac; | 71 friend class BluetoothTestMac; |
| 72 | 72 |
| 73 void DiscoverDescriptors(); | 73 void DiscoverDescriptors(); |
| 74 // Called by the BluetoothRemoteGattServiceMac instance when the | 74 // Called by the BluetoothRemoteGattServiceMac instance when the |
| 75 // characteristics value has been read. | 75 // characteristics value has been read. |
| 76 void DidUpdateValue(NSError* error); | 76 void DidUpdateValue(NSError* error); |
| 77 // Updates value_ and notifies the adapter of the new value. | 77 // Updates value_. |
| 78 void UpdateValueAndNotify(); | 78 void UpdateValue(); |
| 79 // Called by the BluetoothRemoteGattServiceMac instance when the | 79 // Called by the BluetoothRemoteGattServiceMac instance when the |
| 80 // characteristics value has been written. | 80 // characteristics value has been written. |
| 81 void DidWriteValue(NSError* error); | 81 void DidWriteValue(NSError* error); |
| 82 // Called by the BluetoothRemoteGattServiceMac instance when the notify | 82 // Called by the BluetoothRemoteGattServiceMac instance when the notify |
| 83 // session has been started or failed to be started. | 83 // session has been started or failed to be started. |
| 84 void DidUpdateNotificationState(NSError* error); | 84 void DidUpdateNotificationState(NSError* error); |
| 85 // Called by the BluetoothRemoteGattServiceMac instance when the descriptors | 85 // Called by the BluetoothRemoteGattServiceMac instance when the descriptors |
| 86 // has been discovered. | 86 // has been discovered. |
| 87 void DidDiscoverDescriptors(); | 87 void DidDiscoverDescriptors(); |
| 88 // Returns true if the characteristic is readable. | 88 // Returns true if the characteristic is readable. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 PendingNotifyCallbacks unsubscribe_from_notification_callbacks_; | 131 PendingNotifyCallbacks unsubscribe_from_notification_callbacks_; |
| 132 // Map of descriptors, keyed by descriptor identifier. | 132 // Map of descriptors, keyed by descriptor identifier. |
| 133 std::unordered_map<std::string, | 133 std::unordered_map<std::string, |
| 134 std::unique_ptr<BluetoothRemoteGattDescriptorMac>> | 134 std::unique_ptr<BluetoothRemoteGattDescriptorMac>> |
| 135 gatt_descriptor_macs_; | 135 gatt_descriptor_macs_; |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 } // namespace device | 138 } // namespace device |
| 139 | 139 |
| 140 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 140 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
| OLD | NEW |