pub struct VolumePolicyControllerSynchronousProxy { /* private fields */ }
Implementations§
source§impl VolumePolicyControllerSynchronousProxy
impl VolumePolicyControllerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<VolumePolicyControllerEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<VolumePolicyControllerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn get_properties(&self, ___deadline: Time) -> Result<Vec<Property>, Error>
pub fn get_properties(&self, ___deadline: Time) -> Result<Vec<Property>, Error>
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,
___deadline: Time
) -> Result<VolumePolicyControllerAddPolicyResult, Error>
pub fn add_policy( &self, target: &Target, parameters: &PolicyParameters, ___deadline: Time ) -> Result<VolumePolicyControllerAddPolicyResult, Error>
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,
___deadline: Time
) -> Result<VolumePolicyControllerRemovePolicyResult, Error>
pub fn remove_policy( &self, policy_id: u32, ___deadline: Time ) -> Result<VolumePolicyControllerRemovePolicyResult, Error>
Removes a policy with the given policy id.
Any client of this API can remove policies set by any other client.