diff options
Diffstat (limited to 'vmime')
-rw-r--r-- | vmime/net/imap/IMAPServiceInfos.hpp | 2 | ||||
-rw-r--r-- | vmime/net/pop3/POP3ServiceInfos.hpp | 2 | ||||
-rw-r--r-- | vmime/net/service.hpp | 18 | ||||
-rw-r--r-- | vmime/net/serviceInfos.hpp | 6 | ||||
-rw-r--r-- | vmime/net/smtp/SMTPServiceInfos.hpp | 2 | ||||
-rw-r--r-- | vmime/platformDependant.hpp | 15 | ||||
-rw-r--r-- | vmime/platforms/posix/posixHandler.hpp | 2 | ||||
-rw-r--r-- | vmime/platforms/windows/windowsHandler.hpp | 2 |
8 files changed, 19 insertions, 30 deletions
diff --git a/vmime/net/imap/IMAPServiceInfos.hpp b/vmime/net/imap/IMAPServiceInfos.hpp index 0b66bd0e..85b2012a 100644 --- a/vmime/net/imap/IMAPServiceInfos.hpp +++ b/vmime/net/imap/IMAPServiceInfos.hpp @@ -62,8 +62,6 @@ public: serviceInfos::property PROPERTY_SERVER_ADDRESS; serviceInfos::property PROPERTY_SERVER_PORT; - - serviceInfos::property PROPERTY_TIMEOUT_FACTORY; }; const props& getProperties() const; diff --git a/vmime/net/pop3/POP3ServiceInfos.hpp b/vmime/net/pop3/POP3ServiceInfos.hpp index b2c668cb..ae0b4793 100644 --- a/vmime/net/pop3/POP3ServiceInfos.hpp +++ b/vmime/net/pop3/POP3ServiceInfos.hpp @@ -64,8 +64,6 @@ public: serviceInfos::property PROPERTY_SERVER_ADDRESS; serviceInfos::property PROPERTY_SERVER_PORT; - - serviceInfos::property PROPERTY_TIMEOUT_FACTORY; }; const props& getProperties() const; diff --git a/vmime/net/service.hpp b/vmime/net/service.hpp index 5a03b789..20c2a500 100644 --- a/vmime/net/service.hpp +++ b/vmime/net/service.hpp @@ -34,6 +34,7 @@ #include "vmime/net/serviceInfos.hpp" #include "vmime/net/socket.hpp" +#include "vmime/net/timeoutHandler.hpp" #if VMIME_HAVE_TLS_SUPPORT #include "vmime/net/tls/certificateVerifier.hpp" @@ -162,6 +163,21 @@ public: */ ref <socketFactory> getSocketFactory(); + /** Set the factory used to create timeoutHandler objects for + * this service. By default, no timeout handler is used. Not all + * services support timeout handling. + * + * @param thf timeoutHandler factory + */ + void setTimeoutHandlerFactory(ref <timeoutHandlerFactory> thf); + + /** Return the factory used to create timeoutHandler objects for + * this service. + * + * @return timeoutHandler factory + */ + ref <timeoutHandlerFactory> getTimeoutHandlerFactory(); + /** Set a property for this service (service prefix is added automatically). * * WARNING: this sets the property on the session object, so all service @@ -201,6 +217,8 @@ private: #endif // VMIME_HAVE_TLS_SUPPORT ref <socketFactory> m_socketFactory; + + ref <timeoutHandlerFactory> m_toHandlerFactory; }; diff --git a/vmime/net/serviceInfos.hpp b/vmime/net/serviceInfos.hpp index f913f838..4564efd9 100644 --- a/vmime/net/serviceInfos.hpp +++ b/vmime/net/serviceInfos.hpp @@ -84,12 +84,6 @@ public: * password used to authenticate with the server. */ static const property AUTH_PASSWORD; - /** The common property 'timeout.factory' used to - * specify which factory to use to instanciate - * time-out handler objects. If none is specified, - * no time-out handler is used. */ - static const property TIMEOUT_FACTORY; - #if VMIME_HAVE_TLS_SUPPORT /** The common property 'connection.tls': this is used to diff --git a/vmime/net/smtp/SMTPServiceInfos.hpp b/vmime/net/smtp/SMTPServiceInfos.hpp index dcdef9f9..3a4cbdd9 100644 --- a/vmime/net/smtp/SMTPServiceInfos.hpp +++ b/vmime/net/smtp/SMTPServiceInfos.hpp @@ -63,8 +63,6 @@ public: serviceInfos::property PROPERTY_SERVER_ADDRESS; serviceInfos::property PROPERTY_SERVER_PORT; - - serviceInfos::property PROPERTY_TIMEOUT_FACTORY; }; const props& getProperties() const; diff --git a/vmime/platformDependant.hpp b/vmime/platformDependant.hpp index 17a2656b..1c924f61 100644 --- a/vmime/platformDependant.hpp +++ b/vmime/platformDependant.hpp @@ -109,21 +109,8 @@ public: * @return socket factory */ virtual ref <net::socketFactory> getSocketFactory() const = 0; - - /** Return a pointer to a timeout-handler factory for the specified name. - * The returned object will not be deleted by VMime, so it can be a - * pointer to a static object. - * - * This is used when you want to handle a timeout-mechanism when - * connecting to messaging servers (please read the documentation to - * learn how to use it). If you are not using time-out handlers, you - * can safely return NULL here. - * - * @param name time-out type name - * @return time-out factory - */ - virtual net::timeoutHandlerFactory* getTimeoutHandlerFactory(const string& name = "default") const = 0; #endif + #if VMIME_HAVE_FILESYSTEM_FEATURES /** Return a pointer to a factory that creates file-system objects. * diff --git a/vmime/platforms/posix/posixHandler.hpp b/vmime/platforms/posix/posixHandler.hpp index d5ba1826..18a03240 100644 --- a/vmime/platforms/posix/posixHandler.hpp +++ b/vmime/platforms/posix/posixHandler.hpp @@ -62,8 +62,6 @@ public: #if VMIME_HAVE_MESSAGING_FEATURES ref <vmime::net::socketFactory> getSocketFactory() const; - - vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const; #endif #if VMIME_HAVE_FILESYSTEM_FEATURES diff --git a/vmime/platforms/windows/windowsHandler.hpp b/vmime/platforms/windows/windowsHandler.hpp index 4a94628f..d775ab99 100644 --- a/vmime/platforms/windows/windowsHandler.hpp +++ b/vmime/platforms/windows/windowsHandler.hpp @@ -61,8 +61,6 @@ public: #if VMIME_HAVE_MESSAGING_FEATURES ref <vmime::net::socketFactory> getSocketFactory() const; - - vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const; #endif #if VMIME_HAVE_FILESYSTEM_FEATURES |