Package org.mpris
Class TrackListImpl.TrackListBuilder
java.lang.Object
org.mpris.TrackListImpl.TrackListBuilder
- Enclosing class:
TrackListImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and instance of TrackListsetCanEditTracks(boolean canEditTracks) If false, calling AddTrack or RemoveTrack will have no effect, and may raise a NotSupported error.setOnAddTracks(TypeRunnable<TrackListImpl.AddTrack> OnAddTracks) Adds a URI in the TrackList.setOnGetTracksMetadata(ReturnableTypeRunnable<List<Metadata>, List<org.freedesktop.dbus.DBusPath>> OnGetTracksMetadata) Gets all the metadata available for a set of tracks.setOnGoTo(TypeRunnable<org.freedesktop.dbus.DBusPath> OnGoTo) Skip to the specified TrackId.setOnRemoveTrack(TypeRunnable<org.freedesktop.dbus.DBusPath> OnRemoveTrack) Removes an item from the TrackList.An array which contains the identifier of each track in the tracklist, in order.
-
Constructor Details
-
TrackListBuilder
public TrackListBuilder()
-
-
Method Details
-
setTracks
An array which contains the identifier of each track in the tracklist, in order. The org.freedesktop.DBus.Properties.PropertiesChanged signal is emited every time this property changes, but the signal message does not contain the new value. Client implementations should rather rely on the TrackAdded, TrackRemoved and TrackListReplaced signals to keep their representation of the tracklist up to date.- See Also:
-
setCanEditTracks
If false, calling AddTrack or RemoveTrack will have no effect, and may raise a NotSupported error.- See Also:
-
setOnGetTracksMetadata
public TrackListImpl.TrackListBuilder setOnGetTracksMetadata(ReturnableTypeRunnable<List<Metadata>, List<org.freedesktop.dbus.DBusPath>> OnGetTracksMetadata) Gets all the metadata available for a set of tracks. Each set of metadata must have a "mpris:trackid" entry at the very least, which contains a D-Bus path that uniquely identifies this track within the scope of the tracklist.- See Also:
-
setOnAddTracks
public TrackListImpl.TrackListBuilder setOnAddTracks(TypeRunnable<TrackListImpl.AddTrack> OnAddTracks) Adds a URI in the TrackList. If the CanEditTracks property is false, this has no effect. Note: Clients should not assume that the track has been added at the time when this method returns. They should wait for a TrackAdded (or TrackListReplaced) signal.- See Also:
-
setOnRemoveTrack
public TrackListImpl.TrackListBuilder setOnRemoveTrack(TypeRunnable<org.freedesktop.dbus.DBusPath> OnRemoveTrack) Removes an item from the TrackList. If the track is not part of this tracklist, this has no effect. If the CanEditTracks property is false, this has no effect. Note: Clients should not assume that the track has been removed at the time when this method returns. They should wait for a TrackRemoved (or TrackListReplaced) signal.- See Also:
-
setOnGoTo
Skip to the specified TrackId. If the track is not part of this tracklist, this has no effect. If this object is not /org/mpris/MediaPlayer2, the current TrackList's tracks should be replaced with the contents of this TrackList, and the TrackListReplaced signal should be fired from /org/mpris/MediaPlayer2.- See Also:
-
build
Builds and instance of TrackList
-