Switch ConnectOverL2cap methods to use BlePeripheral::UniqueId instead of BlePeripheral object.

PiperOrigin-RevId: 756491579
This commit is contained in:
Francis Tsui
2025-05-08 15:52:01 -07:00
committed by Copybara-Service
parent 09ac8d8c58
commit e1c072e797
7 changed files with 27 additions and 26 deletions
+3 -2
View File
@@ -424,7 +424,7 @@ class BleL2capSocket {
// Returns valid BlePeripheral pointer if there is a connection, and
// nullptr otherwise.
virtual BlePeripheral* GetRemotePeripheral() = 0;
virtual BlePeripheral::UniqueId GetRemotePeripheralId() = 0;
};
// A BLE L2CAP server socket for listening incoming L2CAP socket.
@@ -616,7 +616,8 @@ class BleMedium {
// Platform implementation should override this method if it supports L2CAP.
virtual std::unique_ptr<BleL2capSocket> ConnectOverL2cap(
int psm, const std::string& service_id, TxPowerLevel tx_power_level,
BlePeripheral& peripheral, CancellationFlag* cancellation_flag) {
BlePeripheral::UniqueId peripheral_id,
CancellationFlag* cancellation_flag) {
return nullptr;
}