Added service::setSocketFactory().
This commit is contained in:
parent
7d2d25da3e
commit
09d9e11439
@ -2,6 +2,12 @@
|
|||||||
VERSION 0.7.2cvs
|
VERSION 0.7.2cvs
|
||||||
================
|
================
|
||||||
|
|
||||||
|
2005-10-04 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
|
* net/service: removed "server.socket-factory" property; added the
|
||||||
|
service::setSocketFactory() function instead. Removed "name" parameter
|
||||||
|
from platformDependant::getSocketFactory() function.
|
||||||
|
|
||||||
2005-10-03 Vincent Richard <vincent@vincent-richard.net>
|
2005-10-03 Vincent Richard <vincent@vincent-richard.net>
|
||||||
|
|
||||||
* Added TLS/SSL support, using GNU TLS library.
|
* Added TLS/SSL support, using GNU TLS library.
|
||||||
|
@ -94,10 +94,7 @@ void IMAPConnection::connect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create and connect the socket
|
// Create and connect the socket
|
||||||
socketFactory* sf = platformDependant::getHandler()->
|
m_socket = m_store->getSocketFactory()->create();
|
||||||
getSocketFactory(GET_PROPERTY(string, PROPERTY_SERVER_SOCKETFACTORY));
|
|
||||||
|
|
||||||
m_socket = sf->create();
|
|
||||||
|
|
||||||
#if VMIME_HAVE_TLS_SUPPORT
|
#if VMIME_HAVE_TLS_SUPPORT
|
||||||
if (m_store->isSecuredConnection()) // dedicated port/IMAPS
|
if (m_store->isSecuredConnection()) // dedicated port/IMAPS
|
||||||
|
@ -61,7 +61,6 @@ const IMAPServiceInfos::props& IMAPServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "143"),
|
property(serviceInfos::property::SERVER_PORT, "143"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -85,7 +84,6 @@ const IMAPServiceInfos::props& IMAPServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "993"),
|
property(serviceInfos::property::SERVER_PORT, "993"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -119,7 +117,6 @@ const std::vector <serviceInfos::property> IMAPServiceInfos::getAvailablePropert
|
|||||||
|
|
||||||
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
||||||
list.push_back(p.PROPERTY_SERVER_PORT);
|
list.push_back(p.PROPERTY_SERVER_PORT);
|
||||||
list.push_back(p.PROPERTY_SERVER_SOCKETFACTORY);
|
|
||||||
|
|
||||||
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
||||||
|
|
||||||
|
@ -63,7 +63,6 @@ const POP3ServiceInfos::props& POP3ServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "110"),
|
property(serviceInfos::property::SERVER_PORT, "110"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -89,7 +88,6 @@ const POP3ServiceInfos::props& POP3ServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "995"),
|
property(serviceInfos::property::SERVER_PORT, "995"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -125,7 +123,6 @@ const std::vector <serviceInfos::property> POP3ServiceInfos::getAvailablePropert
|
|||||||
|
|
||||||
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
||||||
list.push_back(p.PROPERTY_SERVER_PORT);
|
list.push_back(p.PROPERTY_SERVER_PORT);
|
||||||
list.push_back(p.PROPERTY_SERVER_SOCKETFACTORY);
|
|
||||||
|
|
||||||
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
||||||
|
|
||||||
|
@ -132,10 +132,7 @@ void POP3Store::connect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create and connect the socket
|
// Create and connect the socket
|
||||||
socketFactory* sf = platformDependant::getHandler()->
|
m_socket = getSocketFactory()->create();
|
||||||
getSocketFactory(GET_PROPERTY(string, PROPERTY_SERVER_SOCKETFACTORY));
|
|
||||||
|
|
||||||
m_socket = sf->create();
|
|
||||||
|
|
||||||
#if VMIME_HAVE_TLS_SUPPORT
|
#if VMIME_HAVE_TLS_SUPPORT
|
||||||
if (m_secured) // dedicated port/POP3S
|
if (m_secured) // dedicated port/POP3S
|
||||||
@ -272,13 +269,12 @@ void POP3Store::authenticate(const messageId& randomMID)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Some servers close the connection after an
|
// Some servers close the connection after an unsuccessful APOP
|
||||||
// unsuccessful APOP command, so the fallback
|
// command, so the fallback may not always work...
|
||||||
// may not always work...
|
|
||||||
//
|
//
|
||||||
// S: +OK Qpopper (version 4.0.5) at xxx starting. <30396.1126730747@xxx>
|
// S: +OK Qpopper (version 4.0.5) at xxx starting. <30396.1126730747@xxx>
|
||||||
// C: APOP plop c5e0a87d088ec71d60e32692d4c5bdf4
|
// C: APOP plop c5e0a87d088ec71d60e32692d4c5bdf4
|
||||||
// S: -ERR [AUTH] Password supplied for "o" is incorrect.
|
// S: -ERR [AUTH] Password supplied for "plop" is incorrect.
|
||||||
// S: +OK Pop server at xxx signing off.
|
// S: +OK Pop server at xxx signing off.
|
||||||
// [Connection closed by foreign host.]
|
// [Connection closed by foreign host.]
|
||||||
|
|
||||||
@ -298,6 +294,7 @@ void POP3Store::authenticate(const messageId& randomMID)
|
|||||||
}
|
}
|
||||||
catch (exceptions::socket_exception&)
|
catch (exceptions::socket_exception&)
|
||||||
{
|
{
|
||||||
|
internalDisconnect();
|
||||||
throw exceptions::authentication_error(response);
|
throw exceptions::authentication_error(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
#include "vmime/config.hpp"
|
#include "vmime/config.hpp"
|
||||||
#include "vmime/net/service.hpp"
|
#include "vmime/net/service.hpp"
|
||||||
|
|
||||||
|
#include "vmime/platformDependant.hpp"
|
||||||
|
|
||||||
#if VMIME_HAVE_SASL_SUPPORT
|
#if VMIME_HAVE_SASL_SUPPORT
|
||||||
#include "vmime/security/sasl/defaultSASLAuthenticator.hpp"
|
#include "vmime/security/sasl/defaultSASLAuthenticator.hpp"
|
||||||
#else
|
#else
|
||||||
@ -54,6 +56,7 @@ service::service(ref <session> sess, const serviceInfos& /* infos */,
|
|||||||
m_certVerifier = vmime::create <tls::defaultCertificateVerifier>();
|
m_certVerifier = vmime::create <tls::defaultCertificateVerifier>();
|
||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
|
|
||||||
|
m_socketFactory = platformDependant::getHandler()->getSocketFactory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -108,5 +111,17 @@ ref <tls::certificateVerifier> service::getCertificateVerifier()
|
|||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
|
void service::setSocketFactory(ref <socketFactory> sf)
|
||||||
|
{
|
||||||
|
m_socketFactory = sf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ref <socketFactory> service::getSocketFactory()
|
||||||
|
{
|
||||||
|
return m_socketFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // net
|
} // net
|
||||||
} // vmime
|
} // vmime
|
||||||
|
@ -34,9 +34,6 @@ const serviceInfos::property serviceInfos::property::SERVER_PORT
|
|||||||
const serviceInfos::property serviceInfos::property::SERVER_ROOTPATH
|
const serviceInfos::property serviceInfos::property::SERVER_ROOTPATH
|
||||||
("server.rootpath", serviceInfos::property::TYPE_STRING);
|
("server.rootpath", serviceInfos::property::TYPE_STRING);
|
||||||
|
|
||||||
const serviceInfos::property serviceInfos::property::SERVER_SOCKETFACTORY
|
|
||||||
("server.socket-factory", serviceInfos::property::TYPE_STRING, "default");
|
|
||||||
|
|
||||||
const serviceInfos::property serviceInfos::property::AUTH_USERNAME
|
const serviceInfos::property serviceInfos::property::AUTH_USERNAME
|
||||||
("auth.username", serviceInfos::property::TYPE_STRING);
|
("auth.username", serviceInfos::property::TYPE_STRING);
|
||||||
|
|
||||||
|
@ -62,7 +62,6 @@ const SMTPServiceInfos::props& SMTPServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "25"),
|
property(serviceInfos::property::SERVER_PORT, "25"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -87,7 +86,6 @@ const SMTPServiceInfos::props& SMTPServiceInfos::getProperties() const
|
|||||||
|
|
||||||
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
property(serviceInfos::property::SERVER_ADDRESS, serviceInfos::property::FLAG_REQUIRED),
|
||||||
property(serviceInfos::property::SERVER_PORT, "465"),
|
property(serviceInfos::property::SERVER_PORT, "465"),
|
||||||
property(serviceInfos::property::SERVER_SOCKETFACTORY),
|
|
||||||
|
|
||||||
property(serviceInfos::property::TIMEOUT_FACTORY)
|
property(serviceInfos::property::TIMEOUT_FACTORY)
|
||||||
};
|
};
|
||||||
@ -122,7 +120,6 @@ const std::vector <serviceInfos::property> SMTPServiceInfos::getAvailablePropert
|
|||||||
|
|
||||||
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
list.push_back(p.PROPERTY_SERVER_ADDRESS);
|
||||||
list.push_back(p.PROPERTY_SERVER_PORT);
|
list.push_back(p.PROPERTY_SERVER_PORT);
|
||||||
list.push_back(p.PROPERTY_SERVER_SOCKETFACTORY);
|
|
||||||
|
|
||||||
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
list.push_back(p.PROPERTY_TIMEOUT_FACTORY);
|
||||||
|
|
||||||
|
@ -98,10 +98,7 @@ void SMTPTransport::connect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create and connect the socket
|
// Create and connect the socket
|
||||||
socketFactory* sf = platformDependant::getHandler()->
|
m_socket = getSocketFactory()->create();
|
||||||
getSocketFactory(GET_PROPERTY(string, PROPERTY_SERVER_SOCKETFACTORY));
|
|
||||||
|
|
||||||
m_socket = sf->create();
|
|
||||||
|
|
||||||
#if VMIME_HAVE_TLS_SUPPORT
|
#if VMIME_HAVE_TLS_SUPPORT
|
||||||
if (m_secured) // dedicated port/SMTPS
|
if (m_secured) // dedicated port/SMTPS
|
||||||
|
@ -48,7 +48,7 @@ namespace posix {
|
|||||||
posixHandler::posixHandler()
|
posixHandler::posixHandler()
|
||||||
{
|
{
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
m_socketFactory = new posixSocketFactory();
|
m_socketFactory = vmime::create <posixSocketFactory>();
|
||||||
#endif
|
#endif
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
m_fileSysFactory = new posixFileSystemFactory();
|
m_fileSysFactory = new posixFileSystemFactory();
|
||||||
@ -59,9 +59,6 @@ posixHandler::posixHandler()
|
|||||||
|
|
||||||
posixHandler::~posixHandler()
|
posixHandler::~posixHandler()
|
||||||
{
|
{
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
|
||||||
delete (m_socketFactory);
|
|
||||||
#endif
|
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
delete (m_fileSysFactory);
|
delete (m_fileSysFactory);
|
||||||
delete (m_childProcFactory);
|
delete (m_childProcFactory);
|
||||||
@ -172,10 +169,9 @@ const unsigned int posixHandler::getProcessId() const
|
|||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
|
|
||||||
vmime::net::socketFactory* posixHandler::getSocketFactory
|
ref <vmime::net::socketFactory> posixHandler::getSocketFactory() const
|
||||||
(const vmime::string& /* name */) const
|
|
||||||
{
|
{
|
||||||
return (m_socketFactory);
|
return m_socketFactory.dynamicCast <vmime::net::socketFactory>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ namespace windows {
|
|||||||
windowsHandler::windowsHandler()
|
windowsHandler::windowsHandler()
|
||||||
{
|
{
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
m_socketFactory = new windowsSocketFactory();
|
m_socketFactory = vmime::create <windowsSocketFactory>();
|
||||||
#endif
|
#endif
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
m_fileSysFactory = new windowsFileSystemFactory();
|
m_fileSysFactory = new windowsFileSystemFactory();
|
||||||
@ -52,9 +52,6 @@ windowsHandler::windowsHandler()
|
|||||||
|
|
||||||
windowsHandler::~windowsHandler()
|
windowsHandler::~windowsHandler()
|
||||||
{
|
{
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
|
||||||
delete (m_socketFactory);
|
|
||||||
#endif
|
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
delete (m_fileSysFactory);
|
delete (m_fileSysFactory);
|
||||||
#endif
|
#endif
|
||||||
@ -237,10 +234,9 @@ const unsigned int windowsHandler::getProcessId() const
|
|||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
|
|
||||||
vmime::net::socketFactory* windowsHandler::getSocketFactory
|
ref <vmime::net::socketFactory> windowsHandler::getSocketFactory() const
|
||||||
(const vmime::string& /* name */) const
|
|
||||||
{
|
{
|
||||||
return (m_socketFactory);
|
return m_socketFactory.dynamicCast <vmime::net::socketFactory>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,6 @@ public:
|
|||||||
|
|
||||||
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
||||||
serviceInfos::property PROPERTY_SERVER_PORT;
|
serviceInfos::property PROPERTY_SERVER_PORT;
|
||||||
serviceInfos::property PROPERTY_SERVER_SOCKETFACTORY;
|
|
||||||
|
|
||||||
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
||||||
};
|
};
|
||||||
|
@ -64,7 +64,6 @@ public:
|
|||||||
|
|
||||||
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
||||||
serviceInfos::property PROPERTY_SERVER_PORT;
|
serviceInfos::property PROPERTY_SERVER_PORT;
|
||||||
serviceInfos::property PROPERTY_SERVER_SOCKETFACTORY;
|
|
||||||
|
|
||||||
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
||||||
};
|
};
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "vmime/net/serviceFactory.hpp"
|
#include "vmime/net/serviceFactory.hpp"
|
||||||
#include "vmime/net/serviceInfos.hpp"
|
#include "vmime/net/serviceInfos.hpp"
|
||||||
|
|
||||||
|
#include "vmime/net/socket.hpp"
|
||||||
|
|
||||||
#if VMIME_HAVE_TLS_SUPPORT
|
#if VMIME_HAVE_TLS_SUPPORT
|
||||||
#include "vmime/net/tls/certificateVerifier.hpp"
|
#include "vmime/net/tls/certificateVerifier.hpp"
|
||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
@ -146,6 +148,20 @@ public:
|
|||||||
|
|
||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
|
|
||||||
|
/** Set the factory used to create socket objects for this
|
||||||
|
* service.
|
||||||
|
*
|
||||||
|
* @param sf socket factory
|
||||||
|
*/
|
||||||
|
void setSocketFactory(ref <socketFactory> sf);
|
||||||
|
|
||||||
|
/** Return the factory used to create socket objects for this
|
||||||
|
* service.
|
||||||
|
*
|
||||||
|
* @return socket factory
|
||||||
|
*/
|
||||||
|
ref <socketFactory> getSocketFactory();
|
||||||
|
|
||||||
/** Set a property for this service (service prefix is added automatically).
|
/** Set a property for this service (service prefix is added automatically).
|
||||||
*
|
*
|
||||||
* WARNING: this sets the property on the session object, so all service
|
* WARNING: this sets the property on the session object, so all service
|
||||||
@ -184,6 +200,7 @@ private:
|
|||||||
ref <tls::certificateVerifier> m_certVerifier;
|
ref <tls::certificateVerifier> m_certVerifier;
|
||||||
#endif // VMIME_HAVE_TLS_SUPPORT
|
#endif // VMIME_HAVE_TLS_SUPPORT
|
||||||
|
|
||||||
|
ref <socketFactory> m_socketFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,11 +76,6 @@ public:
|
|||||||
* maildir, this is the local filesystem directory). */
|
* maildir, this is the local filesystem directory). */
|
||||||
static const property SERVER_ROOTPATH;
|
static const property SERVER_ROOTPATH;
|
||||||
|
|
||||||
/** The common property 'server.socket-factory' used
|
|
||||||
* to indicate which factory to use to instanciate
|
|
||||||
* new socket objects. */
|
|
||||||
static const property SERVER_SOCKETFACTORY;
|
|
||||||
|
|
||||||
/** The common property 'auth.username' which is the
|
/** The common property 'auth.username' which is the
|
||||||
* username used to authenticate with the server. */
|
* username used to authenticate with the server. */
|
||||||
static const property AUTH_USERNAME;
|
static const property AUTH_USERNAME;
|
||||||
|
@ -63,7 +63,6 @@ public:
|
|||||||
|
|
||||||
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
serviceInfos::property PROPERTY_SERVER_ADDRESS;
|
||||||
serviceInfos::property PROPERTY_SERVER_PORT;
|
serviceInfos::property PROPERTY_SERVER_PORT;
|
||||||
serviceInfos::property PROPERTY_SERVER_SOCKETFACTORY;
|
|
||||||
|
|
||||||
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
serviceInfos::property PROPERTY_TIMEOUT_FACTORY;
|
||||||
};
|
};
|
||||||
|
@ -99,7 +99,7 @@ private:
|
|||||||
/** A class to create 'socket' objects.
|
/** A class to create 'socket' objects.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class socketFactory
|
class socketFactory : public object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ public:
|
|||||||
/** A class to create 'timeoutHandler' objects.
|
/** A class to create 'timeoutHandler' objects.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class timeoutHandlerFactory
|
class timeoutHandlerFactory : public object
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -103,18 +103,12 @@ public:
|
|||||||
virtual void wait() const = 0;
|
virtual void wait() const = 0;
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
/** Return a pointer to a socket factory for the specified socket
|
/** Return a pointer to the default socket factory for
|
||||||
* type name (this is user-defined, and used for example when you
|
* this platform.
|
||||||
* want to set up a SSL connection to a server).
|
|
||||||
* The returned object will not be deleted by VMime, so it can be
|
|
||||||
* a pointer to a static object.
|
|
||||||
*
|
*
|
||||||
* @param name socket type name (user-dependant): this is usually
|
|
||||||
* the value of the property "server.socket-factory" set in the
|
|
||||||
* session object
|
|
||||||
* @return socket factory
|
* @return socket factory
|
||||||
*/
|
*/
|
||||||
virtual net::socketFactory* getSocketFactory(const string& name = "default") const = 0;
|
virtual ref <net::socketFactory> getSocketFactory() const = 0;
|
||||||
|
|
||||||
/** Return a pointer to a timeout-handler factory for the specified name.
|
/** 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
|
* The returned object will not be deleted by VMime, so it can be a
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
const unsigned int getProcessId() const;
|
const unsigned int getProcessId() const;
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
vmime::net::socketFactory* getSocketFactory(const vmime::string& name) const;
|
ref <vmime::net::socketFactory> getSocketFactory() const;
|
||||||
|
|
||||||
vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const;
|
vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const;
|
||||||
#endif
|
#endif
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
posixSocketFactory* m_socketFactory;
|
ref <posixSocketFactory> m_socketFactory;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
const unsigned int getProcessId() const;
|
const unsigned int getProcessId() const;
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
vmime::net::socketFactory* getSocketFactory(const vmime::string& name) const;
|
ref <vmime::net::socketFactory> getSocketFactory() const;
|
||||||
|
|
||||||
vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const;
|
vmime::net::timeoutHandlerFactory* getTimeoutHandlerFactory(const vmime::string& name) const;
|
||||||
#endif
|
#endif
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
#if VMIME_HAVE_MESSAGING_FEATURES
|
#if VMIME_HAVE_MESSAGING_FEATURES
|
||||||
windowsSocketFactory* m_socketFactory;
|
ref <windowsSocketFactory> m_socketFactory;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
#if VMIME_HAVE_FILESYSTEM_FEATURES
|
||||||
|
Loading…
Reference in New Issue
Block a user