41 #ifndef _networkhttpmessage_h
42 #define _networkhttpmessage_h
45 #include "Network/networkenumerations.h"
108 virtual Boole ParseHTTPHeader(StringIterator& CurrIt,
const StringIterator EndIt) = 0;
114 Boole ParseHTTPFields(StringIterator& CurrIt,
const StringIterator EndIt);
122 Boole GetMessageComponent(StringIterator& CurrIt,
const StringIterator EndIt,
String& Component);
127 void AdvanceToNewline(StringIterator& CurrIt,
const StringIterator EndIt);
143 virtual String Compose()
const = 0;
147 virtual Boole Decompose(
const String& Message) = 0;
152 virtual Boole Decompose(StringIterator& CurrIt,
const StringIterator EndIt) = 0;
167 void SetHTTPVersion(
const UInt16 Major,
const UInt16 Minor);
171 void SetHTTPMajorVersion(
const UInt16 Major);
174 UInt16 GetHTTPMajorVersion()
const;
177 void SetHTTPMinorVersion(
const UInt16 Minor);
180 UInt16 GetHTTPMinorVersion()
const;
185 void SetBody(
const String& Body);
188 const String& GetBody()
const;
193 void SetMaxFields(
const Whole MaxFields);
196 Whole GetMaxFields()
const;
201 void SetField(
const String& FieldName,
const String& FieldValue);
213 void RemoveField(
const String& FieldName);
215 void RemoveAllFields();
226 const String& GetConnectionHeader()
const;
230 void SetContentLengthHeader(
const String& ContentLength);
233 const String& GetContentLengthHeader()
const;
237 void SetContentTypeHeader(
const String& ContentType);
240 const String& GetContentTypeHeader()
const;
A base class for the state of a connection made between peers.
String::const_iterator StringIterator
Convenience typedef for String iterators.
A base class for HTTP text parsing classes.
bool Boole
Generally acts a single bit, true or false.
std::vector< HeaderField > HeaderFieldContainer
Container type for Header Fields in this class.
SimpleVersion MessageVersion
The version component for this response.
uint16_t UInt16
An 16-bit unsigned integer.
HeaderFieldContainer::const_iterator ConstHeaderFieldIterator
Const Iterator type for Header Fields in this class.
A very basic class for expressing an API or syntax version.
Whole MaxHeaderFields
The maximum number of allowed header fields in this message.
The bulk of the engine components go in this namspace.
HeaderFieldContainer MessageFields
A container of fields to populate the message header with.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
String MessageBody
The body of the message.
HeaderFieldContainer::iterator HeaderFieldIterator
Iterator type for Header Fields in this class.
std::string String
A datatype used to a series of characters.