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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 BluetoothUUID uuid_; | 116 BluetoothUUID uuid_; |
117 // Characteristic value. | 117 // Characteristic value. |
118 std::vector<uint8_t> value_; | 118 std::vector<uint8_t> value_; |
119 // True if a gatt read or write request is in progress. | 119 // True if a gatt read or write request is in progress. |
120 bool characteristic_value_read_or_write_in_progress_; | 120 bool characteristic_value_read_or_write_in_progress_; |
121 // ReadRemoteCharacteristic request callbacks. | 121 // ReadRemoteCharacteristic request callbacks. |
122 std::pair<ValueCallback, ErrorCallback> read_characteristic_value_callbacks_; | 122 std::pair<ValueCallback, ErrorCallback> read_characteristic_value_callbacks_; |
123 // WriteRemoteCharacteristic request callbacks. | 123 // WriteRemoteCharacteristic request callbacks. |
124 std::pair<base::Closure, ErrorCallback> write_characteristic_value_callbacks_; | 124 std::pair<base::Closure, ErrorCallback> write_characteristic_value_callbacks_; |
125 // Stores SubscribeToNotifications request callbacks. | 125 // Stores SubscribeToNotifications request callbacks. |
126 typedef std::pair<base::Closure, ErrorCallback> PendingNotifyCallback; | 126 typedef std::pair<base::Closure, ErrorCallback> PendingNotifyCallbacks; |
127 // Stores SubscribeToNotifications request callback. | 127 // Stores SubscribeToNotifications request callbacks. |
128 PendingNotifyCallback subscribe_to_notification_callback_; | 128 PendingNotifyCallbacks subscribe_to_notification_callbacks_; |
129 // Map of descriptors, keyed by descriptor identifier. | 129 // Map of descriptors, keyed by descriptor identifier. |
130 std::unordered_map<std::string, | 130 std::unordered_map<std::string, |
131 std::unique_ptr<BluetoothRemoteGattDescriptorMac>> | 131 std::unique_ptr<BluetoothRemoteGattDescriptorMac>> |
132 gatt_descriptor_macs_; | 132 gatt_descriptor_macs_; |
133 }; | 133 }; |
134 | 134 |
135 } // namespace device | 135 } // namespace device |
136 | 136 |
137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ | 137 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_CHARACTERISTIC_MAC_H_ |
OLD | NEW |