From 2dbc54a14824329faf53851441c6585fd451f0a2 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 25 Dec 2015 19:42:50 +0100 Subject: [PATCH] Renamed the HTTP classes to indicate they're for server. --- src/HTTPServer/CMakeLists.txt | 10 +++--- src/HTTPServer/HTTPServer.cpp | 20 +++++------ src/HTTPServer/HTTPServer.h | 24 ++++++------- ...onnection.cpp => HTTPServerConnection.cpp} | 36 +++++++++---------- ...TTPConnection.h => HTTPServerConnection.h} | 8 ++--- ...ection.cpp => SslHTTPServerConnection.cpp} | 12 +++---- ...Connection.h => SslHTTPServerConnection.h} | 16 ++++----- src/WebAdmin.cpp | 14 ++++---- src/WebAdmin.h | 12 +++---- 9 files changed, 75 insertions(+), 77 deletions(-) rename src/HTTPServer/{HTTPConnection.cpp => HTTPServerConnection.cpp} (76%) rename src/HTTPServer/{HTTPConnection.h => HTTPServerConnection.h} (95%) rename src/HTTPServer/{SslHTTPConnection.cpp => SslHTTPServerConnection.cpp} (79%) rename src/HTTPServer/{SslHTTPConnection.h => SslHTTPServerConnection.h} (61%) diff --git a/src/HTTPServer/CMakeLists.txt b/src/HTTPServer/CMakeLists.txt index a08a1fcf8..e8026f761 100644 --- a/src/HTTPServer/CMakeLists.txt +++ b/src/HTTPServer/CMakeLists.txt @@ -6,31 +6,31 @@ include_directories ("${PROJECT_SOURCE_DIR}/../") SET (SRCS EnvelopeParser.cpp - HTTPConnection.cpp HTTPFormParser.cpp HTTPMessage.cpp HTTPServer.cpp + HTTPServerConnection.cpp MultipartParser.cpp NameValueParser.cpp - SslHTTPConnection.cpp + SslHTTPServerConnection.cpp UrlParser.cpp ) SET (HDRS EnvelopeParser.h - HTTPConnection.h HTTPFormParser.h HTTPMessage.h HTTPServer.h + HTTPServerConnection.h MultipartParser.h NameValueParser.h - SslHTTPConnection.h + SslHTTPServerConnection.h UrlParser.h ) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set_source_files_properties(HTTPServer.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=global-constructors ") - set_source_files_properties(HTTPConnection.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch-enum") + set_source_files_properties(HTTPServerConnection.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=switch-enum") set_source_files_properties(HTTPMessage.cpp PROPERTIES COMPILE_FLAGS "-Wno-error=tautological-compare") endif() diff --git a/src/HTTPServer/HTTPServer.cpp b/src/HTTPServer/HTTPServer.cpp index 814a87fe4..1cdf29bca 100644 --- a/src/HTTPServer/HTTPServer.cpp +++ b/src/HTTPServer/HTTPServer.cpp @@ -6,9 +6,9 @@ #include "Globals.h" #include "HTTPServer.h" #include "HTTPMessage.h" -#include "HTTPConnection.h" +#include "HTTPServerConnection.h" #include "HTTPFormParser.h" -#include "SslHTTPConnection.h" +#include "SslHTTPServerConnection.h" @@ -28,7 +28,7 @@ class cDebugCallbacks : public cHTTPServer::cCallbacks, protected cHTTPFormParser::cCallbacks { - virtual void OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override + virtual void OnRequestBegun(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) override { UNUSED(a_Connection); @@ -39,7 +39,7 @@ class cDebugCallbacks : } - virtual void OnRequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) override + virtual void OnRequestBody(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) override { UNUSED(a_Connection); @@ -51,7 +51,7 @@ class cDebugCallbacks : } - virtual void OnRequestFinished(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override + virtual void OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) override { cHTTPFormParser * FormParser = reinterpret_cast(a_Request.GetUserData()); if (FormParser != nullptr) @@ -268,11 +268,11 @@ cTCPLink::cCallbacksPtr cHTTPServer::OnIncomingConnection(const AString & a_Remo if (m_Cert.get() != nullptr) { - return std::make_shared(*this, m_Cert, m_CertPrivKey); + return std::make_shared(*this, m_Cert, m_CertPrivKey); } else { - return std::make_shared(*this); + return std::make_shared(*this); } } @@ -280,7 +280,7 @@ cTCPLink::cCallbacksPtr cHTTPServer::OnIncomingConnection(const AString & a_Remo -void cHTTPServer::NewRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cHTTPServer::NewRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { m_Callbacks->OnRequestBegun(a_Connection, a_Request); } @@ -289,7 +289,7 @@ void cHTTPServer::NewRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Re -void cHTTPServer::RequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) +void cHTTPServer::RequestBody(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) { m_Callbacks->OnRequestBody(a_Connection, a_Request, a_Data, a_Size); } @@ -298,7 +298,7 @@ void cHTTPServer::RequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_R -void cHTTPServer::RequestFinished(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cHTTPServer::RequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { m_Callbacks->OnRequestFinished(a_Connection, a_Request); a_Connection.AwaitNextRequest(); diff --git a/src/HTTPServer/HTTPServer.h b/src/HTTPServer/HTTPServer.h index 2a094b413..2fd4cdcfc 100644 --- a/src/HTTPServer/HTTPServer.h +++ b/src/HTTPServer/HTTPServer.h @@ -23,9 +23,7 @@ class cHTTPMessage; class cHTTPRequest; class cHTTPResponse; -class cHTTPConnection; - -typedef std::vector cHTTPConnections; +class cHTTPServerConnection; @@ -42,14 +40,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(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) = 0; + virtual void OnRequestBegun(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) = 0; /** Called when another part of request body has arrived. May be called multiple times for a single request. */ - virtual void OnRequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) = 0; + virtual void OnRequestBody(cHTTPServerConnection & a_Connection, cHTTPRequest & 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(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) = 0; + virtual void OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) = 0; } ; cHTTPServer(void); @@ -65,8 +63,8 @@ public: void Stop(void); protected: - friend class cHTTPConnection; - friend class cSslHTTPConnection; + friend class cHTTPServerConnection; + friend class cSslHTTPServerConnection; friend class cHTTPServerListenCallbacks; /** The cNetwork API handle for the listening socket. */ @@ -86,15 +84,15 @@ protected: Returns the connection instance to be used as the cTCPLink callbacks. */ cTCPLink::cCallbacksPtr OnIncomingConnection(const AString & a_RemoteIPAddress, UInt16 a_RemotePort); - /** Called by cHTTPConnection when it finishes parsing the request header */ - void NewRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); + /** Called by cHTTPServerConnection when it finishes parsing the request header */ + void NewRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & 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(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size); + void RequestBody(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size); - /** Called by cHTTPConnection when it detects that the request has finished (all of its body has been received) */ - void RequestFinished(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); + /** Called by cHTTPServerConnection when it detects that the request has finished (all of its body has been received) */ + void RequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request); } ; diff --git a/src/HTTPServer/HTTPConnection.cpp b/src/HTTPServer/HTTPServerConnection.cpp similarity index 76% rename from src/HTTPServer/HTTPConnection.cpp rename to src/HTTPServer/HTTPServerConnection.cpp index 0db154139..3c4acc2d4 100644 --- a/src/HTTPServer/HTTPConnection.cpp +++ b/src/HTTPServer/HTTPServerConnection.cpp @@ -1,10 +1,10 @@ // HTTPConnection.cpp -// Implements the cHTTPConnection class representing a single persistent connection in the HTTP server. +// Implements the cHTTPServerConnection class representing a single persistent connection in the HTTP server. #include "Globals.h" -#include "HTTPConnection.h" +#include "HTTPServerConnection.h" #include "HTTPMessage.h" #include "HTTPServer.h" @@ -12,7 +12,7 @@ -cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) : +cHTTPServerConnection::cHTTPServerConnection(cHTTPServer & a_HTTPServer) : m_HTTPServer(a_HTTPServer), m_State(wcsRecvHeaders), m_CurrentRequest(nullptr), @@ -25,7 +25,7 @@ cHTTPConnection::cHTTPConnection(cHTTPServer & a_HTTPServer) : -cHTTPConnection::~cHTTPConnection() +cHTTPServerConnection::~cHTTPServerConnection() { // LOGD("HTTP: Connection deleting: %p", this); delete m_CurrentRequest; @@ -36,7 +36,7 @@ cHTTPConnection::~cHTTPConnection() -void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Response) +void cHTTPServerConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Response) { SendData(Printf("HTTP/1.1 %d %s\r\n", a_StatusCode, a_Response.c_str())); SendData(Printf("Content-Length: %u\r\n\r\n", static_cast(a_Response.size()))); @@ -48,7 +48,7 @@ void cHTTPConnection::SendStatusAndReason(int a_StatusCode, const AString & a_Re -void cHTTPConnection::SendNeedAuth(const AString & a_Realm) +void cHTTPServerConnection::SendNeedAuth(const AString & a_Realm) { SendData(Printf("HTTP/1.1 401 Unauthorized\r\nWWW-Authenticate: Basic realm=\"%s\"\r\nContent-Length: 0\r\n\r\n", a_Realm.c_str())); m_State = wcsRecvHeaders; @@ -58,7 +58,7 @@ void cHTTPConnection::SendNeedAuth(const AString & a_Realm) -void cHTTPConnection::Send(const cHTTPResponse & a_Response) +void cHTTPServerConnection::Send(const cHTTPResponse & a_Response) { ASSERT(m_State == wcsRecvIdle); AString toSend; @@ -71,7 +71,7 @@ void cHTTPConnection::Send(const cHTTPResponse & a_Response) -void cHTTPConnection::Send(const void * a_Data, size_t a_Size) +void cHTTPServerConnection::Send(const void * a_Data, size_t a_Size) { ASSERT(m_State == wcsSendingResp); // We're sending in Chunked transfer encoding @@ -84,7 +84,7 @@ void cHTTPConnection::Send(const void * a_Data, size_t a_Size) -void cHTTPConnection::FinishResponse(void) +void cHTTPServerConnection::FinishResponse(void) { ASSERT(m_State == wcsSendingResp); SendData("0\r\n\r\n"); @@ -95,7 +95,7 @@ void cHTTPConnection::FinishResponse(void) -void cHTTPConnection::AwaitNextRequest(void) +void cHTTPServerConnection::AwaitNextRequest(void) { switch (m_State) { @@ -133,7 +133,7 @@ void cHTTPConnection::AwaitNextRequest(void) -void cHTTPConnection::Terminate(void) +void cHTTPServerConnection::Terminate(void) { if (m_CurrentRequest != nullptr) { @@ -146,7 +146,7 @@ void cHTTPConnection::Terminate(void) -void cHTTPConnection::OnLinkCreated(cTCPLinkPtr a_Link) +void cHTTPServerConnection::OnLinkCreated(cTCPLinkPtr a_Link) { ASSERT(m_Link == nullptr); m_Link = a_Link; @@ -156,7 +156,7 @@ void cHTTPConnection::OnLinkCreated(cTCPLinkPtr a_Link) -void cHTTPConnection::OnReceivedData(const char * a_Data, size_t a_Size) +void cHTTPServerConnection::OnReceivedData(const char * a_Data, size_t a_Size) { ASSERT(m_Link != nullptr); @@ -198,12 +198,12 @@ void cHTTPConnection::OnReceivedData(const char * a_Data, size_t a_Size) // Process the rest of the incoming data into the request body: if (a_Size > BytesConsumed) { - cHTTPConnection::OnReceivedData(a_Data + BytesConsumed, a_Size - BytesConsumed); + cHTTPServerConnection::OnReceivedData(a_Data + BytesConsumed, a_Size - BytesConsumed); return; } else { - cHTTPConnection::OnReceivedData("", 0); // If the request has zero body length, let it be processed right-away + cHTTPServerConnection::OnReceivedData("", 0); // If the request has zero body length, let it be processed right-away return; } } @@ -246,7 +246,7 @@ void cHTTPConnection::OnReceivedData(const char * a_Data, size_t a_Size) -void cHTTPConnection::OnRemoteClosed(void) +void cHTTPServerConnection::OnRemoteClosed(void) { if (m_CurrentRequest != nullptr) { @@ -260,7 +260,7 @@ void cHTTPConnection::OnRemoteClosed(void) -void cHTTPConnection::OnError(int a_ErrorCode, const AString & a_ErrorMsg) +void cHTTPServerConnection::OnError(int a_ErrorCode, const AString & a_ErrorMsg) { OnRemoteClosed(); } @@ -268,7 +268,7 @@ void cHTTPConnection::OnError(int a_ErrorCode, const AString & a_ErrorMsg) -void cHTTPConnection::SendData(const void * a_Data, size_t a_Size) +void cHTTPServerConnection::SendData(const void * a_Data, size_t a_Size) { m_Link->Send(a_Data, a_Size); } diff --git a/src/HTTPServer/HTTPConnection.h b/src/HTTPServer/HTTPServerConnection.h similarity index 95% rename from src/HTTPServer/HTTPConnection.h rename to src/HTTPServer/HTTPServerConnection.h index 414075411..d63cc7395 100644 --- a/src/HTTPServer/HTTPConnection.h +++ b/src/HTTPServer/HTTPServerConnection.h @@ -24,7 +24,7 @@ class cHTTPRequest; -class cHTTPConnection : +class cHTTPServerConnection : public cTCPLink::cCallbacks { public: @@ -38,8 +38,8 @@ public: wcsInvalid, ///< The request was malformed, the connection is closing } ; - cHTTPConnection(cHTTPServer & a_HTTPServer); - virtual ~cHTTPConnection(); + cHTTPServerConnection(cHTTPServer & a_HTTPServer); + virtual ~cHTTPServerConnection(); /** Sends HTTP status code together with a_Reason (used for HTTP errors). Sends the a_Reason as the body as well, so that browsers display it. */ @@ -116,7 +116,7 @@ protected: } } ; -typedef std::vector cHTTPConnections; +typedef std::vector cHTTPServerConnections; diff --git a/src/HTTPServer/SslHTTPConnection.cpp b/src/HTTPServer/SslHTTPServerConnection.cpp similarity index 79% rename from src/HTTPServer/SslHTTPConnection.cpp rename to src/HTTPServer/SslHTTPServerConnection.cpp index 1cbe02312..547e6de3a 100644 --- a/src/HTTPServer/SslHTTPConnection.cpp +++ b/src/HTTPServer/SslHTTPServerConnection.cpp @@ -1,17 +1,17 @@ // SslHTTPConnection.cpp -// Implements the cSslHTTPConnection class representing a HTTP connection made over a SSL link +// Implements the cSslHTTPServerConnection class representing a HTTP connection made over a SSL link #include "Globals.h" -#include "SslHTTPConnection.h" +#include "SslHTTPServerConnection.h" #include "HTTPServer.h" -cSslHTTPConnection::cSslHTTPConnection(cHTTPServer & a_HTTPServer, const cX509CertPtr & a_Cert, const cCryptoKeyPtr & a_PrivateKey) : +cSslHTTPServerConnection::cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, const cX509CertPtr & a_Cert, const cCryptoKeyPtr & a_PrivateKey) : super(a_HTTPServer), m_Ssl(64000), m_Cert(a_Cert), @@ -25,7 +25,7 @@ cSslHTTPConnection::cSslHTTPConnection(cHTTPServer & a_HTTPServer, const cX509Ce -cSslHTTPConnection::~cSslHTTPConnection() +cSslHTTPServerConnection::~cSslHTTPServerConnection() { m_Ssl.NotifyClose(); } @@ -34,7 +34,7 @@ cSslHTTPConnection::~cSslHTTPConnection() -void cSslHTTPConnection::OnReceivedData(const char * a_Data, size_t a_Size) +void cSslHTTPServerConnection::OnReceivedData(const char * a_Data, size_t a_Size) { // Process the received data: const char * Data = a_Data; @@ -77,7 +77,7 @@ void cSslHTTPConnection::OnReceivedData(const char * a_Data, size_t a_Size) -void cSslHTTPConnection::SendData(const void * a_Data, size_t a_Size) +void cSslHTTPServerConnection::SendData(const void * a_Data, size_t a_Size) { const char * OutgoingData = reinterpret_cast(a_Data); size_t pos = 0; diff --git a/src/HTTPServer/SslHTTPConnection.h b/src/HTTPServer/SslHTTPServerConnection.h similarity index 61% rename from src/HTTPServer/SslHTTPConnection.h rename to src/HTTPServer/SslHTTPServerConnection.h index b35bd8ba0..6032a2bd0 100644 --- a/src/HTTPServer/SslHTTPConnection.h +++ b/src/HTTPServer/SslHTTPServerConnection.h @@ -1,7 +1,7 @@ -// SslHTTPConnection.h +// SslHTTPServerConnection.h -// Declared the cSslHTTPConnection class representing a HTTP connection made over a SSL link +// Declared the cSslHTTPServerConnection class representing a HTTP connection made over a SSL link @@ -9,24 +9,24 @@ #pragma once -#include "HTTPConnection.h" +#include "HTTPServerConnection.h" #include "PolarSSL++/BufferedSslContext.h" -class cSslHTTPConnection : - public cHTTPConnection +class cSslHTTPServerConnection : + public cHTTPServerConnection { - typedef cHTTPConnection super; + typedef cHTTPServerConnection super; public: /** Creates a new connection on the specified server. Sends the specified cert as the server certificate, uses the private key for decryption. */ - cSslHTTPConnection(cHTTPServer & a_HTTPServer, const cX509CertPtr & a_Cert, const cCryptoKeyPtr & a_PrivateKey); + cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, const cX509CertPtr & a_Cert, const cCryptoKeyPtr & a_PrivateKey); - ~cSslHTTPConnection(); + ~cSslHTTPServerConnection(); protected: cBufferedSslContext m_Ssl; diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index 29e1bbccf..73ee234d3 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -13,7 +13,7 @@ #include "Root.h" #include "HTTPServer/HTTPMessage.h" -#include "HTTPServer/HTTPConnection.h" +#include "HTTPServer/HTTPServerConnection.h" @@ -212,7 +212,7 @@ bool cWebAdmin::LoadLoginTemplate(void) -void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cWebAdmin::HandleWebadminRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { if (!a_Request.HasAuth()) { @@ -349,7 +349,7 @@ void cWebAdmin::HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPReque -void cWebAdmin::HandleRootRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cWebAdmin::HandleRootRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { UNUSED(a_Request); @@ -364,7 +364,7 @@ void cWebAdmin::HandleRootRequest(cHTTPConnection & a_Connection, cHTTPRequest & -void cWebAdmin::HandleFileRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cWebAdmin::HandleFileRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { AString FileURL = a_Request.GetURL(); std::replace(FileURL.begin(), FileURL.end(), '\\', '/'); @@ -621,7 +621,7 @@ AString cWebAdmin::GetBaseURL(const AStringVector & a_URLSplit) -void cWebAdmin::OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cWebAdmin::OnRequestBegun(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { UNUSED(a_Connection); const AString & URL = a_Request.GetURL(); @@ -645,7 +645,7 @@ void cWebAdmin::OnRequestBegun(cHTTPConnection & a_Connection, cHTTPRequest & a_ -void cWebAdmin::OnRequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) +void cWebAdmin::OnRequestBody(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) { UNUSED(a_Connection); cRequestData * Data = reinterpret_cast(a_Request.GetUserData()); @@ -660,7 +660,7 @@ void cWebAdmin::OnRequestBody(cHTTPConnection & a_Connection, cHTTPRequest & a_R -void cWebAdmin::OnRequestFinished(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) +void cWebAdmin::OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) { const AString & URL = a_Request.GetURL(); if ( diff --git a/src/WebAdmin.h b/src/WebAdmin.h index a3ebac43c..e5f8fc615 100644 --- a/src/WebAdmin.h +++ b/src/WebAdmin.h @@ -236,18 +236,18 @@ protected: cHTTPServer m_HTTPServer; /** Handles requests coming to the "/webadmin" or "/~webadmin" URLs */ - void HandleWebadminRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); + void HandleWebadminRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request); /** Handles requests for the root page */ - void HandleRootRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); + void HandleRootRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request); /** Handles requests for a file */ - void HandleFileRequest(cHTTPConnection & a_Connection, cHTTPRequest & a_Request); + void HandleFileRequest(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request); // cHTTPServer::cCallbacks overrides: - virtual void OnRequestBegun (cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override; - virtual void OnRequestBody (cHTTPConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) override; - virtual void OnRequestFinished(cHTTPConnection & a_Connection, cHTTPRequest & a_Request) override; + virtual void OnRequestBegun (cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) override; + virtual void OnRequestBody (cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request, const char * a_Data, size_t a_Size) override; + virtual void OnRequestFinished(cHTTPServerConnection & a_Connection, cHTTPRequest & a_Request) override; } ; // tolua_export