diff --git a/pw_bluetooth_proxy/proxy_host.cc b/pw_bluetooth_proxy/proxy_host.cc index 6301fe081..5b8f7947d 100644 --- a/pw_bluetooth_proxy/proxy_host.cc +++ b/pw_bluetooth_proxy/proxy_host.cc @@ -545,22 +545,6 @@ pw::Result ProxyHost::AcquireBasicL2capChannel( /*event_fn=*/std::move(event_fn)); } -pw::Result ProxyHost::AcquireBasicL2capChannel( - uint16_t connection_handle, - uint16_t local_cid, - uint16_t remote_cid, - AclTransportType transport, - Function payload)>&& payload_from_controller_fn, - Function&& event_fn) { - return AcquireBasicL2capChannel(connection_handle, - local_cid, - remote_cid, - transport, - std::move(payload_from_controller_fn), - nullptr, - std::move(event_fn)); -} - namespace { pw::Result CreateGattNotifyChannel( diff --git a/pw_bluetooth_proxy/proxy_host_test.cc b/pw_bluetooth_proxy/proxy_host_test.cc index b5f9b3bc9..ff3bf92ef 100644 --- a/pw_bluetooth_proxy/proxy_host_test.cc +++ b/pw_bluetooth_proxy/proxy_host_test.cc @@ -2236,6 +2236,7 @@ TEST_F(BasicL2capChannelTest, BasicWrite) { /*remote_cid=*/capture.channel_id, /*transport=*/AclTransportType::kLe, /*payload_from_controller_fn=*/nullptr, + /*payload_from_host_fn=*/nullptr, /*event_fn=*/nullptr)); PW_TEST_EXPECT_OK( @@ -2268,6 +2269,7 @@ TEST_F(BasicL2capChannelTest, ErrorOnWriteTooLarge) { /*remote_cid=*/0x123, /*transport=*/AclTransportType::kLe, /*payload_from_controller_fn=*/nullptr, + /*payload_from_host_fn=*/nullptr, /*event_fn=*/nullptr)); EXPECT_EQ(channel.Write(MultiBufFromSpan(pw::span(hci_arr))).status, @@ -2293,6 +2295,7 @@ TEST_F(BasicL2capChannelTest, CannotCreateChannelWithInvalidArgs) { /*remote_cid=*/0x123, /*transport=*/AclTransportType::kLe, /*payload_from_controller_fn=*/nullptr, + /*payload_from_host_fn=*/nullptr, /*event_fn=*/nullptr) .status(), PW_STATUS_INVALID_ARGUMENT); @@ -2305,6 +2308,7 @@ TEST_F(BasicL2capChannelTest, CannotCreateChannelWithInvalidArgs) { /*remote_cid=*/0x123, /*transport=*/AclTransportType::kLe, /*payload_from_controller_fn=*/nullptr, + /*payload_from_host_fn=*/nullptr, /*event_fn=*/nullptr) .status(), PW_STATUS_INVALID_ARGUMENT); @@ -2344,6 +2348,7 @@ TEST_F(BasicL2capChannelTest, BasicRead) { capture.expected_payload.end())); return true; }, + /*payload_from_host_fn=*/nullptr, /*event_fn=*/nullptr)); std::array acl = diff --git a/pw_bluetooth_proxy/public/pw_bluetooth_proxy/proxy_host.h b/pw_bluetooth_proxy/public/pw_bluetooth_proxy/proxy_host.h index 2ea1c3554..fdce1967c 100644 --- a/pw_bluetooth_proxy/public/pw_bluetooth_proxy/proxy_host.h +++ b/pw_bluetooth_proxy/public/pw_bluetooth_proxy/proxy_host.h @@ -218,45 +218,6 @@ class ProxyHost { Function payload)>&& payload_from_host_fn, Function&& event_fn); - /// Returns an L2CAP channel operating in basic mode that supports writing to - /// and reading from a remote peer. - /// - /// @param[in] connection_handle The connection handle of the remote - /// peer. - /// - /// @param[in] local_cid L2CAP channel ID of the local - /// endpoint. - /// - /// @param[in] remote_cid L2CAP channel ID of the remote - /// endpoint. - /// - /// @param[in] transport Logical link transport type. - /// - /// @param[in] payload_from_controller_fn Read callback to be invoked on Rx - /// SDUs. Return value of false - /// indicates the packet should be - /// forwarded on to host. - /// - /// @param[in] event_fn Handle asynchronous events such as - /// errors encountered by the channel. - /// See `l2cap_channel_common.h`. - /// - /// @returns @rst - /// - /// .. pw-status-codes:: - /// INVALID_ARGUMENT: If arguments are invalid (check logs). - /// UNAVAILABLE: If channel could not be created because no memory was - /// available to accommodate an additional ACL connection. - /// @endrst - /// @deprecated - pw::Result AcquireBasicL2capChannel( - uint16_t connection_handle, - uint16_t local_cid, - uint16_t remote_cid, - AclTransportType transport, - Function payload)>&& payload_from_controller_fn, - Function&& event_fn); - /// Send a GATT Notify to the indicated connection. /// /// @param[in] connection_handle The connection handle of the peer to notify. diff --git a/pw_bluetooth_proxy/pw_bluetooth_proxy_private/test_utils.h b/pw_bluetooth_proxy/pw_bluetooth_proxy_private/test_utils.h index 5b4ba04ad..7af0e2b14 100644 --- a/pw_bluetooth_proxy/pw_bluetooth_proxy_private/test_utils.h +++ b/pw_bluetooth_proxy/pw_bluetooth_proxy_private/test_utils.h @@ -235,6 +235,7 @@ struct BasicL2capParameters { AclTransportType transport = AclTransportType::kLe; Function payload)>&& payload_from_controller_fn = nullptr; + Function payload)>&& payload_from_host_fn = nullptr; Function&& event_fn = nullptr; }; diff --git a/pw_bluetooth_proxy/test_utils.cc b/pw_bluetooth_proxy/test_utils.cc index 37612dcca..36b41329c 100644 --- a/pw_bluetooth_proxy/test_utils.cc +++ b/pw_bluetooth_proxy/test_utils.cc @@ -426,6 +426,7 @@ BasicL2capChannel BuildBasicL2capChannel(ProxyHost& proxy, params.remote_cid, params.transport, std::move(params.payload_from_controller_fn), + std::move(params.payload_from_host_fn), std::move(params.event_fn)); PW_TEST_EXPECT_OK(channel); return std::move(channel.value());