|
@ -0,0 +1,79 @@ |
|
|
|
|
|
package device.cdPlayer; |
|
|
|
|
|
|
|
|
|
|
|
import device.Device; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
public class CDPlayer implements Device { |
|
|
|
|
|
|
|
|
|
|
|
// 0-Leer; true-1 |
|
|
|
|
|
private int CdDriveContent=0; |
|
|
|
|
|
private int CdFlap=0; |
|
|
|
|
|
private int volume = 0; |
|
|
|
|
|
private List<String> supportedFormats = new ArrayList<String>(Arrays.asList(new String[] {"Audio","MP3","WMA","AAC"})); |
|
|
|
|
|
|
|
|
|
|
|
private String actualPlayTrack=""; |
|
|
|
|
|
private CD loadedCD; |
|
|
|
|
|
private String[] cdAlbum=new String[]{}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void louder() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void quieter() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public int getVolume() { |
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void next() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void prev() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public String getInfoText() { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public String[] getOptions() { |
|
|
|
|
|
return new String[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public String[] getItemList() { |
|
|
|
|
|
return new String[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public String play() { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//Getters und Setters |
|
|
|
|
|
public void setCD(CD _loadedCD) { |
|
|
|
|
|
loadedCD=_loadedCD; |
|
|
|
|
|
this.setCdDriveContent(); |
|
|
|
|
|
this.actualPlayTrack=loadedCD.getPlayList()[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setCdDriveContent() { |
|
|
|
|
|
CdDriveContent = 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |