#ifndef HTTPSERVER_H #define HTTPSERVER_H /* * @(#)HTTPServer.h * * This file is part of webCDwriter - Network CD/DVD Writing. * * Copyright (C) 2002-2005 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 appendOutdatedWarning(String &str, File &file); void logResponse(class HTTPRequest &request, class HTTPResponse &response); /** * Add arguments following a ".jnlp?" to the JNLP file */ public: static void parseURI(String address, String &uri) { if (uri.indexOf(".jnlp?") >= 0) uri = "/config/error/oneClick.html"; } public: static void process( String &address, File &file, StringBuffer &workBuf) { } static class StringBuffer &replace(class StringBuffer &buf, const char *key, class String &by); static class String *toString(int n, int digits); }; #endif