/*
 * @(#)Writer.h
 *
 * This file is part of webCDwriter - Network CD Writing.
 *
 * Copyright (C) 2004 Jörg P. M. Haeger
 *
 * webCDwriter is free software. See CDWserver.cpp for details.
 */

#ifndef WRITER_H
#define WRITER_H

enum writerStates { idle, reserved, blanking,
	mkisofs, writing, fixating, verifying, reading };

struct Writer {
	int fifoPercent;
	class Server *owner;
	const class Thread *thread;
	enum writerStates state;
	int percent, reservedUntil;
	bool hasBurnFree;
	struct CDstate CDState;
	String pendingCommand;
	time_t burnT0;

	Writer() {
		fifoPercent = 100;
		owner = NULL;
		thread = NULL;
		state = idle;
		percent = 0;
		reservedUntil = 0;
		hasBurnFree = true;
		pendingCommand = "";
		burnT0 = 0;
	}
};

#endif
