Package org.mpris
Class TrackListImpl
java.lang.Object
org.mpris.TrackListImpl
- All Implemented Interfaces:
org.freedesktop.dbus.interfaces.DBusInterface,DBusProperties,TrackList
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.mpris.mpris.TrackList
TrackList.PathListType, TrackList.TrackAdded, TrackList.TrackListReplaced, TrackList.TrackMetadataChanged, TrackList.TrackRemoved -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a URI in the TrackList.voidemitTrackAdded(Metadata metadata, org.freedesktop.dbus.DBusPath afterTrack) Indicates that a track has been added to the track list.voidemitTrackListReplaced(List<org.freedesktop.dbus.DBusPath> tracks, org.freedesktop.dbus.DBusPath currentTrack) Indicates that the entire tracklist has been replaced.voidemitTrackMetadataChanged(org.freedesktop.dbus.DBusPath trackId, Metadata metadata) Indicates that the metadata of a track in the tracklist has changed.voidemitTrackRemoved(org.freedesktop.dbus.DBusPath trackId) Indicates that a track has been removed from the track list.org.freedesktop.dbus.types.Variant<?> GetTracksMetadata(List<org.freedesktop.dbus.DBusPath> TrackIds) voidGoTo(org.freedesktop.dbus.DBusPath TrackId) Skip to the specified TrackId.voidRemoveTrack(org.freedesktop.dbus.DBusPath TrackId) Removes an item from the TrackList.voidvoidsetCanEditTracks(boolean canEditTracks) If false, calling AddTrack or RemoveTrack will have no effect, and may raise a NotSupported error.protected voidsetConnection(org.freedesktop.dbus.connections.impl.DBusConnection connection) voidAn array which contains the identifier of each track in the tracklist, in order.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.freedesktop.dbus.interfaces.DBusInterface
isRemote
-
Method Details
-
setTracks
public void setTracks(List<org.freedesktop.dbus.DBusPath> tracks) throws org.freedesktop.dbus.exceptions.DBusException 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.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
setCanEditTracks
public void setCanEditTracks(boolean canEditTracks) throws org.freedesktop.dbus.exceptions.DBusException If false, calling AddTrack or RemoveTrack will have no effect, and may raise a NotSupported error.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
emitTrackListReplaced
public void emitTrackListReplaced(List<org.freedesktop.dbus.DBusPath> tracks, org.freedesktop.dbus.DBusPath currentTrack) throws org.freedesktop.dbus.exceptions.DBusException Indicates that the entire tracklist has been replaced.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
emitTrackAdded
public void emitTrackAdded(Metadata metadata, org.freedesktop.dbus.DBusPath afterTrack) throws org.freedesktop.dbus.exceptions.DBusException Indicates that a track has been added to the track list.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
emitTrackRemoved
public void emitTrackRemoved(org.freedesktop.dbus.DBusPath trackId) throws org.freedesktop.dbus.exceptions.DBusException Indicates that a track has been removed from the track list.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
emitTrackMetadataChanged
public void emitTrackMetadataChanged(org.freedesktop.dbus.DBusPath trackId, Metadata metadata) throws org.freedesktop.dbus.exceptions.DBusException Indicates that the metadata of a track in the tracklist has changed.- Throws:
org.freedesktop.dbus.exceptions.DBusException- See Also:
-
setConnection
protected void setConnection(org.freedesktop.dbus.connections.impl.DBusConnection connection) -
GetTracksMetadata
public List<Map<String,org.freedesktop.dbus.types.Variant<?>>> GetTracksMetadata(List<org.freedesktop.dbus.DBusPath> TrackIds) - Specified by:
GetTracksMetadatain interfaceTrackList
-
AddTrack
Description copied from interface:TrackListAdds 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.- Specified by:
AddTrackin interfaceTrackList- Parameters:
Uri- The uri of the item to add. Its uri scheme should be an element of the org.mpris.MediaPlayer2.SupportedUriSchemes property and the mime-type should match one of the elements of the org.mpris.MediaPlayer2.SupportedMimeTypesAfterTrack- The identifier of the track after which the new item should be inserted. The path /org/mpris/MediaPlayer2/TrackList/NoTrack indicates that the track should be inserted at the start of the track list.SetAsCurrent- Whether the newly inserted track should be considered as the current track. Setting this to true has the same effect as calling GoTo afterwards.
-
RemoveTrack
public void RemoveTrack(org.freedesktop.dbus.DBusPath TrackId) Description copied from interface:TrackListRemoves 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.- Specified by:
RemoveTrackin interfaceTrackList- Parameters:
TrackId- Identifier of the track to be removed. /org/mpris/MediaPlayer2/TrackList/NoTrack is not a valid value for this argument.
-
GoTo
public void GoTo(org.freedesktop.dbus.DBusPath TrackId) Description copied from interface:TrackListSkip 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. -
getObjectPath
- Specified by:
getObjectPathin interfaceorg.freedesktop.dbus.interfaces.DBusInterface
-
Get
public org.freedesktop.dbus.types.Variant<?> Get(String interface_name, String property_name) throws org.freedesktop.dbus.exceptions.DBusException - Specified by:
Getin interfaceDBusProperties- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
GetAll
public Map<String,org.freedesktop.dbus.types.Variant<?>> GetAll(String interface_name) throws org.freedesktop.dbus.exceptions.DBusException - Specified by:
GetAllin interfaceDBusProperties- Throws:
org.freedesktop.dbus.exceptions.DBusException
-
Set
public void Set(String interface_name, String property_name, org.freedesktop.dbus.types.Variant<?> value) throws org.freedesktop.dbus.exceptions.DBusException - Specified by:
Setin interfaceDBusProperties- Throws:
org.freedesktop.dbus.exceptions.DBusException
-