21#ifndef G_SMTP_FILTER_H
22#define G_SMTP_FILTER_H
54 virtual std::string
id()
const = 0 ;
81 virtual std::string
reason()
const = 0 ;
89 std::string
str(
bool server_side )
const ;
103 Exit(
int exit_code ,
bool server_side ) ;
105 bool abandon()
const ;
An interface for processing a message file through a filter.
virtual std::string id() const =0
Returns the id passed to the derived-class constructor.
virtual bool special() const =0
Returns true if the filter indicated special handling is required.
virtual G::Slot::Signal< int > & doneSignal()=0
Returns a signal which is raised once start() has completed or failed.
virtual void cancel()=0
Aborts any incomplete filtering.
virtual ~Filter()=default
Destructor.
virtual std::string response() const =0
Returns a non-empty response string iff the filter failed, or an empty response if successful or aban...
virtual std::string reason() const =0
Returns a non-empty reason string iff the filter failed, or an empty reason if successful or abandone...
std::string str(bool server_side) const
Returns a diagnostic string for logging.
virtual bool abandoned() const =0
Returns true if the filter result was 'abandoned'.
virtual void start(const MessageId &)=0
Starts the filter for the given message.
virtual bool simple() const =0
Returns true if the concrete filter class is one that can never change the file (eg.
A somewhat opaque identifer for a MessageStore message.
SMTP and message-store classes.
Interprets an executable filter's exit code.