Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: components/proximity_auth/ble/bluetooth_low_energy_connection.h

Issue 2560713002: Move RemoteDevice from //components/proximity_auth to //components/cryptauth so that it can be easi… (Closed)
Patch Set: Add cryptauth dependency. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_H_ 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_
6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_ 6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 NOTIFY_SESSION_READY, 80 NOTIFY_SESSION_READY,
81 WAITING_RESPONSE_SIGNAL, 81 WAITING_RESPONSE_SIGNAL,
82 CONNECTED, 82 CONNECTED,
83 }; 83 };
84 84
85 // Constructs a Bluetooth low energy connection to the service with 85 // Constructs a Bluetooth low energy connection to the service with
86 // |remote_service_| on the |remote_device|. The |adapter| must be already 86 // |remote_service_| on the |remote_device|. The |adapter| must be already
87 // initaalized and ready. The GATT connection may alreaady be established and 87 // initaalized and ready. The GATT connection may alreaady be established and
88 // pass through |gatt_connection|. A subsequent call to Connect() must be 88 // pass through |gatt_connection|. A subsequent call to Connect() must be
89 // made. 89 // made.
90 BluetoothLowEnergyConnection( 90 BluetoothLowEnergyConnection(const cryptauth::RemoteDevice& remote_device,
91 const RemoteDevice& remote_device, 91 scoped_refptr<device::BluetoothAdapter> adapter,
92 scoped_refptr<device::BluetoothAdapter> adapter, 92 const device::BluetoothUUID remote_service_uuid,
93 const device::BluetoothUUID remote_service_uuid, 93 BluetoothThrottler* bluetooth_throttler,
94 BluetoothThrottler* bluetooth_throttler, 94 int max_number_of_write_attempts);
95 int max_number_of_write_attempts);
96 95
97 ~BluetoothLowEnergyConnection() override; 96 ~BluetoothLowEnergyConnection() override;
98 97
99 // proximity_auth::Connection: 98 // proximity_auth::Connection:
100 void Connect() override; 99 void Connect() override;
101 void Disconnect() override; 100 void Disconnect() override;
102 std::string GetDeviceAddress() override; 101 std::string GetDeviceAddress() override;
103 102
104 protected: 103 protected:
105 // Exposed for testing. 104 // Exposed for testing.
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 base::TimeTicks start_time_; 306 base::TimeTicks start_time_;
308 307
309 base::WeakPtrFactory<BluetoothLowEnergyConnection> weak_ptr_factory_; 308 base::WeakPtrFactory<BluetoothLowEnergyConnection> weak_ptr_factory_;
310 309
311 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnection); 310 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyConnection);
312 }; 311 };
313 312
314 } // namespace proximity_auth 313 } // namespace proximity_auth
315 314
316 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_ 315 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_CONNECTION_H_
OLDNEW
« no previous file with comments | « components/proximity_auth/ble/BUILD.gn ('k') | components/proximity_auth/ble/bluetooth_low_energy_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698