#ifndef __IMFMessage_h__ #define __IMFMessage_h__ #include "PString.h" #include "IMFHeader.h" #include "IMFRequest.h" #include "IMFBody.h" namespace coreutils { /// /// IMFMessage provides an object representation of a standard Internet /// Message Format message. /// /// Contstructing the object with a reference to a PString will generate /// an object representation of the data therein. /// class IMFMessage { public: IMFMessage(); IMFMessage(PString &in); bool parse(PString &in); void output(std::stringstream &out); void addHeader(std::string key, std::string value); std::string getHeader(std::string key, bool valueOnly = true); std::string getHeaderKeyPairValue(std::string headerKey, std::string key); IMFBody *getBody(); void setBody(PString *in); protected: std::vector headers; IMFBody *body; }; } #endif