27 m_filter_type(filter_type) ,
28 m_id(
G::sv_to_string(id)) ,
30 m_result(Result::fail) ,
35std::string GFilters::SimpleFilterBase::id()
const
40bool GFilters::SimpleFilterBase::quiet()
const
47 GStore::FileStore::State e_state =
48 m_filter_type == GSmtp::Filter::Type::server ?
49 GStore::FileStore::State::New :
50 GStore::FileStore::State::Locked ;
53 m_result = run( message_id , m_special , e_state ) ;
54 m_timer.startTimer( 0U ) ;
59 return m_done_signal ;
62void GFilters::SimpleFilterBase::cancel()
64 m_timer.cancelTimer() ;
67GSmtp::Filter::Result GFilters::SimpleFilterBase::result()
const
72std::string GFilters::SimpleFilterBase::response()
const
74 return std::string( m_result == Result::fail ?
"failed" :
"" ) ;
77int GFilters::SimpleFilterBase::responseCode()
const
82std::string GFilters::SimpleFilterBase::reason()
const
87bool GFilters::SimpleFilterBase::special()
const
92void GFilters::SimpleFilterBase::onTimeout()
94 m_done_signal.emit(
static_cast<int>(m_result) ) ;
99 return G::sv_to_string(strtype(m_filter_type)).append(
" [").append(
id()).append(1U,
']') ;
A GSmtp::Filter base class for filters that run synchronously.
SimpleFilterBase(GNet::ExceptionSink, Filter::Type, G::string_view id)
Constructor.
std::string prefix() const
Returns a logging prefix derived from Filter::Type and filter id.
A tuple containing an ExceptionHandler interface pointer and a bound 'exception source' pointer.
A somewhat opaque identifer for a GStore::MessageStore message id.
A class like c++17's std::string_view.