template <>

class WireServer

Defined at line 815 of file fidling/gen/sdk/fidl/fuchsia.driver.framework/fuchsia.driver.framework/cpp/fidl/fuchsia.driver.framework/cpp/driver/wire_messaging.h

Pure-virtual interface to be implemented by a server.

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

<

::fuchsia_driver_framework::Driver>|

and |::fdf::ServerEnd

<

::fuchsia_driver_framework::Driver>|).

Public Methods

void Start (::fuchsia_driver_framework::wire::DriverStartRequest * request, fdf::Arena & arena, StartCompleter::Sync & completer)

Starts the driver with the given |start_args|.

Drivers should finish their initial setup and enumeration before returning from |Start|.

In particular they should enumerate all currently available nodes by utilizing

`fuchsia.driver.framework/Node.AddChild` and waiting for all calls to be completed.

The Framework will not consider the driver to be started until this call has returned

successfully. Therefore a driver will not have |Stop| called on it until after it has

replied to |Start| successfully.

If a driver returns an error, it will not have |Stop| called on it before the

Driver Framework initiates shutdown of the driver's dispatchers. Therefore it should have

performed all necessary cleanup before returning an error.

void Stop (fdf::Arena & arena, StopCompleter::Sync & completer)

Stops the driver. To stop, the driver should teardown any resources it set up in or after

|Start|. This is a one-way FIDL method. When the driver has completed stopping, it should

close its server end. Asynchronous operations should fully complete before closing

the server end.

void Suspend (fdf::Arena & arena, SuspendCompleter::Sync & completer)

Returns when the driver has suspended the hardware.

This is called when the power element requests the off power state.

The driver should turn off the hardware as a response to this call.

Note on execution order after a suspend is requested by the power element:

- dispatchers stop accepting new work in the work queue

- dispatcher drains previously queued work

- Once all work is drained, this method is called

The driver will not immediately |Stop| after it has been suspended.

It will first go through |Resume| before it is told to |Stop|.

void Resume (::fuchsia_driver_framework::wire::DriverResumeRequest * request, fdf::Arena & arena, ResumeCompleter::Sync & completer)

Returns when the driver has resumed the hardware.

This is called when the power framework requests the power element move to the on power state.

The driver should turn the hardware back on as a response to this call.

|power_element_lease| is the lease associated with the current wake if the

wake was from a wake vector. Otherwise it is None.

Note on execution order after a resume is requested by the power element:

- This method is called (the dispatcher does not accept any other work at this point)

- Once this method completes, dispatchers start accepting new work in the work queue

void WireServer ()

Defined at line 818 of file fidling/gen/sdk/fidl/fuchsia.driver.framework/fuchsia.driver.framework/cpp/fidl/fuchsia.driver.framework/cpp/driver/wire_messaging.h

Handler bind_handler (fdf_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 819 of file fidling/gen/sdk/fidl/fuchsia.driver.framework/fuchsia.driver.framework/cpp/fidl/fuchsia.driver.framework/cpp/driver/wire_messaging.h