ccs.cpc.impl
Class TrackingPlaylistImpl

java.lang.Object
  extended by ccs.cpc.impl.TrackingPlaylistImpl
All Implemented Interfaces:
ccs.audio.Playlist

public class TrackingPlaylistImpl
extends java.lang.Object
implements ccs.audio.Playlist

A playlist implementation which tracks through a CPC device list using the normal CPC PluginCallback mechanism. Don't use this directly; use a CPCPlaylist instead.


Constructor Summary
TrackingPlaylistImpl(PluginRuntime runtime, PluginCallback callback, VFile initialvf, java.util.Set<java.lang.String> excludeMimes)
          A playlist.
 
Method Summary
 void changeTrack(ccs.audio.TrackChange motion)
          Change to a different track (or possibly the same one.)
 ccs.audio.Track currentTrack()
          The current track.
 ccs.audio.Track peekTrack(ccs.audio.TrackChange motion)
          The track which would be accessed by the next subsequent changeTrack() with the supplied motion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackingPlaylistImpl

public TrackingPlaylistImpl(PluginRuntime runtime,
                            PluginCallback callback,
                            VFile initialvf,
                            java.util.Set<java.lang.String> excludeMimes)
A playlist.

Parameters:
runtime - The plugin using this.
callback - The callback it was given.
initialvf - The VFile it was launched against.
excludeMimes - An optional set of MIME types for which the plugin may be registered, but nevertheless doesn't want to get back under the circumstances. May be null.
Method Detail

changeTrack

public void changeTrack(ccs.audio.TrackChange motion)
Description copied from interface: ccs.audio.Playlist
Change to a different track (or possibly the same one.)

Specified by:
changeTrack in interface ccs.audio.Playlist
Parameters:
motion - The track to change to. If the motion is NEXT and the current track is the last one, behaviour is implementation-dependent. Typically this will either change to the first track (loop around) or to no track (end of the playlist).

currentTrack

public ccs.audio.Track currentTrack()
Description copied from interface: ccs.audio.Playlist
The current track. This should only change in response to a changeTrack call.

Specified by:
currentTrack in interface ccs.audio.Playlist
Returns:
The current Track object, or null if there is none (end of playlist, playlist empty.)

peekTrack

public ccs.audio.Track peekTrack(ccs.audio.TrackChange motion)
Description copied from interface: ccs.audio.Playlist
The track which would be accessed by the next subsequent changeTrack() with the supplied motion. Don't change the current-track pointer.

Specified by:
peekTrack in interface ccs.audio.Playlist