OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H |
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H | 6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 void OnWriteRemoteCharacteristicError( | 212 void OnWriteRemoteCharacteristicError( |
213 bool run_did_send_message_callback, | 213 bool run_did_send_message_callback, |
214 device::BluetoothGattService::GattErrorCode error); | 214 device::BluetoothGattService::GattErrorCode error); |
215 | 215 |
216 // Builds the value to be written on |to_peripheral_char_|. The value | 216 // Builds the value to be written on |to_peripheral_char_|. The value |
217 // corresponds to |signal| concatenated with |payload|. | 217 // corresponds to |signal| concatenated with |payload|. |
218 WriteRequest BuildWriteRequest(const std::vector<uint8>& signal, | 218 WriteRequest BuildWriteRequest(const std::vector<uint8>& signal, |
219 const std::vector<uint8>& bytes, | 219 const std::vector<uint8>& bytes, |
220 bool is_last_message_for_wire_message); | 220 bool is_last_message_for_wire_message); |
221 | 221 |
222 // Clears |write_requests_queue_|. | |
223 void ClearWriteRequestsQueue(); | |
224 | |
225 // Prints the time elapsed since |Connect()| was called. | 222 // Prints the time elapsed since |Connect()| was called. |
226 void PrintTimeElapsed(); | 223 void PrintTimeElapsed(); |
227 | 224 |
228 // Returns the device corresponding to |remote_device_address_|. | 225 // Returns the device corresponding to |remote_device_address_|. |
229 device::BluetoothDevice* GetRemoteDevice(); | 226 device::BluetoothDevice* GetRemoteDevice(); |
230 | 227 |
231 // Returns the service corresponding to |remote_service_| in the current | 228 // Returns the service corresponding to |remote_service_| in the current |
232 // device. | 229 // device. |
233 device::BluetoothGattService* GetRemoteService(); | 230 device::BluetoothGattService* GetRemoteService(); |
234 | 231 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 base::TimeTicks start_time_; | 300 base::TimeTicks start_time_; |
304 | 301 |
305 base::WeakPtrFactory<BluetoothLowEnergyConnection> weak_ptr_factory_; | 302 base::WeakPtrFactory<BluetoothLowEnergyConnection> weak_ptr_factory_; |
306 | 303 |
307 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnection); | 304 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnection); |
308 }; | 305 }; |
309 | 306 |
310 } // namespace proximity_auth | 307 } // namespace proximity_auth |
311 | 308 |
312 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H | 309 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_LOW_ENERGY_CONNECTION_H |
OLD | NEW |