template <>
class WireServer
Defined at line 1017 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/cpp/wire_messaging.h
Pure-virtual interface to be implemented by a server.
This interface uses typed channels (i.e. |::fidl::ClientEnd
<
::fuchsia_hardware_power_statecontrol::ShutdownWatcherRegister>|
and |::fidl::ServerEnd
<
::fuchsia_hardware_power_statecontrol::ShutdownWatcherRegister>|).
Public Methods
void RegisterWatcher (::fuchsia_hardware_power_statecontrol::wire::ShutdownWatcherRegisterRegisterWatcherRequest * request, RegisterWatcherCompleter::Sync & completer)
Registers a watcher to be notified when the `Admin.Shutdown` method is called.
Once the watcher has been successfully registered with the server, then
the request will be completed and the ShutdownWatcherRegister
channel will be left open (though a client is free to close it at this
time).
If there is an error in registering the watcher, then the
ShutdownWatcherRegister channel will be closed without completing
the request.
The provided `watcher` channel will be used at most once to notify the
watcher of an impending shutdown and allow it the chance to respond.
Watchers can unregister by closing their `ShutdownWatcher` channel.
void RegisterTerminalStateWatcher (::fuchsia_hardware_power_statecontrol::wire::ShutdownWatcherRegisterRegisterTerminalStateWatcherRequest * request, RegisterTerminalStateWatcherCompleter::Sync & completer)
Registers a watcher to be notified when the system begins a transition to a terminal state
regardless of the trigger.
The [`TerminalStateWatcher`] is notified for all reboots, power-offs, and kernel-initiated
shutdowns. It does not provide reasons or options.
Once the watcher has been successfully registered with the server, then
the request will be completed and the ShutdownWatcherRegister
channel will be left open (though a client is free to close it at this
time).
If there is an error in registering the watcher, then the
ShutdownWatcherRegister channel will be closed without completing
the request.
The provided `watcher` channel will be used at most once to notify the
watcher of an impending shutdown and allow it the chance to respond.
Watchers can unregister by closing their `TerminalStateWatcher` channel.
void WireServer ()
Defined at line 1020 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/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 1021 of file fidling/gen/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol/cpp/fidl/fuchsia.hardware.power.statecontrol/cpp/wire_messaging.h