Package org.mpris
Class PlaylistsImpl.PlaylistsBuilder
java.lang.Object
org.mpris.PlaylistsImpl.PlaylistsBuilder
- Enclosing class:
PlaylistsImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and instance of PlaylistsImplsetActivePlaylist(Playlists.Maybe_Playlist playlist) The currently-active playlist.setOnActivatePlaylist(TypeRunnable<org.freedesktop.dbus.DBusPath> onActivatePlaylist) Starts playing the given playlist.setOnGetPlaylists(ReturnableTypeRunnable<List<Playlists.Playlist>, PlaylistsImpl.GetPlaylists> onGetPlaylists) Gets a set of playlistssetOrderings(PlaylistOrdering... ordering) The available orderings.setPlaylistCount(int count) The number of playlists available.
-
Constructor Details
-
PlaylistsBuilder
public PlaylistsBuilder()
-
-
Method Details
-
setPlaylistCount
The number of playlists available.- See Also:
-
setOrderings
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
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
public PlaylistsImpl.PlaylistsBuilder setOnGetPlaylists(ReturnableTypeRunnable<List<Playlists.Playlist>, PlaylistsImpl.GetPlaylists> onGetPlaylists) Gets a set of playlists -
build
Builds and instance of PlaylistsImpl- Returns:
- Built instance of PlaylistsImpl
-