template <>
class NaturalClientImpl
Defined at line 524 of file fidling/gen/sdk/fidl/fuchsia.power.system/fuchsia.power.system/cpp/fidl/fuchsia.power.system/cpp/natural_messaging.h
Public Methods
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::GetPowerElements> GetPowerElements ()
Gets the power elements owned by the activity governor.
If an error occurs while the server is registering a power element with
the power broker or an error occurs while creating a token for a power
element, then the channel to `ActivityGovernor` will be closed by the
server and no response will be returned.
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::TakeWakeLease> TakeWakeLease (const ::fidl::Request< ::fuchsia_power_system::ActivityGovernor::TakeWakeLease> & request)
Creates a lease that blocks suspension of the hardware platform.
The hardware platform will not suspend as long as a valid
[`LeaseToken`] exists.
If an error occurs while creating a token for the wake lease, then the
channel to `ActivityGovernor` will be closed by the server and no
response will be returned.
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::AcquireWakeLease> AcquireWakeLease (const ::fidl::Request< ::fuchsia_power_system::ActivityGovernor::AcquireWakeLease> & request)
Creates a lease that blocks suspension of the hardware platform.
The hardware platform will not suspend as long as a valid
[`LeaseToken`] exists.
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::AcquireWakeLeaseWithToken> AcquireWakeLeaseWithToken (::fidl::Request< ::fuchsia_power_system::ActivityGovernor::AcquireWakeLeaseWithToken> request)
Creates a lease that blocks suspension of the hardware platform.
WARNING: Suspension can only be considered blocked after the client
receives the response to this call. This means, for example, an
interrupt should only be ack'ed or a different wake lease dropped only
**after** getting an error-free response.
The hardware platform will remain resumed until `server_token` observes
`PEER_CLOSED`, indicating all handles to the client side of the
`LeaseToken` are closed.
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::TakeApplicationActivityLease> TakeApplicationActivityLease (const ::fidl::Request< ::fuchsia_power_system::ActivityGovernor::TakeApplicationActivityLease> & request)
Creates a lease that blocks the system from dropping below the Application
Activity 'Active' state. In particular, this blocks suspension of the
hardware platform.
This method is _not_ safe to call during SuspendBlocker.BeforeSuspend.
If an error occurs while creating a token for the activity lease, then the
channel to `ActivityGovernor` will be closed by the server and no
response will be returned.
::fidl::internal::NaturalThenable< ::fuchsia_power_system::ActivityGovernor::RegisterSuspendBlocker> RegisterSuspendBlocker (::fidl::Request< ::fuchsia_power_system::ActivityGovernor::RegisterSuspendBlocker> request)
Registers a suspend blocker.
On successful registration, a wake lease token is returned. This token
prevents hardware platform suspension while it exists. Clients are
expected to perform any initialization of the given `suspend_blocker`
server while holding this token. Additionally, this means the first call
`suspend_blocker` will get is `BeforeSuspend`.
To unregister, close the `SuspendBlocker` channel.
If any required field of the table is missing, the error
[`RegisterSuspendBlockerError.INVALID_ARGS`] is returned.
If an error occurs while registering `suspend_blocker`, it will be
dropped, closing the channel.