pub struct VolumePolicyControllerProxy { /* private fields */ }
Implementations§
source§impl VolumePolicyControllerProxy
impl VolumePolicyControllerProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.settings.policy/VolumePolicyController.
sourcepub fn take_event_stream(&self) -> VolumePolicyControllerEventStream
pub fn take_event_stream(&self) -> VolumePolicyControllerEventStream
Get a Stream of events from the remote end of the protocol.
Panics
Panics if the event stream was already taken.
sourcepub fn get_properties(&self) -> QueryResponseFut<Vec<Property>>
pub fn get_properties(&self) -> QueryResponseFut<Vec<Property>>
Gets a list of volume policy properties, including possible transforms and active policies for the property.
sourcepub fn add_policy(
&self,
target: &Target,
parameters: &PolicyParameters
) -> QueryResponseFut<VolumePolicyControllerAddPolicyResult>
pub fn add_policy( &self, target: &Target, parameters: &PolicyParameters ) -> QueryResponseFut<VolumePolicyControllerAddPolicyResult>
Adds a policy for the given target.
Returns a policy_id for the added policy, which can be used to remove the policy with RemovePolicy.
If the policy being added contradicts an existing policy, the add call will return an error. An example would be specifying a max volume for a stream that is lower than an existing min volume.
If the transform specified in the PolicyParameters is not enumerated in the available_transforms of the policy property, the connection will be closed.
Adding a policy will immediately adjust the audio setting values if they don’t yet conform to the policy, such as reducing the volume if it’s greater than a specified maximum volume.
sourcepub fn remove_policy(
&self,
policy_id: u32
) -> QueryResponseFut<VolumePolicyControllerRemovePolicyResult>
pub fn remove_policy( &self, policy_id: u32 ) -> QueryResponseFut<VolumePolicyControllerRemovePolicyResult>
Removes a policy with the given policy id.
Any client of this API can remove policies set by any other client.
Trait Implementations§
source§impl Clone for VolumePolicyControllerProxy
impl Clone for VolumePolicyControllerProxy
source§fn clone(&self) -> VolumePolicyControllerProxy
fn clone(&self) -> VolumePolicyControllerProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VolumePolicyControllerProxy
impl Debug for VolumePolicyControllerProxy
source§impl Proxy for VolumePolicyControllerProxy
impl Proxy for VolumePolicyControllerProxy
§type Protocol = VolumePolicyControllerMarker
type Protocol = VolumePolicyControllerMarker
Proxy
controls.