pub enum AbsoluteVolumeHandlerRequest {
SetVolume {
requested_volume: u8,
responder: AbsoluteVolumeHandlerSetVolumeResponder,
},
OnVolumeChanged {
responder: AbsoluteVolumeHandlerOnVolumeChangedResponder,
},
GetCurrentVolume {
responder: AbsoluteVolumeHandlerGetCurrentVolumeResponder,
},
}
Expand description
Handler for absolute volume requests from a remote peer. See AVRCP v 1.6.2 section 6.13.2. Absolute volume is represented as a percentage using one byte with the most significant bit reserved. 0% is represented as 0x0 and 100% as 0x7f. Volume should scaled between the two values.
Variants§
SetVolume
Requests that the absolute volume of the player be changed.
requested_volume
is the requested volume by the peer.
Returns the actual volume set locally by the handler.
OnVolumeChanged
Returns latest volume of the handler to the AVRCP service. This function should return
immediately on the first call and if the volume has changed since the last call to this
function, otherwise it should only return when the volume has been changed.
Multiple outstanding OnVolumeChanged
requests can be made - all outstanding calls will
return when the volume has been changed.
Fields
GetCurrentVolume
Returns the current volume immediately.
Fields
Implementations§
Source§impl AbsoluteVolumeHandlerRequest
impl AbsoluteVolumeHandlerRequest
pub fn into_set_volume( self, ) -> Option<(u8, AbsoluteVolumeHandlerSetVolumeResponder)>
pub fn into_on_volume_changed( self, ) -> Option<AbsoluteVolumeHandlerOnVolumeChangedResponder>
pub fn into_get_current_volume( self, ) -> Option<AbsoluteVolumeHandlerGetCurrentVolumeResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL