ccs.cpc
Class CPCPlaylist

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

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

A Playlist which liases with the CPC tracking-viewer mechanism. For use by plugins.


Field Summary
static java.lang.String XSPF
          The MIME type for an XSPF playlist.
 
Constructor Summary
CPCPlaylist(PluginRuntime runtime, PluginCallback callback, VFile initialvf, boolean isHandleXspf)
          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.
 void load()
          Load the playlist.
 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
 

Field Detail

XSPF

public static final java.lang.String XSPF
The MIME type for an XSPF playlist.

See Also:
Constant Field Values
Constructor Detail

CPCPlaylist

public CPCPlaylist(PluginRuntime runtime,
                   PluginCallback callback,
                   VFile initialvf,
                   boolean isHandleXspf)
A playlist.

Parameters:
runtime - The plugin in question.
callback - The callback you were given.
initialvf - The VFile you were launched against.
isHandleXspf - Whether you want the playlist to handle XSPFs internally. This will allow you to accept XSPFs and have them used as playlists automatically. If true, the playlist will not send XSPFs to you as tracks even if you're registered for them. If you're the type of plugin for which playlists make sense in the first place, this is usually a good idea.
Method Detail

load

public void load()
          throws java.io.IOException
Load the playlist. Call this before attempting to use it.

Throws:
java.io.IOException - If initialvf pointed to an XSPF, and the XSPF couldn't be loaded.

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