17#include "pw_bluetooth_proxy/gatt_notify_channel.h"
18#include "pw_bluetooth_proxy/internal/acl_data_channel.h"
19#include "pw_bluetooth_proxy/internal/h4_storage.h"
20#include "pw_bluetooth_proxy/internal/hci_transport.h"
21#include "pw_bluetooth_proxy/internal/l2cap_channel_manager.h"
22#include "pw_bluetooth_proxy/l2cap_channel_common.h"
23#include "pw_bluetooth_proxy/l2cap_coc.h"
24#include "pw_bluetooth_proxy/l2cap_status_delegate.h"
25#include "pw_bluetooth_proxy/rfcomm_channel.h"
26#include "pw_status/status.h"
28namespace pw::bluetooth::proxy {
45 uint16_t le_acl_credits_to_reserve,
46 uint16_t br_edr_acl_credits_to_reserve);
159 uint16_t connection_handle,
160 L2capCoc::CocConfig rx_config,
161 L2capCoc::CocConfig tx_config,
163 ChannelEventCallback&& event_fn);
170 uint16_t additional_rx_credits);
214 uint16_t connection_handle,
217 AclTransportType transport,
218 OptionalPayloadReceiveCallback&& payload_from_controller_fn,
219 OptionalPayloadReceiveCallback&& payload_from_host_fn,
220 ChannelEventCallback&& event_fn);
243 int16_t connection_handle,
244 uint16_t attribute_handle,
245 ChannelEventCallback&& event_fn);
280 uint16_t connection_handle,
281 RfcommChannel::Config rx_config,
282 RfcommChannel::Config tx_config,
283 uint8_t channel_number,
285 ChannelEventCallback&& event_fn);
308 return H4Storage::GetNumH4Buffs();
313 return H4Storage::GetH4BuffSize() -
sizeof(emboss::H4PacketType);
318 return AclDataChannel::GetMaxNumAclConnections();
345 HciTransport hci_transport_;
348 AclDataChannel acl_data_channel_;
351 L2capChannelManager l2cap_channel_manager_;
H4PacketWithH4 is an H4Packet backed by an H4 buffer.
Definition: h4_packet.h:85
H4PacketWithHci is an H4Packet backed by an HCI buffer.
Definition: h4_packet.h:58
Definition: proxy_host.h:32
static constexpr size_t GetMaxNumAclConnections()
Returns the max number of simultaneous LE ACL connections supported.
Definition: proxy_host.h:317
pw::Result< RfcommChannel > AcquireRfcommChannel(multibuf::MultiBufAllocator &rx_multibuf_allocator, uint16_t connection_handle, RfcommChannel::Config rx_config, RfcommChannel::Config tx_config, uint8_t channel_number, Function< void(multibuf::MultiBuf &&payload)> &&payload_from_controller_fn, ChannelEventCallback &&event_fn)
pw::Result< GattNotifyChannel > AcquireGattNotifyChannel(int16_t connection_handle, uint16_t attribute_handle, ChannelEventCallback &&event_fn)
void HandleH4HciFromHost(H4PacketWithH4 &&h4_packet)
void RegisterL2capStatusDelegate(L2capStatusDelegate &delegate)
pw::Result< L2capCoc > AcquireL2capCoc(pw::multibuf::MultiBufAllocator &rx_multibuf_allocator, uint16_t connection_handle, L2capCoc::CocConfig rx_config, L2capCoc::CocConfig tx_config, Function< void(multibuf::MultiBuf &&payload)> &&receive_fn, ChannelEventCallback &&event_fn)
bool HasSendLeAclCapability() const
static constexpr size_t GetNumSimultaneousAclSendsSupported()
Definition: proxy_host.h:307
uint16_t GetNumFreeLeAclPackets() const
pw::Result< BasicL2capChannel > AcquireBasicL2capChannel(multibuf::MultiBufAllocator &rx_multibuf_allocator, uint16_t connection_handle, uint16_t local_cid, uint16_t remote_cid, AclTransportType transport, OptionalPayloadReceiveCallback &&payload_from_controller_fn, OptionalPayloadReceiveCallback &&payload_from_host_fn, ChannelEventCallback &&event_fn)
uint16_t GetNumFreeBrEdrAclPackets() const
pw::Status SendAdditionalRxCredits(uint16_t connection_handle, uint16_t local_cid, uint16_t additional_rx_credits)
static constexpr size_t GetMaxAclSendSize()
Returns the max LE ACL packet size supported to be sent.
Definition: proxy_host.h:312
void UnregisterL2capStatusDelegate(L2capStatusDelegate &delegate)
ProxyHost(pw::Function< void(H4PacketWithHci &&packet)> &&send_to_host_fn, pw::Function< void(H4PacketWithH4 &&packet)> &&send_to_controller_fn, uint16_t le_acl_credits_to_reserve, uint16_t br_edr_acl_credits_to_reserve)
bool HasSendBrEdrAclCapability() const
void HandleH4HciFromController(H4PacketWithHci &&h4_packet)
Definition: allocator.h:55
Definition: multibuf_v1.h:246
fit::function_impl< function_internal::config::kInlineCallableSize, !function_internal::config::kEnableDynamicAllocation, FunctionType, PW_FUNCTION_DEFAULT_ALLOCATOR_TYPE > Function
Definition: function.h:74