From b75afcb4f4527b7fb5dc3da0546e1522a52d9f01 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 6 May 2018 09:46:45 -0400 Subject: [PATCH] more --- .../nntpchan-daemon/include/nntpchan/frontend.hpp | 1 + .../include/nntpchan/staticfile_frontend.hpp | 8 ++++---- .../nntpchan-daemon/libnntpchan/staticfile_frontend.cpp | 2 ++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/backends/nntpchan-daemon/include/nntpchan/frontend.hpp b/contrib/backends/nntpchan-daemon/include/nntpchan/frontend.hpp index 496dd6c..5be0e26 100644 --- a/contrib/backends/nntpchan-daemon/include/nntpchan/frontend.hpp +++ b/contrib/backends/nntpchan-daemon/include/nntpchan/frontend.hpp @@ -11,6 +11,7 @@ namespace fs = std::experimental::filesystem; class Frontend { public: + virtual ~Frontend() {}; /** @brief process an inbound message stored at fpath that we have accepted. */ virtual void ProcessNewMessage(const fs::path &fpath) = 0; diff --git a/contrib/backends/nntpchan-daemon/include/nntpchan/staticfile_frontend.hpp b/contrib/backends/nntpchan-daemon/include/nntpchan/staticfile_frontend.hpp index 511e89a..cec25df 100644 --- a/contrib/backends/nntpchan-daemon/include/nntpchan/staticfile_frontend.hpp +++ b/contrib/backends/nntpchan-daemon/include/nntpchan/staticfile_frontend.hpp @@ -16,11 +16,11 @@ class StaticFileFrontend : public Frontend public: StaticFileFrontend(TemplateEngine *tmpl, const std::string &templateDir, const std::string &outDir, uint32_t pages); - ~StaticFileFrontend(); + virtual ~StaticFileFrontend(); - void ProcessNewMessage(const fs::path &fpath); - bool AcceptsNewsgroup(const std::string &newsgroup); - bool AcceptsMessage(const std::string &msgid); + virtual void ProcessNewMessage(const fs::path &fpath); + virtual bool AcceptsNewsgroup(const std::string &newsgroup); + virtual bool AcceptsMessage(const std::string &msgid); private: MessageDB_ptr m_MessageDB; diff --git a/contrib/backends/nntpchan-daemon/libnntpchan/staticfile_frontend.cpp b/contrib/backends/nntpchan-daemon/libnntpchan/staticfile_frontend.cpp index 1db5ef1..4e2cc9a 100644 --- a/contrib/backends/nntpchan-daemon/libnntpchan/staticfile_frontend.cpp +++ b/contrib/backends/nntpchan-daemon/libnntpchan/staticfile_frontend.cpp @@ -17,6 +17,8 @@ StaticFileFrontend::StaticFileFrontend(TemplateEngine *tmpl, const std::string & { } +StaticFileFrontend::~StaticFileFrontend() {} + void StaticFileFrontend::ProcessNewMessage(const fs::path &fpath) { std::clog << "process message " << fpath << std::endl;