28 Filter::Type filter_type ,
const Filter::Config & ) :
30 m_exit(0,filter_type) ,
39 Filter::Type filter_type ,
const Filter::Config & ,
40 unsigned int exit_code ) :
41 m_id(
"exit:"+
G::Str::fromUInt(exit_code)) ,
42 m_exit(static_cast<int>(exit_code),filter_type) ,
43 m_quiet(exit_code==0U) ,
50 Filter::Type filter_type ,
const Filter::Config & ,
G::TimeInterval sleep_time ) :
52 m_exit(0,filter_type) ,
54 m_timeout(sleep_time) ,
57 G_ASSERT( m_exit.ok() ) ;
60std::string GFilters::NullFilter::id()
const
65bool GFilters::NullFilter::quiet()
const
70bool GFilters::NullFilter::special()
const
72 return m_exit.special ;
75GSmtp::Filter::Result GFilters::NullFilter::result()
const
77 return m_exit.result ;
80std::string GFilters::NullFilter::response()
const
82 return ( m_exit.ok() || m_exit.abandon() ) ? std::string() :
std::string(
"rejected") ;
85int GFilters::NullFilter::responseCode()
const
90std::string GFilters::NullFilter::reason()
const
92 return ( m_exit.ok() || m_exit.abandon() ) ? std::string() : m_id ;
97 return m_done_signal ;
100void GFilters::NullFilter::cancel()
106 m_timer.startTimer( m_timeout ) ;
109void GFilters::NullFilter::onTimeout()
111 m_done_signal.emit(
static_cast<int>(m_exit.result) ) ;
A Filter class that does nothing.
NullFilter(GNet::EventState, GStore::FileStore &, Filter::Type, const Filter::Config &)
Constructor for a do-nothing filter.
A lightweight object containing an ExceptionHandler pointer, optional ExceptionSource pointer and opt...
A concrete implementation of the MessageStore interface dealing in paired flat files.
A somewhat opaque identifer for a GStore::MessageStore message id.
An interval between two G::SystemTime values or two G::TimerTime values.