An interface for processing message files. More...
#include <gprocessor.h>
Public Member Functions | |
virtual | ~Processor () |
Destructor. More... | |
virtual void | start (const std::string &path)=0 |
Starts the processor for the given message file. More... | |
virtual G::Signal1< bool > & | doneSignal ()=0 |
Returns a signal which is raised once start() has completed or failed. More... | |
virtual void | abort ()=0 |
Aborts any incomplete processing. More... | |
virtual std::string | text () const =0 |
Returns a non-empty reason string if the processor failed. More... | |
virtual bool | cancelled () const =0 |
Returns true if the processor indicated that further processesing of the message should be cancelled. More... | |
virtual bool | repoll () const =0 |
Returns true if the processor indicated that the message store should be repolled immediately. More... | |
An interface for processing message files.
Definition at line 51 of file gprocessor.h.
|
virtual |
Destructor.
Definition at line 25 of file gprocessor.cpp.
|
pure virtual |
Aborts any incomplete processing.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::NetworkProcessor, and GSmtp::ExecutableProcessor.
|
pure virtual |
Returns true if the processor indicated that further processesing of the message should be cancelled.
This allows the processor to delete the message if it wants to.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::ExecutableProcessor, and GSmtp::NetworkProcessor.
|
pure virtual |
Returns a signal which is raised once start() has completed or failed.
The signal parameter is a success flag.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::NetworkProcessor, and GSmtp::ExecutableProcessor.
|
pure virtual |
Returns true if the processor indicated that the message store should be repolled immediately.
This this indicator is a side-effect of message processing, independent of success or failure.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::ExecutableProcessor, and GSmtp::NetworkProcessor.
|
pure virtual |
Starts the processor for the given message file.
Any previous, incomplete processing is abort()ed.
Asynchronous completion is indicated by a doneSignal(). The signal may be raised before start() returns.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::NetworkProcessor, and GSmtp::ExecutableProcessor.
|
pure virtual |
Returns a non-empty reason string if the processor failed.
Implemented in GSmtp::NullProcessor, GSmtp::SpamProcessor, GSmtp::NetworkProcessor, and GSmtp::ExecutableProcessor.