Source code: irate/plugin/PluginApplication.java
1 // Copyright 2003 Stephen Blackheath
2
3 package irate.plugin;
4
5 import irate.common.Track;
6
7 /**
8 * This is the interface through which plugins talk to the application.
9 *
10 * Some things we could add:
11 * Event registration for plugins that want to
12 *
13 * @author Stephen Blackheath
14 */
15 public interface PluginApplication
16 {
17 /**
18 * Get a factory that creates suitable UI objects, depending on the style of
19 * user interface used in the application.
20 */
21 public PluginUIFactory getUIFactory();
22
23 /**
24 * Return true if music play is paused.
25 */
26 public boolean isPaused();
27
28 /**
29 * Pause or unpause music play.
30 */
31 public void setPaused(boolean paused);
32
33 /**
34 * Skip to the next song.
35 */
36 public void skip();
37
38 /**
39 * Get the track that is currently being played.
40 */
41 public Track getPlayingTrack();
42
43 /**
44 * Get the track that is currently selected. In some implementations
45 * this may be the same as the track that is playing.
46 */
47 public Track getSelectedTrack();
48
49 /**
50 * Set rating for the specified track.
51 */
52 public void setRating(Track track, int rating);
53 }
54