Package org.mpris

Class PlaylistsImpl.PlaylistsBuilder

java.lang.Object
org.mpris.PlaylistsImpl.PlaylistsBuilder
Enclosing class:
PlaylistsImpl

public static class PlaylistsImpl.PlaylistsBuilder extends Object
  • Constructor Details

    • PlaylistsBuilder

      public PlaylistsBuilder()
  • Method Details

    • setPlaylistCount

      public PlaylistsImpl.PlaylistsBuilder setPlaylistCount(int count)
      The number of playlists available.
      See Also:
    • setOrderings

      public PlaylistsImpl.PlaylistsBuilder setOrderings(PlaylistOrdering... ordering)
      The available orderings. At least one must be offered.

      Media players may not have access to all the data required for some orderings. For example, creation times are not available on UNIX filesystems (don't let the ctime fool you!). On the other hand, clients should have some way to get the "most recent" playlists.
      See Also:
    • setActivePlaylist

      public PlaylistsImpl.PlaylistsBuilder setActivePlaylist(Playlists.Maybe_Playlist playlist)
      The currently-active playlist. If there is no currently-active playlist, the structure's Valid field will be false, and the Playlist details are undefined. Note that this may not have a value even after ActivatePlaylist is called with a valid playlist id as ActivatePlaylist implementations have the option of simply inserting the contents of the playlist into the current tracklist.
      See Also:
    • setOnActivatePlaylist

      public PlaylistsImpl.PlaylistsBuilder setOnActivatePlaylist(TypeRunnable<org.freedesktop.dbus.DBusPath> onActivatePlaylist)
      Starts playing the given playlist. Note that this must be implemented. If the media player does not allow clients to change the playlist, it should not implement this interface at all. It is up to the media player whether this completely replaces the current tracklist, or whether it is merely inserted into the tracklist and the first track starts. For example, if the media player is operating in a "jukebox" mode, it may just append the playlist to the list of upcoming tracks, and skip to the first track in the playlist.
      See Also:
    • setOnGetPlaylists

      Gets a set of playlists
    • build

      public PlaylistsImpl build()
      Builds and instance of PlaylistsImpl
      Returns:
      Built instance of PlaylistsImpl