summaryrefslogtreecommitdiffstats
path: root/src/HTTP/HTTPServer.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-02-20 11:50:52 +0100
committerMattes D <github@xoft.cz>2016-03-01 16:19:58 +0100
commit52d18b4559cbaca949f722aa6901a6eb5f505f02 (patch)
tree614a441217b9ebcef17eb62e042223da1413b4aa /src/HTTP/HTTPServer.h
parentHTTP: Fixed response parser, unified API. (diff)
downloadcuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar.gz
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar.bz2
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar.lz
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar.xz
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.tar.zst
cuberite-52d18b4559cbaca949f722aa6901a6eb5f505f02.zip
Diffstat (limited to 'src/HTTP/HTTPServer.h')
-rw-r--r--src/HTTP/HTTPServer.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/HTTP/HTTPServer.h b/src/HTTP/HTTPServer.h
index 15202a50e..d06e13cac 100644
--- a/src/HTTP/HTTPServer.h
+++ b/src/HTTP/HTTPServer.h
@@ -22,6 +22,7 @@
// fwd:
class cHTTPMessage;
class cHTTPRequestParser;
+class cHTTPIncomingRequest;
class cHTTPResponse;
class cHTTPServerConnection;
@@ -40,14 +41,14 @@ public:
/** Called when a new request arrives over a connection and all its headers have been parsed.
The request body needn't have arrived yet. */
- virtual void OnRequestBegun(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request) = 0;
+ virtual void OnRequestBegun(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request) = 0;
/** Called when another part of request body has arrived.
May be called multiple times for a single request. */
- virtual void OnRequestBody(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request, const char * a_Data, size_t a_Size) = 0;
+ virtual void OnRequestBody(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request, const char * a_Data, size_t a_Size) = 0;
/** Called when the request body has been fully received in previous calls to OnRequestBody() */
- virtual void OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request) = 0;
+ virtual void OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request) = 0;
} ;
cHTTPServer(void);
@@ -85,14 +86,14 @@ protected:
cTCPLink::cCallbacksPtr OnIncomingConnection(const AString & a_RemoteIPAddress, UInt16 a_RemotePort);
/** Called by cHTTPServerConnection when it finishes parsing the request header */
- void NewRequest(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request);
+ void NewRequest(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request);
/** Called by cHTTPConenction when it receives more data for the request body.
May be called multiple times for a single request. */
- void RequestBody(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request, const char * a_Data, size_t a_Size);
+ void RequestBody(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request, const void * a_Data, size_t a_Size);
/** Called by cHTTPServerConnection when it detects that the request has finished (all of its body has been received) */
- void RequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequestParser & a_Request);
+ void RequestFinished(cHTTPServerConnection & a_Connection, cHTTPIncomingRequest & a_Request);
} ;