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.

29 lines
767 B
C++
Raw Normal View History

2016-10-18 07:03:51 -04:00
#ifndef NNTPCHAN_FRONTEND_HPP
#define NNTPCHAN_FRONTEND_HPP
#include <experimental/filesystem>
2017-10-17 10:29:56 -04:00
#include <memory>
#include <string>
2016-10-18 07:03:51 -04:00
namespace nntpchan
{
2017-10-17 10:29:56 -04:00
namespace fs = std::experimental::filesystem;
/** @brief nntpchan frontend ui interface */
class Frontend
{
public:
2018-05-06 09:46:45 -04:00
virtual ~Frontend() {};
2017-10-17 10:29:56 -04:00
/** @brief process an inbound message stored at fpath that we have accepted. */
virtual void ProcessNewMessage(const fs::path &fpath) = 0;
2016-10-18 07:03:51 -04:00
2017-10-17 10:29:56 -04:00
/** @brief return true if we take posts in a newsgroup */
virtual bool AcceptsNewsgroup(const std::string &newsgroup) = 0;
2016-10-18 07:03:51 -04:00
2017-10-17 10:29:56 -04:00
/** @brief return true if we will accept a message given its message-id */
virtual bool AcceptsMessage(const std::string &msgid) = 0;
};
2017-10-17 10:29:56 -04:00
typedef std::unique_ptr<Frontend> Frontend_ptr;
2016-10-18 07:03:51 -04:00
}
#endif