E-MailRelay
Public Member Functions | List of all members
GFilters::NullFilter Class Reference

A Filter class that does nothing. More...

#include <gnullfilter.h>

+ Inheritance diagram for GFilters::NullFilter:
+ Collaboration diagram for GFilters::NullFilter:

Public Member Functions

 NullFilter (GNet::EventState, GStore::FileStore &, Filter::Type, const Filter::Config &)
 Constructor for a do-nothing filter. More...
 
 NullFilter (GNet::EventState, GStore::FileStore &, Filter::Type, const Filter::Config &, unsigned int exit_code)
 Constructor for a filter that behaves like an executable that always exits with the given exit code. More...
 
 NullFilter (GNet::EventState, GStore::FileStore &, Filter::Type, const Filter::Config &, G::TimeInterval)
 Constructor for a do-nothing filter that takes its time. More...
 
 NullFilter (const NullFilter &)=delete
 
 NullFilter (NullFilter &&)=delete
 
NullFilteroperator= (const NullFilter &)=delete
 
NullFilteroperator= (NullFilter &&)=delete
 
- Public Member Functions inherited from GSmtp::Filter
virtual ~Filter ()=default
 Destructor.
 
virtual std::string id () const =0
 Returns the id passed to the derived-class constructor. More...
 
virtual bool quiet () const =0
 Returns true if there is no need for logging.
 
virtual void start (const GStore::MessageId &)=0
 Starts the filter for the given message. More...
 
virtual G::Slot::Signal< int > & doneSignal () noexcept=0
 Returns a signal which is raised once start() has completed or failed. More...
 
virtual void cancel ()=0
 Aborts any incomplete filtering.
 
virtual Result result () const =0
 Returns the filter result, after the doneSignal() has been emitted.
 
virtual std::string response () const =0
 Returns a non-empty SMTP response string iff the filter failed, or an empty response if successful or abandoned.
 
virtual int responseCode () const =0
 An override for the SMTP response code for when the filter has failed. More...
 
virtual std::string reason () const =0
 Returns a non-empty reason string iff the filter failed, or an empty reason if successful or abandoned.
 
virtual bool special () const =0
 Returns true if the filter indicated special handling is required.
 
std::string str (Type type) const
 Returns a diagnostic string for logging, including the filter result. More...
 

Additional Inherited Members

- Public Types inherited from GSmtp::Filter
enum class  Result { ok = 0 , abandon = 1 , fail = 2 }
 
enum class  Type { server , client , routing }
 
- Static Public Member Functions inherited from GSmtp::Filter
static std::string_view strtype (Type type) noexcept
 Returns a type string for logging: "filter", "client-filter" or "routing-filter". More...
 

Detailed Description

A Filter class that does nothing.

Definition at line 38 of file gnullfilter.h.

Constructor & Destructor Documentation

◆ NullFilter() [1/3]

GFilters::NullFilter::NullFilter ( GNet::EventState  es,
GStore::FileStore ,
Filter::Type  filter_type,
const Filter::Config &   
)

Constructor for a do-nothing filter.

Definition at line 27 of file gnullfilter.cpp.

◆ NullFilter() [2/3]

GFilters::NullFilter::NullFilter ( GNet::EventState  es,
GStore::FileStore ,
Filter::Type  filter_type,
const Filter::Config &  ,
unsigned int  exit_code 
)

Constructor for a filter that behaves like an executable that always exits with the given exit code.

Definition at line 38 of file gnullfilter.cpp.

◆ NullFilter() [3/3]

GFilters::NullFilter::NullFilter ( GNet::EventState  es,
GStore::FileStore ,
Filter::Type  filter_type,
const Filter::Config &  ,
G::TimeInterval  sleep_time 
)

Constructor for a do-nothing filter that takes its time.

Definition at line 49 of file gnullfilter.cpp.


The documentation for this class was generated from the following files: