mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Refactor bluetooth code to use shared pointers instead of references.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace nearby {
|
||||
namespace linux {
|
||||
class BluetoothPairing final : public api::BluetoothPairing {
|
||||
public:
|
||||
BluetoothPairing(BluetoothAdapter &adapter, BluetoothDevice &remote_device);
|
||||
BluetoothPairing(BluetoothAdapter &adapter, std::shared_ptr<BluetoothDevice> remote_device);
|
||||
|
||||
bool InitiatePairing(api::BluetoothPairingCallback pairing_cb) override;
|
||||
bool FinishPairing(std::optional<absl::string_view> pin_code) override;
|
||||
@@ -44,7 +44,7 @@ class BluetoothPairing final : public api::BluetoothPairing {
|
||||
|
||||
sdbus::PendingAsyncCall pair_async_call_;
|
||||
|
||||
BluetoothDevice &device_;
|
||||
std::shared_ptr<BluetoothDevice> device_;
|
||||
linux::BluetoothAdapter &adapter_;
|
||||
|
||||
api::BluetoothPairingCallback pairing_cb_;
|
||||
|
||||
Reference in New Issue
Block a user