#ifndef HTTPSERVER_H
#define HTTPSERVER_H

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

class HTTPServer {
	class Socket &socket;
public:
	HTTPServer(class Socket &socket);
	~HTTPServer();
	class HTTPRequest *nextRequest();
	void run();
	void serve(class HTTPRequest &request,
			class PrintWriter &writer,
			bool isAdmin = false, bool isConfig = false);
private:
	void logResponse(class HTTPRequest &request,
			class HTTPResponse &response);
	static class StringBuffer &replace(class StringBuffer &buf,
			const char *key, class String &by);
	static class String *toString(int n, int digits);
};

#include "HTTPServerPro.h"

#endif
