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_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H |
6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H | 6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_FINDER_H |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 bool HasService(device::BluetoothDevice* device); | 119 bool HasService(device::BluetoothDevice* device); |
120 | 120 |
121 // Restarts the discovery session after creating |connection_| fails. | 121 // Restarts the discovery session after creating |connection_| fails. |
122 void RestartDiscoverySessionWhenReady(); | 122 void RestartDiscoverySessionWhenReady(); |
123 | 123 |
124 // Used to invoke |connection_callback_| asynchronously, decoupling the | 124 // Used to invoke |connection_callback_| asynchronously, decoupling the |
125 // callback invocation from the ConnectionObserver callstack. | 125 // callback invocation from the ConnectionObserver callstack. |
126 void InvokeCallbackAsync(); | 126 void InvokeCallbackAsync(); |
127 | 127 |
128 // Returns the device with |device_address|. | 128 // Returns the device with |device_address|. |
129 device::BluetoothDevice* GetDevice(std::string device_address); | 129 device::BluetoothDevice* GetDevice(const std::string& device_address); |
130 | 130 |
131 // The remote BLE device being searched. It maybe empty, in this case the | 131 // The remote BLE device being searched. It maybe empty, in this case the |
132 // remote device should advertise |remote_service_uuid_| and | 132 // remote device should advertise |remote_service_uuid_| and |
133 // |advertised_name_|. | 133 // |advertised_name_|. |
134 RemoteDevice remote_device_; | 134 RemoteDevice remote_device_; |
135 | 135 |
136 // The uuid of the service it looks for to establish a GattConnection. | 136 // The uuid of the service it looks for to establish a GattConnection. |
137 device::BluetoothUUID remote_service_uuid_; | 137 device::BluetoothUUID remote_service_uuid_; |
138 | 138 |
139 // The finder strategy being used. See |IsRightDevice()|. | 139 // The finder strategy being used. See |IsRightDevice()|. |
(...skipping 26 matching lines...) Expand all Loading... |
166 int max_number_of_tries_; | 166 int max_number_of_tries_; |
167 | 167 |
168 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_; | 168 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_; |
169 | 169 |
170 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder); | 170 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder); |
171 }; | 171 }; |
172 | 172 |
173 } // namespace proximity_auth | 173 } // namespace proximity_auth |
174 | 174 |
175 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H | 175 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H |
OLD | NEW |