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.
2017-10-17 10:29:56 -04:00

35 lines
796 B
C++

#ifndef NNTPCHAN_STATICFILE_FRONTEND_HPP
#define NNTPCHAN_STATICFILE_FRONTEND_HPP
#include "frontend.hpp"
#include "message.hpp"
#include "model.hpp"
#include "template_engine.hpp"
#include <experimental/filesystem>
namespace nntpchan
{
namespace fs = std::experimental::filesystem;
class StaticFileFrontend : public Frontend
{
public:
StaticFileFrontend(TemplateEngine *tmpl, const std::string &templateDir, const std::string &outDir, uint32_t pages);
~StaticFileFrontend();
void ProcessNewMessage(const fs::path &fpath);
bool AcceptsNewsgroup(const std::string &newsgroup);
bool AcceptsMessage(const std::string &msgid);
private:
MessageDB_ptr m_MessageDB;
TemplateEngine_ptr m_TemplateEngine;
fs::path m_TemplateDir;
fs::path m_OutDir;
uint32_t m_Pages;
};
}
#endif