template <>

class WireServer

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

Pure-virtual interface to be implemented by a server.

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

<

::fuchsia_hardware_input::Device>|

and |::fidl::ServerEnd

<

::fuchsia_hardware_input::Device>|).

Public Methods

void Query (QueryCompleter::Sync & completer)

Obtain information about the hidbus device and supported features.

void GetReportDesc (GetReportDescCompleter::Sync & completer)

Get the report descriptor

void GetDeviceReportsReader (::fuchsia_hardware_input::wire::DeviceGetDeviceReportsReaderRequest * request, GetDeviceReportsReaderCompleter::Sync & completer)

Open a new DeviceReportsReader on this device. Opening a DeviceReportsReader

allocates a new FIFO for receiving input reports.

void ReadReport (ReadReportCompleter::Sync & completer)

Read one report out of the report FIFO. Only a single report will be

returned in this API. `time` is the time the report was created, from

the view of the monotonic clock.

If status is ZX_ERR_SHOULD_WAIT the client can wait on the event

from `GetReportsEvent`.

void ReadReports (ReadReportsCompleter::Sync & completer)

Read up to MAX_REPORT_DATA bytes of reports that have been sent from a device.

This is the interface that is supposed to be used for continuous polling.

Multiple reports can be returned from this API at a time, it is up to the client

to do the parsing of the reports with the correct sizes and offset.

It is guaranteed that only whole reports will be sent.

If there are no reports, this will return ZX_ERR_SHOULD_WAIT, and the client can

wait on the event from `GetReportsEvent`.

void GetReportsEvent (GetReportsEventCompleter::Sync & completer)

Receive an event that will signal on `ZX_USER_SIGNAL_0` when there are reports in the

Device's report FIFO. This signal will be de-asserted when there are no

reports in the Device's report FIFO. This event can be re-used each time

the client wishes to know if there are reports in the FIFO.

void GetReport (::fuchsia_hardware_input::wire::DeviceGetReportRequest * request, GetReportCompleter::Sync & completer)

Send a request to the hardware for a given report described by type and id.

Returns the hardware's response. This interface is not intended

to be used for continuous polling of the reports.

void SetReport (::fuchsia_hardware_input::wire::DeviceSetReportRequest * request, SetReportCompleter::Sync & completer)

Set a single report of the given (type, id) pair.

void SetTraceId (::fuchsia_hardware_input::wire::DeviceSetTraceIdRequest * request, SetTraceIdCompleter::Sync & completer)

Set the trace ID that is used for HID report flow events.

void WireServer ()

Defined at line 2516 of file fidling/gen/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input/cpp/fidl/fuchsia.hardware.input/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 2517 of file fidling/gen/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input/cpp/fidl/fuchsia.hardware.input/cpp/wire_messaging.h