Package org.mpris

Class TrackListImpl.TrackListBuilder

java.lang.Object
org.mpris.TrackListImpl.TrackListBuilder
Enclosing class:
TrackListImpl

public static class TrackListImpl.TrackListBuilder extends Object
  • Constructor Details

    • TrackListBuilder

      public TrackListBuilder()
  • Method Details

    • setTracks

      public TrackListImpl.TrackListBuilder setTracks(List<org.freedesktop.dbus.DBusPath> tracks)
      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

      public TrackListImpl.TrackListBuilder setCanEditTracks(boolean canEditTracks)
      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

      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

      public TrackListImpl.TrackListBuilder setOnGoTo(TypeRunnable<org.freedesktop.dbus.DBusPath> OnGoTo)
      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

      public TrackListImpl build()
      Builds and instance of TrackList