pub enum VolumePolicyControllerRequest {
GetProperties {
responder: VolumePolicyControllerGetPropertiesResponder,
},
AddPolicy {
target: Target,
parameters: PolicyParameters,
responder: VolumePolicyControllerAddPolicyResponder,
},
RemovePolicy {
policy_id: u32,
responder: VolumePolicyControllerRemovePolicyResponder,
},
}
Expand description
Provides access to enumerating and modifying policies for the fuchsia.settings.Audio API.
Policies are automatically persisted across reboots and take effect again on boot.
Variants§
GetProperties
Fields
Gets a list of volume policy properties, including possible transforms and active policies for the property.
AddPolicy
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.
RemovePolicy
Removes a policy with the given policy id.
Any client of this API can remove policies set by any other client.
Implementations§
source§impl VolumePolicyControllerRequest
impl VolumePolicyControllerRequest
pub fn into_get_properties( self ) -> Option<VolumePolicyControllerGetPropertiesResponder>
pub fn into_add_policy( self ) -> Option<(Target, PolicyParameters, VolumePolicyControllerAddPolicyResponder)>
pub fn into_remove_policy( self ) -> Option<(u32, VolumePolicyControllerRemovePolicyResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL