Using Super.
This commit is contained in:
committed by
Alexander Harkness
parent
f931590bf0
commit
9ee47e5999
@@ -70,7 +70,7 @@ void cHTTPMessage::AddHeader(const AString & a_Key, const AString & a_Value)
|
||||
// cHTTPOutgoingResponse:
|
||||
|
||||
cHTTPOutgoingResponse::cHTTPOutgoingResponse(void) :
|
||||
super(mkResponse)
|
||||
Super(mkResponse)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,9 @@ public:
|
||||
size_t GetContentLength(void) const { return m_ContentLength; }
|
||||
|
||||
protected:
|
||||
typedef std::map<AString, AString> cNameValueMap;
|
||||
|
||||
using cNameValueMap = std::map<AString, AString>;
|
||||
|
||||
|
||||
eKind m_Kind;
|
||||
|
||||
@@ -64,12 +66,13 @@ protected:
|
||||
|
||||
|
||||
/** Stores outgoing response headers and serializes them to an HTTP data stream. */
|
||||
class cHTTPOutgoingResponse :
|
||||
class cHTTPOutgoingResponse:
|
||||
public cHTTPMessage
|
||||
{
|
||||
typedef cHTTPMessage super;
|
||||
using Super = cHTTPMessage;
|
||||
|
||||
public:
|
||||
|
||||
cHTTPOutgoingResponse(void);
|
||||
|
||||
/** Appends the response to the specified datastream - response line and headers.
|
||||
@@ -85,8 +88,10 @@ public:
|
||||
class cHTTPIncomingRequest:
|
||||
public cHTTPMessage
|
||||
{
|
||||
typedef cHTTPMessage Super;
|
||||
using Super = cHTTPMessage;
|
||||
|
||||
public:
|
||||
|
||||
/** Base class for anything that can be used as the UserData for the request. */
|
||||
class cUserData
|
||||
{
|
||||
@@ -94,7 +99,7 @@ public:
|
||||
// Force a virtual destructor in descendants:
|
||||
virtual ~cUserData() {}
|
||||
};
|
||||
typedef std::shared_ptr<cUserData> cUserDataPtr;
|
||||
using cUserDataPtr = std::shared_ptr<cUserData>;
|
||||
|
||||
|
||||
/** Creates a new instance of the class, containing the method and URL provided by the client. */
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
cSslHTTPServerConnection::cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, std::shared_ptr<const cSslConfig> a_Config):
|
||||
super(a_HTTPServer),
|
||||
Super(a_HTTPServer),
|
||||
m_Ssl(64000)
|
||||
{
|
||||
if (a_Config != nullptr)
|
||||
@@ -59,7 +59,7 @@ void cSslHTTPServerConnection::OnReceivedData(const char * a_Data, size_t a_Size
|
||||
int NumRead = m_Ssl.ReadPlain(Buffer, sizeof(Buffer));
|
||||
if (NumRead > 0)
|
||||
{
|
||||
super::OnReceivedData(Buffer, static_cast<size_t>(NumRead));
|
||||
Super::OnReceivedData(Buffer, static_cast<size_t>(NumRead));
|
||||
// The link may have closed while processing the data, bail out:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16,12 +16,13 @@
|
||||
|
||||
|
||||
|
||||
class cSslHTTPServerConnection :
|
||||
class cSslHTTPServerConnection:
|
||||
public cHTTPServerConnection
|
||||
{
|
||||
typedef cHTTPServerConnection super;
|
||||
using Super = cHTTPServerConnection;
|
||||
|
||||
public:
|
||||
|
||||
/** Creates a new connection on the specified server.
|
||||
Sends the specified cert as the server certificate, uses the private key for decryption. */
|
||||
cSslHTTPServerConnection(cHTTPServer & a_HTTPServer, std::shared_ptr<const cSslConfig> a_Config);
|
||||
|
||||
@@ -18,9 +18,10 @@ class cChunkedTEParser:
|
||||
public cTransferEncodingParser,
|
||||
public cEnvelopeParser::cCallbacks
|
||||
{
|
||||
typedef cTransferEncodingParser Super;
|
||||
using Super = cTransferEncodingParser;
|
||||
|
||||
public:
|
||||
|
||||
cChunkedTEParser(Super::cCallbacks & a_Callbacks):
|
||||
Super(a_Callbacks),
|
||||
m_State(psChunkLength),
|
||||
@@ -318,9 +319,10 @@ protected:
|
||||
class cIdentityTEParser:
|
||||
public cTransferEncodingParser
|
||||
{
|
||||
typedef cTransferEncodingParser Super;
|
||||
using Super = cTransferEncodingParser;
|
||||
|
||||
public:
|
||||
|
||||
cIdentityTEParser(cCallbacks & a_Callbacks, size_t a_ContentLength):
|
||||
Super(a_Callbacks),
|
||||
m_BytesLeft(a_ContentLength)
|
||||
|
||||
@@ -243,9 +243,10 @@ class cHttpSchemeHandler:
|
||||
public cSchemeHandler,
|
||||
protected cHTTPMessageParser::cCallbacks
|
||||
{
|
||||
typedef cSchemeHandler Super;
|
||||
using Super = cSchemeHandler;
|
||||
|
||||
public:
|
||||
|
||||
cHttpSchemeHandler(cUrlClientRequest & a_ParentRequest, bool a_IsTls):
|
||||
Super(a_ParentRequest),
|
||||
m_Parser(*this),
|
||||
|
||||
Reference in New Issue
Block a user