gprocessor.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2001-2013 Graeme Walker <graeme_walker@users.sourceforge.net>
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 // ===
20 
21 #ifndef G_SMTP_PROCESSOR_H
22 #define G_SMTP_PROCESSOR_H
23 
24 #include "gdef.h"
25 #include "gsmtp.h"
26 #include "gslot.h"
27 
29 namespace GSmtp
30 {
31  class Processor ;
32 }
33 
52 {
53 public:
54  virtual ~Processor() ;
56 
57  virtual void start( const std::string & path ) = 0 ;
64 
65  virtual G::Signal1<bool> & doneSignal() = 0 ;
69 
70  virtual void abort() = 0 ;
72 
73  virtual std::string text() const = 0 ;
76 
77  virtual bool cancelled() const = 0 ;
82 
83  virtual bool repoll() const = 0 ;
89 
90 private:
91  void operator=( const Processor & ) ; // not implemented
92 } ;
93 
94 #endif
SMTP and message-store classes.
virtual bool repoll() const =0
Returns true if the processor indicated that the message store should be repolled immediately...
virtual bool cancelled() const =0
Returns true if the processor indicated that further processesing of the message should be cancelled...
virtual G::Signal1< bool > & doneSignal()=0
Returns a signal which is raised once start() has completed or failed.
An interface for processing message files.
Definition: gprocessor.h:51
virtual ~Processor()
Destructor.
Definition: gprocessor.cpp:25
virtual void abort()=0
Aborts any incomplete processing.
virtual std::string text() const =0
Returns a non-empty reason string if the processor failed.
virtual void start(const std::string &path)=0
Starts the processor for the given message file.