template <typename ProtocolType, typename FakeEndpointType = FakeEndpoint>
class FakeUsbFidlProvider
Defined at line 224 of file ../../src/devices/usb/lib/usb-endpoint/testing/fake-usb-endpoint-server.h
FakeUsbFidlProvider is, as its name suggests, a fake USB FIDL server for testing.
ProtocolType must be one of fuchsia_hardware_usb_dci::UsbDci,
fuchsia_usb_hardware_function::UsbFunction, or fuchsia_hardware_usb::Usb. In other words,
ProtocolType is expected to have one function to override--void
ConnectToEndpoint(ConnectToEndpointRequest
&
request, ConnectToEndpointCompleter::Sync
&
completer).
fuchsia_hardware_usb_hci::UsbHci may also use this fake USB FIDL server, but will
have to override the ConnectToEndpoint and write a new ExpectConnectToEndpoint method to
accommodate device_id.
A specialization is provided for fuchsia_hardware_usb_function::UsbFunction
that stubs all calls.
It provides connections to several FakeEndpoints as requested. FakeEndpointType must be
FakeEndpoint or an inherited class of FakeEndpoint, defaulting to FakeEndpoint if not
specified.