Move to new Build System

This commit is contained in:
2020-05-01 10:21:46 +02:00
parent 4ee3f56bd7
commit 1a464d85cf
51 changed files with 1088 additions and 1101 deletions
+60
View File
@@ -0,0 +1,60 @@
#ifndef MESSAGE_H
#define MESSAGE_H
#include "Image/MimeImage.h"
#include "Image/JpegImage.h"
#include "Util/Util.h"
#include <string>
#include <vector>
namespace MailServer {
class Message
{
public:
Message(const std::string& address, const Util::Context& context, const std::string& message);
private:
class State
{
public:
enum type
{
Header,
Data,
MimeBoundary,
Image
};
};
private:
void ProcessMessage(const std::string& message);
State::type ProcessHeaderLine(const std::string& line);
State::type ProcessDataLine(const std::string& line);
State::type ProcessMimeBoundary(const std::string& line);
State::type ProcessImage(const std::string& line);
private:
std::string m_address;
const Util::Context& m_context;
std::string m_sender;
std::string m_receiver;
std::string m_subject;
std::string m_date;
std::string m_mimeBoundary;
std::string m_contentType;
std::string m_contentEncoding;
size_t m_currentImage;
std::string m_imageName;
std::vector<Image::MimeImage> m_mimeImages;
std::vector<Image::JpegImage> m_images;
};
} // namespace MailServer
#endif // MESSAGE_H