Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <MultipartParser.h>
Classes | |
class | cCallbacks |
Public Member Functions | |
cMultipartParser (const AString &a_ContentType, cCallbacks &a_Callbacks) | |
Creates the parser, expects to find the boundary in a_ContentType. More... | |
void | Parse (const char *a_Data, size_t a_Size) |
Parses more incoming data. More... | |
Protected Member Functions | |
virtual void | OnHeaderLine (const AString &a_Key, const AString &a_Value) override |
Called when a full header line is parsed. More... | |
void | ParseHeaderLine (const char *a_Data, size_t a_Size) |
Parse one line of incoming data in the headers section of a part. More... | |
void | ParseLine (const char *a_Data, size_t a_Size) |
Parse one line of incoming data. More... | |
Protected Member Functions inherited from cEnvelopeParser::cCallbacks | |
virtual | ~cCallbacks () |
Protected Attributes | |
AString | m_Boundary |
The boundary, excluding both the initial "--" and the terminating CRLF. More... | |
cCallbacks & | m_Callbacks |
The callbacks to call for various parsing events. More... | |
cEnvelopeParser | m_EnvelopeParser |
Parser for each part's envelope. More... | |
bool | m_HasHadData |
Set to true if some data for the current part has already been signalized to m_Callbacks. More... | |
AString | m_IncomingData |
Buffer for the incoming data until it is parsed. More... | |
bool | m_IsValid |
True if the data parsed so far is valid; if false, further parsing is skipped. More... | |
Definition at line 18 of file MultipartParser.h.
cMultipartParser::cMultipartParser | ( | const AString & | a_ContentType, |
cCallbacks & | a_Callbacks | ||
) |
Creates the parser, expects to find the boundary in a_ContentType.
Definition at line 94 of file MultipartParser.cpp.
|
overrideprotectedvirtual |
Called when a full header line is parsed.
Implements cEnvelopeParser::cCallbacks.
Definition at line 247 of file MultipartParser.cpp.
void cMultipartParser::Parse | ( | const char * | a_Data, |
size_t | a_Size | ||
) |
Parses more incoming data.
Definition at line 147 of file MultipartParser.cpp.
|
protected |
Parse one line of incoming data in the headers section of a part.
The CRLF has already been stripped from a_Data / a_Size
|
protected |
Parse one line of incoming data.
The CRLF has already been stripped from a_Data / a_Size
|
protected |
The boundary, excluding both the initial "--" and the terminating CRLF.
Definition at line 61 of file MultipartParser.h.
|
protected |
The callbacks to call for various parsing events.
Definition at line 49 of file MultipartParser.h.
|
protected |
Parser for each part's envelope.
Definition at line 55 of file MultipartParser.h.
|
protected |
Set to true if some data for the current part has already been signalized to m_Callbacks.
Used for proper CRLF inserting.
Definition at line 64 of file MultipartParser.h.
|
protected |
Buffer for the incoming data until it is parsed.
Definition at line 58 of file MultipartParser.h.
|
protected |
True if the data parsed so far is valid; if false, further parsing is skipped.
Definition at line 52 of file MultipartParser.h.