diff options
author | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-11-21 21:16:57 +0000 |
commit | f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch) | |
tree | 2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /src/net/smtp | |
parent | Per-protocol include files. (diff) | |
download | vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip |
Boost/C++11 shared pointers.
Diffstat (limited to 'src/net/smtp')
-rw-r--r-- | src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp | 6 | ||||
-rw-r--r-- | src/net/smtp/SMTPCommand.cpp | 30 | ||||
-rw-r--r-- | src/net/smtp/SMTPCommandSet.cpp | 20 | ||||
-rw-r--r-- | src/net/smtp/SMTPConnection.cpp | 82 | ||||
-rw-r--r-- | src/net/smtp/SMTPResponse.cpp | 8 | ||||
-rw-r--r-- | src/net/smtp/SMTPSTransport.cpp | 2 | ||||
-rw-r--r-- | src/net/smtp/SMTPTransport.cpp | 26 |
7 files changed, 87 insertions, 87 deletions
diff --git a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp index 932bd56f..0584f7e6 100644 --- a/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp +++ b/src/net/smtp/SMTPChunkingOutputStreamAdapter.cpp @@ -40,7 +40,7 @@ namespace net { namespace smtp { -SMTPChunkingOutputStreamAdapter::SMTPChunkingOutputStreamAdapter(ref <SMTPConnection> conn) +SMTPChunkingOutputStreamAdapter::SMTPChunkingOutputStreamAdapter(shared_ptr <SMTPConnection> conn) : m_connection(conn), m_bufferSize(0), m_chunkCount(0) { } @@ -64,7 +64,7 @@ void SMTPChunkingOutputStreamAdapter::sendChunk // If PIPELINING is not supported, read one response for this BDAT command if (!m_connection->hasExtension("PIPELINING")) { - ref <SMTPResponse> resp = m_connection->readResponse(); + shared_ptr <SMTPResponse> resp = m_connection->readResponse(); if (resp->getCode() != 250) { @@ -77,7 +77,7 @@ void SMTPChunkingOutputStreamAdapter::sendChunk else if (last) { bool invalidReply = false; - ref <SMTPResponse> resp; + shared_ptr <SMTPResponse> resp; for (unsigned int i = 0 ; i < m_chunkCount ; ++i) { diff --git a/src/net/smtp/SMTPCommand.cpp b/src/net/smtp/SMTPCommand.cpp index e40797f2..6b3d1d79 100644 --- a/src/net/smtp/SMTPCommand.cpp +++ b/src/net/smtp/SMTPCommand.cpp @@ -47,7 +47,7 @@ SMTPCommand::SMTPCommand(const string& text) // static -ref <SMTPCommand> SMTPCommand::EHLO(const string& hostname) +shared_ptr <SMTPCommand> SMTPCommand::EHLO(const string& hostname) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -58,7 +58,7 @@ ref <SMTPCommand> SMTPCommand::EHLO(const string& hostname) // static -ref <SMTPCommand> SMTPCommand::HELO(const string& hostname) +shared_ptr <SMTPCommand> SMTPCommand::HELO(const string& hostname) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -69,7 +69,7 @@ ref <SMTPCommand> SMTPCommand::HELO(const string& hostname) // static -ref <SMTPCommand> SMTPCommand::AUTH(const string& mechName) +shared_ptr <SMTPCommand> SMTPCommand::AUTH(const string& mechName) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -80,21 +80,21 @@ ref <SMTPCommand> SMTPCommand::AUTH(const string& mechName) // static -ref <SMTPCommand> SMTPCommand::STARTTLS() +shared_ptr <SMTPCommand> SMTPCommand::STARTTLS() { return createCommand("STARTTLS"); } // static -ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8) +shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8) { return MAIL(mbox, utf8, 0); } // static -ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size) +shared_ptr <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -123,7 +123,7 @@ ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const // static -ref <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8) +shared_ptr <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -146,21 +146,21 @@ ref <SMTPCommand> SMTPCommand::RCPT(const mailbox& mbox, const bool utf8) // static -ref <SMTPCommand> SMTPCommand::RSET() +shared_ptr <SMTPCommand> SMTPCommand::RSET() { return createCommand("RSET"); } // static -ref <SMTPCommand> SMTPCommand::DATA() +shared_ptr <SMTPCommand> SMTPCommand::DATA() { return createCommand("DATA"); } // static -ref <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool last) +shared_ptr <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool last) { std::ostringstream cmd; cmd.imbue(std::locale::classic()); @@ -174,23 +174,23 @@ ref <SMTPCommand> SMTPCommand::BDAT(const unsigned long chunkSize, const bool la // static -ref <SMTPCommand> SMTPCommand::NOOP() +shared_ptr <SMTPCommand> SMTPCommand::NOOP() { return createCommand("NOOP"); } // static -ref <SMTPCommand> SMTPCommand::QUIT() +shared_ptr <SMTPCommand> SMTPCommand::QUIT() { return createCommand("QUIT"); } // static -ref <SMTPCommand> SMTPCommand::createCommand(const string& text) +shared_ptr <SMTPCommand> SMTPCommand::createCommand(const string& text) { - return vmime::create <SMTPCommand>(text); + return shared_ptr <SMTPCommand>(new SMTPCommand(text)); } @@ -200,7 +200,7 @@ const string SMTPCommand::getText() const } -void SMTPCommand::writeToSocket(ref <socket> sok) +void SMTPCommand::writeToSocket(shared_ptr <socket> sok) { sok->send(m_text + "\r\n"); } diff --git a/src/net/smtp/SMTPCommandSet.cpp b/src/net/smtp/SMTPCommandSet.cpp index a967c3a6..3e03427c 100644 --- a/src/net/smtp/SMTPCommandSet.cpp +++ b/src/net/smtp/SMTPCommandSet.cpp @@ -49,13 +49,13 @@ SMTPCommandSet::SMTPCommandSet(const bool pipeline) // static -ref <SMTPCommandSet> SMTPCommandSet::create(const bool pipeline) +shared_ptr <SMTPCommandSet> SMTPCommandSet::create(const bool pipeline) { - return vmime::create <SMTPCommandSet>(pipeline); + return shared_ptr <SMTPCommandSet>(new SMTPCommandSet(pipeline)); } -void SMTPCommandSet::addCommand(ref <SMTPCommand> cmd) +void SMTPCommandSet::addCommand(shared_ptr <SMTPCommand> cmd) { if (m_started) { @@ -67,17 +67,17 @@ void SMTPCommandSet::addCommand(ref <SMTPCommand> cmd) } -void SMTPCommandSet::writeToSocket(ref <socket> sok) +void SMTPCommandSet::writeToSocket(shared_ptr <socket> sok) { if (m_pipeline) { if (!m_started) { // Send all commands at once - for (std::list <ref <SMTPCommand> >::const_iterator it = m_commands.begin() ; + for (std::list <shared_ptr <SMTPCommand> >::const_iterator it = m_commands.begin() ; it != m_commands.end() ; ++it) { - ref <SMTPCommand> cmd = *it; + shared_ptr <SMTPCommand> cmd = *it; cmd->writeToSocket(sok); } } @@ -85,7 +85,7 @@ void SMTPCommandSet::writeToSocket(ref <socket> sok) if (!m_commands.empty()) { // Advance the pointer to last command sent - ref <SMTPCommand> cmd = m_commands.front(); + shared_ptr <SMTPCommand> cmd = m_commands.front(); m_commands.pop_front(); m_lastCommandSent = cmd; @@ -96,7 +96,7 @@ void SMTPCommandSet::writeToSocket(ref <socket> sok) if (!m_commands.empty()) { // Send only one command - ref <SMTPCommand> cmd = m_commands.front(); + shared_ptr <SMTPCommand> cmd = m_commands.front(); m_commands.pop_front(); cmd->writeToSocket(sok); @@ -114,7 +114,7 @@ const string SMTPCommandSet::getText() const std::ostringstream cmd; cmd.imbue(std::locale::classic()); - for (std::list <ref <SMTPCommand> >::const_iterator it = m_commands.begin() ; + for (std::list <shared_ptr <SMTPCommand> >::const_iterator it = m_commands.begin() ; it != m_commands.end() ; ++it) { cmd << (*it)->getText() << "\r\n"; @@ -130,7 +130,7 @@ bool SMTPCommandSet::isFinished() const } -ref <SMTPCommand> SMTPCommandSet::getLastCommandSent() const +shared_ptr <SMTPCommand> SMTPCommandSet::getLastCommandSent() const { return m_lastCommandSent; } diff --git a/src/net/smtp/SMTPConnection.cpp b/src/net/smtp/SMTPConnection.cpp index e831ccfc..9fcacbc1 100644 --- a/src/net/smtp/SMTPConnection.cpp +++ b/src/net/smtp/SMTPConnection.cpp @@ -51,11 +51,11 @@ // Helpers for service properties #define GET_PROPERTY(type, prop) \ - (m_transport.acquire()->getInfos().getPropertyValue <type>(getSession(), \ - dynamic_cast <const SMTPServiceInfos&>(m_transport.acquire()->getInfos()).getProperties().prop)) + (m_transport.lock()->getInfos().getPropertyValue <type>(getSession(), \ + dynamic_cast <const SMTPServiceInfos&>(m_transport.lock()->getInfos()).getProperties().prop)) #define HAS_PROPERTY(prop) \ - (m_transport.acquire()->getInfos().hasProperty(getSession(), \ - dynamic_cast <const SMTPServiceInfos&>(m_transport.acquire()->getInfos()).getProperties().prop)) + (m_transport.lock()->getInfos().hasProperty(getSession(), \ + dynamic_cast <const SMTPServiceInfos&>(m_transport.lock()->getInfos()).getProperties().prop)) namespace vmime { @@ -64,8 +64,8 @@ namespace smtp { -SMTPConnection::SMTPConnection(ref <SMTPTransport> transport, ref <security::authenticator> auth) - : m_transport(transport), m_auth(auth), m_socket(NULL), m_timeoutHandler(NULL), +SMTPConnection::SMTPConnection(shared_ptr <SMTPTransport> transport, shared_ptr <security::authenticator> auth) + : m_transport(transport), m_auth(auth), m_socket(null), m_timeoutHandler(null), m_authenticated(false), m_secured(false), m_extendedSMTP(false) { } @@ -95,7 +95,7 @@ void SMTPConnection::connect() const string address = GET_PROPERTY(string, PROPERTY_SERVER_ADDRESS); const port_t port = GET_PROPERTY(port_t, PROPERTY_SERVER_PORT); - ref <SMTPTransport> transport = m_transport.acquire(); + shared_ptr <SMTPTransport> transport = m_transport.lock(); // Create the time-out handler if (transport->getTimeoutHandlerFactory()) @@ -107,22 +107,22 @@ void SMTPConnection::connect() #if VMIME_HAVE_TLS_SUPPORT if (transport->isSMTPS()) // dedicated port/SMTPS { - ref <tls::TLSSession> tlsSession = tls::TLSSession::create + shared_ptr <tls::TLSSession> tlsSession = tls::TLSSession::create (transport->getCertificateVerifier(), transport->getSession()->getTLSProperties()); - ref <tls::TLSSocket> tlsSocket = + shared_ptr <tls::TLSSocket> tlsSocket = tlsSession->getSocket(m_socket); m_socket = tlsSocket; m_secured = true; - m_cntInfos = vmime::create <tls::TLSSecuredConnectionInfos>(address, port, tlsSession, tlsSocket); + m_cntInfos = make_shared <tls::TLSSecuredConnectionInfos>(address, port, tlsSession, tlsSocket); } else #endif // VMIME_HAVE_TLS_SUPPORT { - m_cntInfos = vmime::create <defaultConnectionInfos>(address, port); + m_cntInfos = make_shared <defaultConnectionInfos>(address, port); } m_socket->connect(address, port); @@ -132,7 +132,7 @@ void SMTPConnection::connect() // eg: C: <connection to server> // --- S: 220 smtp.domain.com Service ready - ref <SMTPResponse> resp; + shared_ptr <SMTPResponse> resp; if ((resp = readResponse())->getCode() != 220) { @@ -199,7 +199,7 @@ void SMTPConnection::helo() sendRequest(SMTPCommand::EHLO(platform::getHandler()->getHostName())); - ref <SMTPResponse> resp; + shared_ptr <SMTPResponse> resp; if ((resp = readResponse())->getCode() != 250) { @@ -281,7 +281,7 @@ void SMTPConnection::authenticate() throw exceptions::command_error("AUTH", "ESMTP not supported."); } - getAuthenticator()->setService(m_transport.acquire()); + getAuthenticator()->setService(m_transport.lock()); #if VMIME_HAVE_SASL_SUPPORT // First, try SASL authentication @@ -325,7 +325,7 @@ void SMTPConnection::authenticate() void SMTPConnection::authenticateSASL() { - if (!getAuthenticator().dynamicCast <security::sasl::SASLAuthenticator>()) + if (!dynamicCast <security::sasl::SASLAuthenticator>(getAuthenticator())) throw exceptions::authentication_error("No SASL authenticator available."); // Obtain SASL mechanisms supported by server from ESMTP extensions @@ -335,10 +335,10 @@ void SMTPConnection::authenticateSASL() if (saslMechs.empty()) throw exceptions::authentication_error("No SASL mechanism available."); - std::vector <ref <security::sasl::SASLMechanism> > mechList; + std::vector <shared_ptr <security::sasl::SASLMechanism> > mechList; - ref <security::sasl::SASLContext> saslContext = - vmime::create <security::sasl::SASLContext>(); + shared_ptr <security::sasl::SASLContext> saslContext = + make_shared <security::sasl::SASLContext>(); for (unsigned int i = 0 ; i < saslMechs.size() ; ++i) { @@ -357,14 +357,14 @@ void SMTPConnection::authenticateSASL() throw exceptions::authentication_error("No SASL mechanism available."); // Try to suggest a mechanism among all those supported - ref <security::sasl::SASLMechanism> suggestedMech = + shared_ptr <security::sasl::SASLMechanism> suggestedMech = saslContext->suggestMechanism(mechList); if (!suggestedMech) throw exceptions::authentication_error("Unable to suggest SASL mechanism."); // Allow application to choose which mechanisms to use - mechList = getAuthenticator().dynamicCast <security::sasl::SASLAuthenticator>()-> + mechList = dynamicCast <security::sasl::SASLAuthenticator>(getAuthenticator())-> getAcceptableMechanisms(mechList, suggestedMech); if (mechList.empty()) @@ -373,9 +373,9 @@ void SMTPConnection::authenticateSASL() // Try each mechanism in the list in turn for (unsigned int i = 0 ; i < mechList.size() ; ++i) { - ref <security::sasl::SASLMechanism> mech = mechList[i]; + shared_ptr <security::sasl::SASLMechanism> mech = mechList[i]; - ref <security::sasl::SASLSession> saslSession = + shared_ptr <security::sasl::SASLSession> saslSession = saslContext->createSession("smtp", getAuthenticator(), mech); saslSession->init(); @@ -384,7 +384,7 @@ void SMTPConnection::authenticateSASL() for (bool cont = true ; cont ; ) { - ref <SMTPResponse> response = readResponse(); + shared_ptr <SMTPResponse> response = readResponse(); switch (response->getCode()) { @@ -472,7 +472,7 @@ void SMTPConnection::startTLS() { sendRequest(SMTPCommand::STARTTLS()); - ref <SMTPResponse> resp = readResponse(); + shared_ptr <SMTPResponse> resp = readResponse(); if (resp->getCode() != 220) { @@ -480,11 +480,11 @@ void SMTPConnection::startTLS() resp->getCode(), resp->getEnhancedCode()); } - ref <tls::TLSSession> tlsSession = tls::TLSSession::create + shared_ptr <tls::TLSSession> tlsSession = tls::TLSSession::create (getTransport()->getCertificateVerifier(), getTransport()->getSession()->getTLSProperties()); - ref <tls::TLSSocket> tlsSocket = + shared_ptr <tls::TLSSocket> tlsSocket = tlsSession->getSocket(m_socket); tlsSocket->handshake(m_timeoutHandler); @@ -492,7 +492,7 @@ void SMTPConnection::startTLS() m_socket = tlsSocket; m_secured = true; - m_cntInfos = vmime::create <tls::TLSSecuredConnectionInfos> + m_cntInfos = make_shared <tls::TLSSecuredConnectionInfos> (m_cntInfos->getHost(), m_cntInfos->getPort(), tlsSession, tlsSocket); } catch (exceptions::command_error&) @@ -533,27 +533,27 @@ void SMTPConnection::internalDisconnect() } m_socket->disconnect(); - m_socket = NULL; + m_socket = null; - m_timeoutHandler = NULL; + m_timeoutHandler = null; m_authenticated = false; m_extendedSMTP = false; m_secured = false; - m_cntInfos = NULL; + m_cntInfos = null; } -void SMTPConnection::sendRequest(ref <SMTPCommand> cmd) +void SMTPConnection::sendRequest(shared_ptr <SMTPCommand> cmd) { cmd->writeToSocket(m_socket); } -ref <SMTPResponse> SMTPConnection::readResponse() +shared_ptr <SMTPResponse> SMTPConnection::readResponse() { - ref <SMTPResponse> resp = SMTPResponse::readResponse + shared_ptr <SMTPResponse> resp = SMTPResponse::readResponse (m_socket, m_timeoutHandler, m_responseState); m_responseState = resp->getCurrentState(); @@ -574,37 +574,37 @@ bool SMTPConnection::isSecuredConnection() const } -ref <connectionInfos> SMTPConnection::getConnectionInfos() const +shared_ptr <connectionInfos> SMTPConnection::getConnectionInfos() const { return m_cntInfos; } -ref <SMTPTransport> SMTPConnection::getTransport() +shared_ptr <SMTPTransport> SMTPConnection::getTransport() { - return m_transport.acquire(); + return m_transport.lock(); } -ref <session> SMTPConnection::getSession() +shared_ptr <session> SMTPConnection::getSession() { - return m_transport.acquire()->getSession(); + return m_transport.lock()->getSession(); } -ref <socket> SMTPConnection::getSocket() +shared_ptr <socket> SMTPConnection::getSocket() { return m_socket; } -ref <timeoutHandler> SMTPConnection::getTimeoutHandler() +shared_ptr <timeoutHandler> SMTPConnection::getTimeoutHandler() { return m_timeoutHandler; } -ref <security::authenticator> SMTPConnection::getAuthenticator() +shared_ptr <security::authenticator> SMTPConnection::getAuthenticator() { return m_auth; } diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp index 9367dcd4..baefc38d 100644 --- a/src/net/smtp/SMTPResponse.cpp +++ b/src/net/smtp/SMTPResponse.cpp @@ -43,7 +43,7 @@ namespace net { namespace smtp { -SMTPResponse::SMTPResponse(ref <socket> sok, ref <timeoutHandler> toh, const state& st) +SMTPResponse::SMTPResponse(shared_ptr <socket> sok, shared_ptr <timeoutHandler> toh, const state& st) : m_socket(sok), m_timeoutHandler(toh), m_responseBuffer(st.responseBuffer), m_responseContinues(false) { @@ -94,10 +94,10 @@ const string SMTPResponse::getText() const // static -ref <SMTPResponse> SMTPResponse::readResponse - (ref <socket> sok, ref <timeoutHandler> toh, const state& st) +shared_ptr <SMTPResponse> SMTPResponse::readResponse + (shared_ptr <socket> sok, shared_ptr <timeoutHandler> toh, const state& st) { - ref <SMTPResponse> resp = vmime::create <SMTPResponse>(sok, toh, st); + shared_ptr <SMTPResponse> resp = shared_ptr <SMTPResponse>(new SMTPResponse(sok, toh, st)); resp->readResponse(); diff --git a/src/net/smtp/SMTPSTransport.cpp b/src/net/smtp/SMTPSTransport.cpp index 2e594ce7..ab64d49d 100644 --- a/src/net/smtp/SMTPSTransport.cpp +++ b/src/net/smtp/SMTPSTransport.cpp @@ -35,7 +35,7 @@ namespace net { namespace smtp { -SMTPSTransport::SMTPSTransport(ref <session> sess, ref <security::authenticator> auth) +SMTPSTransport::SMTPSTransport(shared_ptr <session> sess, shared_ptr <security::authenticator> auth) : SMTPTransport(sess, auth, true) { } diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index 91487ed4..4f409a03 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -51,7 +51,7 @@ namespace net { namespace smtp { -SMTPTransport::SMTPTransport(ref <session> sess, ref <security::authenticator> auth, const bool secured) +SMTPTransport::SMTPTransport(shared_ptr <session> sess, shared_ptr <security::authenticator> auth, const bool secured) : transport(sess, getInfosInstance(), auth), m_isSMTPS(secured), m_needReset(false) { } @@ -88,8 +88,8 @@ void SMTPTransport::connect() if (isConnected()) throw exceptions::already_connected(); - m_connection = vmime::create <SMTPConnection> - (thisRef().dynamicCast <SMTPTransport>(), getAuthenticator()); + m_connection = make_shared <SMTPConnection> + (dynamicCast <SMTPTransport>(shared_from_this()), getAuthenticator()); try { @@ -97,7 +97,7 @@ void SMTPTransport::connect() } catch (std::exception&) { - m_connection = NULL; + m_connection = null; throw; } } @@ -118,16 +118,16 @@ bool SMTPTransport::isSecuredConnection() const } -ref <connectionInfos> SMTPTransport::getConnectionInfos() const +shared_ptr <connectionInfos> SMTPTransport::getConnectionInfos() const { if (m_connection == NULL) - return NULL; + return null; return m_connection->getConnectionInfos(); } -ref <SMTPConnection> SMTPTransport::getConnection() +shared_ptr <SMTPConnection> SMTPTransport::getConnection() { return m_connection; } @@ -139,7 +139,7 @@ void SMTPTransport::disconnect() throw exceptions::not_connected(); m_connection->disconnect(); - m_connection = NULL; + m_connection = null; } @@ -150,7 +150,7 @@ void SMTPTransport::noop() m_connection->sendRequest(SMTPCommand::NOOP()); - ref <SMTPResponse> resp = m_connection->readResponse(); + shared_ptr <SMTPResponse> resp = m_connection->readResponse(); if (resp->getCode() != 250) { @@ -177,8 +177,8 @@ void SMTPTransport::sendEnvelope getInfos().getPropertyValue <bool>(getSession(), dynamic_cast <const SMTPServiceInfos&>(getInfos()).getProperties().PROPERTY_OPTIONS_PIPELINING); - ref <SMTPResponse> resp; - ref <SMTPCommandSet> commands = SMTPCommandSet::create(hasPipelining); + shared_ptr <SMTPResponse> resp; + shared_ptr <SMTPCommandSet> commands = SMTPCommandSet::create(hasPipelining); // Emit a "RSET" command if we previously sent a message on this connection if (needReset) @@ -336,7 +336,7 @@ void SMTPTransport::send // Send end-of-data delimiter m_connection->getSocket()->sendRaw("\r\n.\r\n", 5); - ref <SMTPResponse> resp; + shared_ptr <SMTPResponse> resp; if ((resp = m_connection->readResponse())->getCode() != 250) { @@ -349,7 +349,7 @@ void SMTPTransport::send void SMTPTransport::send - (ref <vmime::message> msg, const mailbox& expeditor, const mailboxList& recipients, + (shared_ptr <vmime::message> msg, const mailbox& expeditor, const mailboxList& recipients, utility::progressListener* progress, const mailbox& sender) { if (!isConnected()) |