/*
 * @(#)Blank.java
 *
 * This file is part of webCDwriter - Network CD Writing.
 *
 * Copyright (C) 2001-2003 Jörg P. M. Haeger
 *
 * webCDwriter is free software. See CDcreator.java for details.
 *
 * Jörg Haeger, 11.06.2001
 */

/**
 * Execution of a "blank" command.
 *
 * @version 20031022
 * @author Jörg P. M. Haeger
 */
public class Blank extends Burn {
	public Blank(boolean all) {
		this.all = all;
	}

	protected void execBurnCommand() {
		if (Options.acceptKey.length() > 0)
			execCommand("setAcceptKey "
				+ spaceToEsc(Options.acceptKey));
		if (Mode.isMediumDVD())
			execCommand("setMedium " + Mode.medium);
		if (CDcreator.writeProtection && Options.rejectEmptyCD)
			execCommand("setRejectEmptyCD");
		if (CDcreator.writeProtection && Options.rejectWithoutUserID)
			execCommand("setRejectWithoutUserID");
		if (Options.speed > 0)
			execCommand("setSpeed " + Options.speed);
		String cmd = "blank ";
		if (all)
			cmd += "all";
		else
			cmd += "fast";
		execCommand(cmd);
	}

	void showResult() {
	}

	private boolean all;
}
