MprisPlayer

Struct MprisPlayer 

Source
pub struct MprisPlayer { /* private fields */ }

Implementations§

Source§

impl MprisPlayer

Source

pub fn new( mpris_name: String, identify: String, desktop_entry: String, ) -> Arc<Self>

Source

pub fn property_changed<T>(&self, name: String, value: T)
where T: RefArg + 'static,

Source

pub fn seeked(&self, value: i64)

Source

pub fn set_supported_mime_types(&self, value: Vec<String>)

Source

pub fn set_supported_uri_schemes(&self, value: Vec<String>)

Source

pub fn set_can_quit(&self, value: bool)

Source

pub fn set_can_raise(&self, value: bool)

Source

pub fn set_can_set_fullscreen(&self, value: bool)

Source

pub fn set_has_track_list(&self, value: bool)

Source

pub fn set_playback_status(&self, value: PlaybackStatus)

Source

pub fn set_loop_status(&self, value: LoopStatus)

Source

pub fn set_metadata(&self, metadata: Metadata)

Source

pub fn set_position(&self, value: i64)

Source

pub fn set_minimum_rate(&self, value: f64)

Source

pub fn set_maximum_rate(&self, value: f64)

Source

pub fn set_can_go_next(&self, value: bool)

Source

pub fn set_can_go_previous(&self, value: bool)

Source

pub fn set_can_play(&self, value: bool)

Source

pub fn set_can_pause(&self, value: bool)

Source

pub fn set_can_seek(&self, value: bool)

Source

pub fn set_can_control(&self, value: bool)

Source

pub fn connect_raise<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_quit<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_next<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_previous<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_pause<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_play_pause<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_stop<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_play<F: FnMut() + 'static>(&self, callback: F)

Source

pub fn connect_seek<F: FnMut(i64) + 'static>(&self, callback: F)

Source

pub fn connect_open_uri<F: FnMut(&str) + 'static>(&self, callback: F)

Source

pub fn connect_fullscreen<F: FnMut(bool) + 'static>(&self, callback: F)

Source

pub fn connect_loop_status<F: FnMut(LoopStatus) + 'static>(&self, callback: F)

Source

pub fn connect_rate<F: FnMut(f64) + 'static>(&self, callback: F)

Source

pub fn connect_shuffle<F: FnMut(bool) + 'static>(&self, callback: F)

Source

pub fn connect_volume<F: FnMut(f64) + 'static>(&self, callback: F)

Trait Implementations§

Source§

impl Debug for MprisPlayer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl OrgMprisMediaPlayer2 for MprisPlayer

Source§

impl OrgMprisMediaPlayer2Player for MprisPlayer

Source§

type Err = MethodErr

Source§

fn next(&self) -> Result<(), Self::Err>

Source§

fn previous(&self) -> Result<(), Self::Err>

Source§

fn pause(&self) -> Result<(), Self::Err>

Source§

fn play_pause(&self) -> Result<(), Self::Err>

Source§

fn stop(&self) -> Result<(), Self::Err>

Source§

fn play(&self) -> Result<(), Self::Err>

Source§

fn seek(&self, offset: i64) -> Result<(), Self::Err>

Source§

fn set_position( &self, _track_id: Path<'_>, position: i64, ) -> Result<(), Self::Err>

Source§

fn open_uri(&self, uri: &str) -> Result<(), Self::Err>

Source§

fn get_playback_status(&self) -> Result<String, Self::Err>

Source§

fn get_loop_status(&self) -> Result<String, Self::Err>

Source§

fn set_loop_status(&self, value: String) -> Result<(), Self::Err>

Source§

fn get_rate(&self) -> Result<f64, Self::Err>

Source§

fn set_rate(&self, value: f64) -> Result<(), Self::Err>

Source§

fn get_shuffle(&self) -> Result<bool, Self::Err>

Source§

fn set_shuffle(&self, value: bool) -> Result<(), Self::Err>

Source§

fn get_metadata( &self, ) -> Result<HashMap<String, Variant<Box<dyn RefArg + 'static>>>, Self::Err>

Source§

fn get_volume(&self) -> Result<f64, Self::Err>

Source§

fn set_volume(&self, value: f64) -> Result<(), Self::Err>

Source§

fn get_position(&self) -> Result<i64, Self::Err>

Source§

fn get_minimum_rate(&self) -> Result<f64, Self::Err>

Source§

fn get_maximum_rate(&self) -> Result<f64, Self::Err>

Source§

fn get_can_go_next(&self) -> Result<bool, Self::Err>

Source§

fn get_can_go_previous(&self) -> Result<bool, Self::Err>

Source§

fn get_can_play(&self) -> Result<bool, Self::Err>

Source§

fn get_can_pause(&self) -> Result<bool, Self::Err>

Source§

fn get_can_seek(&self) -> Result<bool, Self::Err>

Source§

fn get_can_control(&self) -> Result<bool, Self::Err>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.