template <>

class WireServer

Defined at line 629 of file fidling/gen/sdk/fidl/fuchsia.hardware.fastboot/fuchsia.hardware.fastboot/cpp/fidl/fuchsia.hardware.fastboot/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

This interface uses typed channels (i.e. |::fidl::ClientEnd

<

::fuchsia_hardware_fastboot::FastbootImpl>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_fastboot::FastbootImpl>|).

Public Methods

void Send (::fuchsia_hardware_fastboot::wire::FastbootImplSendRequest * request, SendCompleter::Sync & completer)

Sends fastboot data via USB fastboot device.

This FIDL protocol blocks until all USB requests needed to send the data are completed. It

can only serve one request at a time.

Returns ZX_ERR_UNAVAILABLE if another call is made while a previous one is being processed,

or the FIDL is called too early during boot when the driver has not become ready.

void Receive (::fuchsia_hardware_fastboot::wire::FastbootImplReceiveRequest * request, ReceiveCompleter::Sync & completer)

Receives at least `requested` bytes of data from the USB fastboot device.

Upon success, a vmo is allocated and returned by the driver which contains the data and the

actual received data size (via vmo::get_prop_content_size()). Because USB transmission is

in the unit of packet (512bytes), the actual received size can be at most 512 bytes more

than the requested size.

If `requested` is 0, the driver returns as soon as a USB packet with data is received. This

should be the value used when expecting fastboot command which is guaranteed to be within a

single USB packet (a fastboot command is no more than 64 bytes as per protocol). When

expecting larger amount of data during image download, it should be set to a larger value

to avoid the overhead of calling this FIDL too many times, as it can be very expensive

comparing to actual data transfer.

This FIDL protocol is blocking and can only serve one request at a time (Send() is not

affected. Receive() and Send() are individually synchronous).

Returns ZX_ERR_UNAVAILABLE if another call is made while a previous one is being processed,

or the FIDL is called too early during boot when the driver has not become ready.

void WireServer ()

Defined at line 632 of file fidling/gen/sdk/fidl/fuchsia.hardware.fastboot/fuchsia.hardware.fastboot/cpp/fidl/fuchsia.hardware.fastboot/cpp/wire_messaging.h

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~WireServer ()

Defined at line 633 of file fidling/gen/sdk/fidl/fuchsia.hardware.fastboot/fuchsia.hardware.fastboot/cpp/fidl/fuchsia.hardware.fastboot/cpp/wire_messaging.h