CoreUtils/IMFMessage.h
Brad Arant 7e06591de6 Sync.
2021-01-09 18:27:48 -08:00

46 lines
941 B
C++

#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<IMFHeader> headers;
IMFBody *body;
};
}
#endif