pub struct SessionControlProxy { /* private fields */ }
Implementations§
Source§impl SessionControlProxy
impl SessionControlProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.media.sessions2/SessionControl.
Sourcepub fn take_event_stream(&self) -> SessionControlEventStream
pub fn take_event_stream(&self) -> SessionControlEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn seek(&self, position: i64) -> Result<(), Error>
pub fn seek(&self, position: i64) -> Result<(), Error>
Seeks to a specific position in media. Implementations are free to
enter an error state if the position is out of bounds. position
is an offset from the beginning of the media.
Sourcepub fn skip_forward(&self) -> Result<(), Error>
pub fn skip_forward(&self) -> Result<(), Error>
Skips forward in media by the player’s default skip amount.
Sourcepub fn skip_reverse(&self) -> Result<(), Error>
pub fn skip_reverse(&self) -> Result<(), Error>
Skips in reverse in media by the player’s default skip amount.
Sourcepub fn next_item(&self) -> Result<(), Error>
pub fn next_item(&self) -> Result<(), Error>
Changes media to the next item (e.g. next song in playlist).
Sourcepub fn set_playback_rate(&self, playback_rate: f32) -> Result<(), Error>
pub fn set_playback_rate(&self, playback_rate: f32) -> Result<(), Error>
Sets the playback rate of the media. This will not change the playback mode.
Sourcepub fn set_repeat_mode(&self, repeat_mode: RepeatMode) -> Result<(), Error>
pub fn set_repeat_mode(&self, repeat_mode: RepeatMode) -> Result<(), Error>
Sets repeat mode to any of the supported repeat modes.
Sourcepub fn set_shuffle_mode(&self, shuffle_on: bool) -> Result<(), Error>
pub fn set_shuffle_mode(&self, shuffle_on: bool) -> Result<(), Error>
Sets shuffle mode.
Sourcepub fn bind_volume_control(
&self,
volume_control_request: ServerEnd<VolumeControlMarker>,
) -> Result<(), Error>
pub fn bind_volume_control( &self, volume_control_request: ServerEnd<VolumeControlMarker>, ) -> Result<(), Error>
Binds to the session’s volume control for control and notifications.
Sourcepub fn watch_status(
&self,
) -> QueryResponseFut<SessionInfoDelta, DefaultFuchsiaResourceDialect>
pub fn watch_status( &self, ) -> QueryResponseFut<SessionInfoDelta, DefaultFuchsiaResourceDialect>
Watches the session status. Leave a request hanging to receive a reply when the session status changes. The first request will be answered immediately with the current state.
Trait Implementations§
Source§impl Clone for SessionControlProxy
impl Clone for SessionControlProxy
Source§fn clone(&self) -> SessionControlProxy
fn clone(&self) -> SessionControlProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SessionControlProxy
impl Debug for SessionControlProxy
Source§impl Proxy for SessionControlProxy
impl Proxy for SessionControlProxy
Source§type Protocol = SessionControlMarker
type Protocol = SessionControlMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl SessionControlProxyInterface for SessionControlProxy
impl SessionControlProxyInterface for SessionControlProxy
type WatchStatusResponseFut = QueryResponseFut<SessionInfoDelta>
fn play(&self) -> Result<(), Error>
fn pause(&self) -> Result<(), Error>
fn stop(&self) -> Result<(), Error>
fn seek(&self, position: i64) -> Result<(), Error>
fn skip_forward(&self) -> Result<(), Error>
fn skip_reverse(&self) -> Result<(), Error>
fn next_item(&self) -> Result<(), Error>
fn prev_item(&self) -> Result<(), Error>
fn set_playback_rate(&self, playback_rate: f32) -> Result<(), Error>
fn set_repeat_mode(&self, repeat_mode: RepeatMode) -> Result<(), Error>
fn set_shuffle_mode(&self, shuffle_on: bool) -> Result<(), Error>
fn bind_volume_control( &self, volume_control_request: ServerEnd<VolumeControlMarker>, ) -> Result<(), Error>
fn watch_status(&self) -> Self::WatchStatusResponseFut
Auto Trait Implementations§
impl Freeze for SessionControlProxy
impl !RefUnwindSafe for SessionControlProxy
impl Send for SessionControlProxy
impl Sync for SessionControlProxy
impl Unpin for SessionControlProxy
impl !UnwindSafe for SessionControlProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)