21#ifndef G_SIMPLE_FILTER_BASE_H
22#define G_SIMPLE_FILTER_BASE_H
35 class SimpleFilterBase ;
49 GStore::FileStore::State ) = 0 ;
52 std::string
prefix()
const ;
56 bool quiet() const final ;
57 void start( const
GStore::MessageId & ) final ;
58 std::
string id() const final ;
59 G::Slot::Signal<
int> & doneSignal() noexcept final ;
61 Result result() const final ;
62 std::
string response() const final ;
63 int responseCode() const final ;
64 std::
string reason() const final ;
65 bool special() const final ;
71 Filter::Type m_filter_type ;
74 G::Slot::Signal<
int> m_done_signal ;
75 Result m_result {Result::fail} ;
76 bool m_special {
false} ;
A GSmtp::Filter base class for filters that run synchronously.
SimpleFilterBase(GNet::EventState, Filter::Type, std::string_view id)
Constructor.
virtual Result run(const GStore::MessageId &, bool &special_out, GStore::FileStore::State)=0
Runs the filter synchronously and returns the result.
std::string prefix() const
Returns a logging prefix derived from Filter::Type and filter id.
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
An interface for processing a message file through a filter.
A somewhat opaque identifer for a GStore::MessageStore message id.