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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 | 91 |
92 // Stops the discovery session given by |discovery_session_|. | 92 // Stops the discovery session given by |discovery_session_|. |
93 void StopDiscoverySession(); | 93 void StopDiscoverySession(); |
94 | 94 |
95 // Checks if a service with |service_uuid| is offered by |remote_device|. | 95 // Checks if a service with |service_uuid| is offered by |remote_device|. |
96 bool HasService(device::BluetoothDevice* remote_device); | 96 bool HasService(device::BluetoothDevice* remote_device); |
97 | 97 |
98 // Restarts the discovery session after creating |connection_| fails. | 98 // Restarts the discovery session after creating |connection_| fails. |
99 void RestartDiscoverySessionWhenReady(); | 99 void RestartDiscoverySessionWhenReady(); |
100 | 100 |
101 // Used to invokes |connection_callback_| asynchronously, decoupling the | |
sacomoto
2015/08/10 19:40:28
nit: s/invokes/invoke/
Tim Song
2015/08/10 22:17:55
Done.
| |
102 // callback invocation from the ConnectionObserver callstack. | |
103 void InvokeCallbackAsync(); | |
104 | |
101 // Returns the device with |device_address|. | 105 // Returns the device with |device_address|. |
102 device::BluetoothDevice* GetDevice(std::string device_address); | 106 device::BluetoothDevice* GetDevice(std::string device_address); |
103 | 107 |
104 // The uuid of the service it looks for to establish a GattConnection. | 108 // The uuid of the service it looks for to establish a GattConnection. |
105 device::BluetoothUUID remote_service_uuid_; | 109 device::BluetoothUUID remote_service_uuid_; |
106 | 110 |
107 // Characteristic used to send data to the remote device. | 111 // Characteristic used to send data to the remote device. |
108 device::BluetoothUUID to_peripheral_char_uuid_; | 112 device::BluetoothUUID to_peripheral_char_uuid_; |
109 | 113 |
110 // Characteristic used to receive data from the remote device. | 114 // Characteristic used to receive data from the remote device. |
(...skipping 24 matching lines...) Expand all Loading... | |
135 int max_number_of_tries_; | 139 int max_number_of_tries_; |
136 | 140 |
137 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_; | 141 base::WeakPtrFactory<BluetoothLowEnergyConnectionFinder> weak_ptr_factory_; |
138 | 142 |
139 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder); | 143 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnectionFinder); |
140 }; | 144 }; |
141 | 145 |
142 } // namespace proximity_auth | 146 } // namespace proximity_auth |
143 | 147 |
144 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H | 148 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_CONNECTION_FINDER_H |
OLD | NEW |