#ifndef NNTPCHAN_MESSAGE_HPP #define NNTPCHAN_MESSAGE_HPP #include #include #include #include namespace nntpchan { typedef std::string MessageID; bool IsValidMessageID(const MessageID & msgid); typedef std::pair MessageHeader; typedef std::map MIMEPartHeader; typedef std::function MessageHeaderFilter; typedef std::function MIMEPartFilter; /** read MIME message from i, filter each header with h, filter each part with p, store result in o return true if we read the whole message, return false if there is remaining */ bool StoreMIMEMessage(std::istream & i, MessageHeaderFilter h, MIMEPartHeader p, std::ostream & o); } #endif