pub struct ActivityGovernorListenerProxy { /* private fields */ }
Implementations§
Source§impl ActivityGovernorListenerProxy
impl ActivityGovernorListenerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.system/ActivityGovernorListener.
Sourcepub fn take_event_stream(&self) -> ActivityGovernorListenerEventStream
pub fn take_event_stream(&self) -> ActivityGovernorListenerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn on_resume(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_resume(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Called when the activity governor detects a system resume.
This is only called when the wakeup reason returned by the platform requires a full system resume. The server is expected to respond once it has performed the operations required to keep the system awake, if needed.
SAG does not block on the response to this method, so the listener may safely call ActivityGovernor.AcquireWakeLease or ActivityGovernor.TakeApplicationActivityLease. In particular, it is not affected by https://fxbug.dev/389163722.
Sourcepub fn on_suspend_started(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_suspend_started( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Called before the activity governor initiates a system suspension.
The server is expected to respond once it has performed the operations it needs to prepare itself for suspend, if any.
It is not safe for this method to call ActivityGovernor.AcquireWakeLease or ActivityGovernor.TakeApplicationActivityLease, or to perform any other action that blocks on raising Execution State above its Inactive level. Doing so will currently result in a deadlock. This constraint will be removed; see https://fxbug.dev/389163722.
Sourcepub fn on_suspend_fail(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_suspend_fail( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Called when the activity governor detects a suspend failure.
The server is expected to respond to this notification. The activity governor will not attempt to suspend again until it receives the respond.
SAG does not block on the response to this method, so the listener may safely call ActivityGovernor.AcquireWakeLease or ActivityGovernor.TakeApplicationActivityLease. In particular, it is not affected by https://fxbug.dev/389163722.
Trait Implementations§
Source§impl ActivityGovernorListenerProxyInterface for ActivityGovernorListenerProxy
impl ActivityGovernorListenerProxyInterface for ActivityGovernorListenerProxy
type OnResumeResponseFut = QueryResponseFut<()>
type OnSuspendStartedResponseFut = QueryResponseFut<()>
type OnSuspendFailResponseFut = QueryResponseFut<()>
fn on_resume(&self) -> Self::OnResumeResponseFut
fn on_suspend_started(&self) -> Self::OnSuspendStartedResponseFut
fn on_suspend_fail(&self) -> Self::OnSuspendFailResponseFut
Source§impl Clone for ActivityGovernorListenerProxy
impl Clone for ActivityGovernorListenerProxy
Source§fn clone(&self) -> ActivityGovernorListenerProxy
fn clone(&self) -> ActivityGovernorListenerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Proxy for ActivityGovernorListenerProxy
impl Proxy for ActivityGovernorListenerProxy
Source§type Protocol = ActivityGovernorListenerMarker
type Protocol = ActivityGovernorListenerMarker
Proxy
controls.