package extended;
import com.jitcaforwin.extended.JitcaiTunesController;
import com.jitcaforwin.extended.api.IJitcaITunesController;
import com.jitcaforwin.extended.api.internal.CD;
import com.jitcaforwin.main.exceptions.JitcaException;
public class CDDemo {
public static void main(String[] args) {
try {
IJitcaITunesController iTunes = new JitcaiTunesController(true);
CD cd = iTunes.getCD();
if (cd == null)
{
if (iTunes.getCDs() != null){
System.out.println("More than one CD is available!");
} else {
System.out.println("No CD available!");
}
} else {
System.out.println("Start playing: " + cd.getTitle());
cd.play();
}
iTunes.close();
} catch (JitcaException e) {
e.printStackTrace();
}
}
}