- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

gnetworkprocessor.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_NETWORK_PROCESSOR_H
22 #define G_SMTP_NETWORK_PROCESSOR_H
23
24 #include "gdef.h"
25 #include "gsmtp.h"
26 #include "gprocessor.h"
27 #include "gclientptr.h"
28 #include "grequestclient.h"
29
31 namespace GSmtp
32 {
33 class NetworkProcessor ;
34 }
35
40 class GSmtp::NetworkProcessor : public GSmtp::Processor
41 {
42 public:
43 NetworkProcessor( const std::string & , unsigned int connection_timeout , unsigned int response_timeout ) ;
45
46 virtual ~NetworkProcessor() ;
48
49 virtual G::Signal1<bool> & doneSignal() ;
51
52 virtual void start( const std::string & path ) ;
54
55 virtual void abort() ;
57
58 virtual std::string text() const ;
60
61 virtual bool cancelled() const ;
63
64 virtual bool repoll() const ;
66
67 private:
68 NetworkProcessor( const NetworkProcessor & ) ; // not implemented
69 void operator=( const NetworkProcessor & ) ; // not implemented
70 void clientEvent( std::string , std::string ) ;
71
72 private:
73 G::Signal1<bool> m_done_signal ;
74 GNet::ResolverInfo m_resolver_info ;
75 unsigned int m_connection_timeout ;
76 unsigned int m_response_timeout ;
77 bool m_lazy ;
78 GNet::ClientPtr<RequestClient> m_client ;
79 std::string m_text ;
80 } ;
81
82 #endif
GSmtp::NetworkProcessor
A Processor class that passes the name of a message file to a remote process over the network...
Definition: gnetworkprocessor.h:40
GSmtp
SMTP and message-store classes.
GSmtp::Processor
An interface for processing message files.
Definition: gprocessor.h:51
GSmtp::NetworkProcessor::text
virtual std::string text() const
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:71
GNet::ResolverInfo
A class that holds a host/service name pair and optionally the results of a name-to-address lookup...
Definition: gresolverinfo.h:48
G::Signal1< bool >
GSmtp::NetworkProcessor::abort
virtual void abort()
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:81
gclientptr.h
GSmtp::NetworkProcessor::cancelled
virtual bool cancelled() const
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:61
GSmtp::NetworkProcessor::NetworkProcessor
NetworkProcessor(const std::string &, unsigned int connection_timeout, unsigned int response_timeout)
Constructor.
Definition: gnetworkprocessor.cpp:26
GSmtp::NetworkProcessor::repoll
virtual bool repoll() const
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:66
GNet::ClientPtr
A smart pointer class for GNet::HeapClient.
Definition: gclientptr.h:60
gprocessor.h
grequestclient.h
gsmtp.h
GSmtp::NetworkProcessor::start
virtual void start(const std::string &path)
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:41
GSmtp::NetworkProcessor::~NetworkProcessor
virtual ~NetworkProcessor()
Destructor.
Definition: gnetworkprocessor.cpp:36
GSmtp::NetworkProcessor::doneSignal
virtual G::Signal1< bool > & doneSignal()
Final override from GNet::Processor.
Definition: gnetworkprocessor.cpp:76