Add client-side connection APIs for ble l2cap

PiperOrigin-RevId: 741061740
This commit is contained in:
Mingshiou Wu
2025-03-27 01:38:10 -07:00
committed by Copybara-Service
parent 04b2f9cfc6
commit aefcc4a8b2
7 changed files with 102 additions and 2 deletions
+10
View File
@@ -580,6 +580,16 @@ class BleMedium {
const std::string& service_id, TxPowerLevel tx_power_level,
BlePeripheral& peripheral, CancellationFlag* cancellation_flag) = 0;
// Connects to a BLE peripheral over L2CAP.
//
// On success, returns a new BleL2capSocket.
// On error, returns nullptr.
virtual std::unique_ptr<BleL2capSocket> ConnectOverL2cap(
const std::string& service_id, TxPowerLevel tx_power_level,
BlePeripheral& peripheral, CancellationFlag* cancellation_flag) {
return nullptr;
};
// Requests if support extended advertisement.
virtual bool IsExtendedAdvertisementsAvailable() = 0;