Replace AcceptedConnectionCallback structs with absl::AnyInvocable

PiperOrigin-RevId: 557949490
This commit is contained in:
Janusz Sobczak
2023-08-17 15:14:25 -07:00
committed by Copybara-Service
parent 408344244f
commit e38ce96964
25 changed files with 148 additions and 216 deletions
+2 -4
View File
@@ -99,10 +99,8 @@ class BleMedium {
virtual bool StopScanning(const std::string& service_id) = 0;
// Callback that is invoked when a new connection is accepted.
struct AcceptedConnectionCallback {
absl::AnyInvocable<void(BleSocket& socket, const std::string& service_id)>
accepted_cb = DefaultCallback<BleSocket&, const std::string&>();
};
using AcceptedConnectionCallback = absl::AnyInvocable<void(
BleSocket& socket, const std::string& service_id)>;
// Returns true once BLE socket connection requests to service_id can be
// accepted.