template <>

class Server

Defined at line 1075 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/cpp/natural_messaging.h

Public Methods

void PowerFullyOn (PowerFullyOnCompleter::Sync & completer)

Asks the device to enter a fully on state.

void Server ()

Defined at line 1078 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/cpp/natural_messaging.h

void Shutdown (ShutdownRequest & request, ShutdownCompleter::Sync & completer)

Asks the device to enter the state specified by `options.action`.

Arguments:

- options: The options with which to perform this request.

`ZX_ERR_INVALID_ARGS` is returned if `action` is absent.

`reasons` may be omitted, but adding a new enum value

instead is strongly encouraged.

void PerformReboot (PerformRebootRequest & request, PerformRebootCompleter::Sync & completer)

Asks the device to reboot.

Arguments:

- options: The options with which to perform this requests.

`ZX_ERR_INVALID_ARGS` is returned if the options are

malformed (i.e. `reasons` is absent or empty).

# Deprecation

Use Shutdown, which allows callers to specify the intended action and reasons for the

action.

void RebootToBootloader (RebootToBootloaderCompleter::Sync & completer)

Asks the device to reboot into the bootloader.

# Deprecation

Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to

bootloader.

void RebootToRecovery (RebootToRecoveryCompleter::Sync & completer)

Asks the device to reboot into the recovery partition.

# Deprecation

Use Shutdown, which allows callers to specify reasons why they are requesting a reboot to

recovery.

void Poweroff (PoweroffCompleter::Sync & completer)

Asks all devices to enter a powered off state.

# Deprecation

Use Shutdown, which allows callers to specify reasons why they are requesting a poweroff.

void Mexec (MexecRequest & request, MexecCompleter::Sync & completer)

Performs a kernel mexec.

It is expected that the ZBI items specified by

`zx_system_mexec_payload_get()` have not yet been appended to the

provided data ZBI.

void SuspendToRam (SuspendToRamCompleter::Sync & completer)

Asks the device to enter the suspend to RAM (S3) power state. Currently only supported on

x64. If a system state transition is already in progress then ZX_ERR_ALREADY_EXISTS is

returned. If the device fails to reach the suspend power state then ZX_ERR_INTERNAL is

returned. If the device successfully suspends, ZX_OK is returned when the device resumes.

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 ~Server ()

Defined at line 1079 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/cpp/natural_messaging.h