template <>

class WireServer

Defined at line 1240 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.endpoint/fuchsia.hardware.usb.endpoint/cpp/fidl/fuchsia.hardware.usb.endpoint/cpp/wire_messaging.h

Pure-virtual interface to be implemented by a server.

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

<

::fuchsia_hardware_usb_endpoint::Endpoint>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_usb_endpoint::Endpoint>|).

Public Methods

void GetInfo (GetInfoCompleter::Sync & completer)

Gets endpoint information

void RegisterVmos (::fuchsia_hardware_usb_endpoint::wire::EndpointRegisterVmosRequest * request, RegisterVmosCompleter::Sync & completer)

Registers and pins VMOs to the vmo_ids. Returns

* vmo: Handles to successfully registered vmo_ids.

VMO IDs that are already are registered to will fail.

void UnregisterVmos (::fuchsia_hardware_usb_endpoint::wire::EndpointUnregisterVmosRequest * request, UnregisterVmosCompleter::Sync & completer)

Unregisters the VMOs corresponding to the vmo_ids. Returns

* failed_vmo_ids: vmo_ids that failed to unregister.

* errors: Error values that correspond 1:1 to failed_vmo_ids above.

void QueueRequests (::fuchsia_hardware_usb_endpoint::wire::EndpointQueueRequestsRequest * request, QueueRequestsCompleter::Sync & completer)

Submit Requests to queue. Processed starting with the 0th Request. Submitting a vector of

Requests allows for pre-buffering.

Clients are responsible for cache management and ensuring cache coherency.

After read requests:

- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that

have been mapped by the client.

- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.

Note that writing to any portion of a buffer before OnCompletion is called for that buffer

can corrupt the received data.

Before write requests:

- Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the

client.

- Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.

Requests may be pre-buffered. In other words, requests may be queued for data that is not

present/ready in the buffer yet. The USB Endpoint Server consuming requests does not care

if the data in the buffer is ready or not and will always process requests on schedule. It

is the responsibility of the USB Endpoint Client that submits requests to ensure that data

is ready on schedule.

* Definition of "on schedule" varies for different endpoints and controllers. In general,

this will be communicated by the `lead_time` parameter returned by `GetInfo`.

void CancelAll (CancelAllCompleter::Sync & completer)

Cancels all requests. Returns

* ZX_ERR_IO_NOT_PRESENT: If device is not running, disconnected, or inactive.

* ZX_ERR_IO: If cancel failed due to an unsuccessful request.

void WireServer ()

Defined at line 1243 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.endpoint/fuchsia.hardware.usb.endpoint/cpp/fidl/fuchsia.hardware.usb.endpoint/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 1244 of file fidling/gen/sdk/fidl/fuchsia.hardware.usb.endpoint/fuchsia.hardware.usb.endpoint/cpp/fidl/fuchsia.hardware.usb.endpoint/cpp/wire_messaging.h