added basic support for an embedded HTTP server. server

currently supports editing the screen map but changing
the map won't behave correctly if there are connected
screens.
This commit is contained in:
crs
2002-05-30 16:13:16 +00:00
parent 2cc63e31aa
commit 70f5f9491d
14 changed files with 1986 additions and 10 deletions

44
http/XHTTP.h Normal file
View File

@@ -0,0 +1,44 @@
#ifndef XHTTP_H
#define XHTTP_H
#include "BasicTypes.h"
#include "CString.h"
#include "XBase.h"
class CHTTPReply;
class XHTTP : public XBase {
public:
XHTTP(SInt32 statusCode);
XHTTP(SInt32 statusCode, const CString& reasonPhrase);
~XHTTP();
SInt32 getStatus() const;
CString getReason() const;
virtual void addHeaders(CHTTPReply&) const;
protected:
virtual CString getWhat() const throw();
private:
static const char* getReason(SInt32 status);
private:
SInt32 m_status;
CString m_reason;
};
class XHTTPAllow : public XHTTP {
public:
XHTTPAllow(const CString& allowedMethods);
~XHTTPAllow();
// XHTTP overrides
virtual void addHeaders(CHTTPReply&) const;
private:
CString m_allowed;
};
#endif