Archived
1
0
This repository has been archived on 2023-08-12. You can view files and clone it, but cannot push or open issues or pull requests.
nntpchan/contrib/backends/nntpchan-daemon/libnntpchan/mime.hpp
Jeff Becker e67e7a20bd
* more nntpchan-daemon code
* fix keepalive
2017-10-09 11:48:10 -04:00

31 lines
588 B
C++

#ifndef NNTPCHAN_MIME_HPP
#define NNTPCHAN_MIME_HPP
#include "file_handle.hpp"
#include "io_handle.hpp"
#include <functional>
#include <map>
#include <string>
namespace nntpchan
{
typedef std::map<std::string, std::string> RawHeader;
bool ReadHeader(const FileHandle_ptr & f, RawHeader & h);
struct MimePart
{
virtual RawHeader & Header() = 0;
virtual IOHandle_ptr OpenPart() = 0;
};
typedef std::unique_ptr<MimePart> MimePart_ptr;
typedef std::function<bool(MimePart_ptr)> PartReader;
bool ReadParts(const FileHandle_ptr & f, PartReader r);
}
#endif