pub struct TrackListProxy<'p>(/* private fields */);Expand description
Proxy for the org.mpris.MediaPlayer2.TrackList interface.
Implementations§
Source§impl<'p> TrackListProxy<'p>
impl<'p> TrackListProxy<'p>
Sourcepub async fn new<D>(
conn: &Connection,
destination: D,
) -> Result<TrackListProxy<'p>>
pub async fn new<D>( conn: &Connection, destination: D, ) -> Result<TrackListProxy<'p>>
Creates a new proxy with the given destination, and the default path.
Sourcepub fn builder(conn: &Connection) -> Builder<'p, Self>
pub fn builder(conn: &Connection) -> Builder<'p, Self>
Returns a customizable builder for this proxy.
Sourcepub fn into_inner(self) -> Proxy<'p>
pub fn into_inner(self) -> Proxy<'p>
Consumes self, returning the underlying zbus::Proxy.
Sourcepub fn inner_mut(&mut self) -> &mut Proxy<'p>
pub fn inner_mut(&mut self) -> &mut Proxy<'p>
The mutable reference to the underlying zbus::Proxy.
Sourcepub async fn get_tracks_metadata(
&self,
track_ids: Vec<TrackId>,
) -> Result<Vec<Metadata>>
pub async fn get_tracks_metadata( &self, track_ids: Vec<TrackId>, ) -> Result<Vec<Metadata>>
GetTracksMetadata method
Sourcepub async fn add_track(
&self,
uri: &str,
after_track: TrackId,
set_as_current: bool,
) -> Result<()>
pub async fn add_track( &self, uri: &str, after_track: TrackId, set_as_current: bool, ) -> Result<()>
AddTrack method
Sourcepub async fn remove_track(&self, track_id: TrackId) -> Result<()>
pub async fn remove_track(&self, track_id: TrackId) -> Result<()>
RemoveTrack method
Sourcepub async fn receive_track_list_replaced(
&self,
) -> Result<TrackListReplacedStream>
pub async fn receive_track_list_replaced( &self, ) -> Result<TrackListReplacedStream>
Create a stream that receives TrackListReplaced signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
TrackListReplaced signal
Indicates that the entire tracklist has been replaced.
It is left up to the implementation to decide when a change to the track list is invasive enough that this signal should be emitted instead of a series of TrackAdded and TrackRemoved signals.
/org/mpris/MediaPlayer2/TrackList/NoTrack indicates that there is no current track.
Sourcepub async fn receive_track_list_replaced_with_args(
&self,
args: &[(u8, &str)],
) -> Result<TrackListReplacedStream>
pub async fn receive_track_list_replaced_with_args( &self, args: &[(u8, &str)], ) -> Result<TrackListReplacedStream>
Create a stream that receives TrackListReplaced signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
TrackListReplaced signal
Indicates that the entire tracklist has been replaced.
It is left up to the implementation to decide when a change to the track list is invasive enough that this signal should be emitted instead of a series of TrackAdded and TrackRemoved signals.
/org/mpris/MediaPlayer2/TrackList/NoTrack indicates that there is no current track.
Sourcepub async fn receive_track_added(&self) -> Result<TrackAddedStream>
pub async fn receive_track_added(&self) -> Result<TrackAddedStream>
Create a stream that receives TrackAdded signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
TrackAdded signal
Indicates that a track has been added to the track list.
Sourcepub async fn receive_track_added_with_args(
&self,
args: &[(u8, &str)],
) -> Result<TrackAddedStream>
pub async fn receive_track_added_with_args( &self, args: &[(u8, &str)], ) -> Result<TrackAddedStream>
Create a stream that receives TrackAdded signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
TrackAdded signal
Indicates that a track has been added to the track list.
Sourcepub async fn receive_track_removed(&self) -> Result<TrackRemovedStream>
pub async fn receive_track_removed(&self) -> Result<TrackRemovedStream>
Create a stream that receives TrackRemoved signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
TrackRemoved signal
Indicates that a track has been removed from the track list.
Sourcepub async fn receive_track_removed_with_args(
&self,
args: &[(u8, &str)],
) -> Result<TrackRemovedStream>
pub async fn receive_track_removed_with_args( &self, args: &[(u8, &str)], ) -> Result<TrackRemovedStream>
Create a stream that receives TrackRemoved signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
TrackRemoved signal
Indicates that a track has been removed from the track list.
Sourcepub async fn receive_track_metadata_changed(
&self,
) -> Result<TrackMetadataChangedStream>
pub async fn receive_track_metadata_changed( &self, ) -> Result<TrackMetadataChangedStream>
Create a stream that receives TrackMetadataChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal.
TrackMetadataChanged signal
Indicates that the metadata of a track in the tracklist has changed.
This may indicate that a track has been replaced, in which case the mpris:trackid metadata entry is different from the track argument.
Sourcepub async fn receive_track_metadata_changed_with_args(
&self,
args: &[(u8, &str)],
) -> Result<TrackMetadataChangedStream>
pub async fn receive_track_metadata_changed_with_args( &self, args: &[(u8, &str)], ) -> Result<TrackMetadataChangedStream>
Create a stream that receives TrackMetadataChanged signals.
This a convenient wrapper around zbus::Proxy::receive_signal_with_args.
TrackMetadataChanged signal
Indicates that the metadata of a track in the tracklist has changed.
This may indicate that a track has been replaced, in which case the mpris:trackid metadata entry is different from the track argument.
Sourcepub fn cached_tracks(
&self,
) -> Result<Option<<Result<Vec<TrackId>> as ResultAdapter>::Ok>, <Result<Vec<TrackId>> as ResultAdapter>::Err>
pub fn cached_tracks( &self, ) -> Result<Option<<Result<Vec<TrackId>> as ResultAdapter>::Ok>, <Result<Vec<TrackId>> as ResultAdapter>::Err>
Tracks property
Get the cached value of the Tracks property, or None if the property is not cached.
Sourcepub async fn receive_tracks_changed(
&self,
) -> PropertyStream<'p, <Result<Vec<TrackId>> as ResultAdapter>::Ok>
pub async fn receive_tracks_changed( &self, ) -> PropertyStream<'p, <Result<Vec<TrackId>> as ResultAdapter>::Ok>
Tracks property
Create a stream for the Tracks property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Sourcepub async fn can_edit_tracks(&self) -> Result<bool>
pub async fn can_edit_tracks(&self) -> Result<bool>
CanEditTracks property
Sourcepub fn cached_can_edit_tracks(
&self,
) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
pub fn cached_can_edit_tracks( &self, ) -> Result<Option<<Result<bool> as ResultAdapter>::Ok>, <Result<bool> as ResultAdapter>::Err>
CanEditTracks property
Get the cached value of the CanEditTracks property, or None if the property is not cached.
Sourcepub async fn receive_can_edit_tracks_changed(
&self,
) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
pub async fn receive_can_edit_tracks_changed( &self, ) -> PropertyStream<'p, <Result<bool> as ResultAdapter>::Ok>
CanEditTracks property
Create a stream for the CanEditTracks property changes. This is a convenient wrapper around zbus::Proxy::receive_property_changed.
Trait Implementations§
Source§impl<'p> AsMut<Proxy<'p>> for TrackListProxy<'p>
impl<'p> AsMut<Proxy<'p>> for TrackListProxy<'p>
Source§impl<'p> AsRef<Proxy<'p>> for TrackListProxy<'p>
impl<'p> AsRef<Proxy<'p>> for TrackListProxy<'p>
Source§impl<'p> Clone for TrackListProxy<'p>
impl<'p> Clone for TrackListProxy<'p>
Source§fn clone(&self) -> TrackListProxy<'p>
fn clone(&self) -> TrackListProxy<'p>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more