36 size_t Parse(
const char * a_Data,
size_t a_Size);
68 bool ParseLine(
const char * a_Data,
size_t a_Size);
void Reset(void)
Makes the parser forget everything parsed so far, so that it can be reused for parsing another datast...
cCallbacks & m_Callbacks
Callbacks to call for the various events.
size_t Parse(const char *a_Data, size_t a_Size)
Parses the incoming data.
AString m_LastValue
Holds the last parsed value; used for line-wrapped values.
bool ParseLine(const char *a_Data, size_t a_Size)
Parses one line of header data.
AString m_LastKey
Holds the last parsed key; used for line-wrapped values.
cEnvelopeParser(cCallbacks &a_Callbacks)
bool m_IsInHeaders
Set to true while the parser is still parsing the envelope headers.
void SetIsInHeaders(bool a_IsInHeaders)
Sets the IsInHeaders flag; used by cMultipartParser to simplify the parser initial conditions.
bool IsInHeaders(void) const
Returns true if more input is expected for the envelope header.
AString m_IncomingData
Buffer for the incoming data until it is parsed.
void NotifyLast(void)
Notifies the callback of the key / value stored in m_LastKey / m_LastValue, then erases them.
virtual void OnHeaderLine(const AString &a_Key, const AString &a_Value)=0
Called when a full header line is parsed.