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/pop3/POP3Response.cpp | |
parent | Per-protocol include files. (diff) | |
download | vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip |
Boost/C++11 shared pointers.
Diffstat (limited to 'src/net/pop3/POP3Response.cpp')
-rw-r--r-- | src/net/pop3/POP3Response.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/net/pop3/POP3Response.cpp b/src/net/pop3/POP3Response.cpp index 975cd642..e24634c6 100644 --- a/src/net/pop3/POP3Response.cpp +++ b/src/net/pop3/POP3Response.cpp @@ -46,17 +46,17 @@ namespace net { namespace pop3 { -POP3Response::POP3Response(ref <socket> sok, ref <timeoutHandler> toh) +POP3Response::POP3Response(shared_ptr <socket> sok, shared_ptr <timeoutHandler> toh) : m_socket(sok), m_timeoutHandler(toh) { } // static -ref <POP3Response> POP3Response::readResponse(ref <POP3Connection> conn) +shared_ptr <POP3Response> POP3Response::readResponse(shared_ptr <POP3Connection> conn) { - ref <POP3Response> resp = vmime::create <POP3Response> - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr <POP3Response> resp = shared_ptr <POP3Response> + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string buffer; resp->readResponseImpl(buffer, /* multiLine */ false); @@ -70,10 +70,10 @@ ref <POP3Response> POP3Response::readResponse(ref <POP3Connection> conn) // static -ref <POP3Response> POP3Response::readMultilineResponse(ref <POP3Connection> conn) +shared_ptr <POP3Response> POP3Response::readMultilineResponse(shared_ptr <POP3Connection> conn) { - ref <POP3Response> resp = vmime::create <POP3Response> - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr <POP3Response> resp = shared_ptr <POP3Response> + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string buffer; resp->readResponseImpl(buffer, /* multiLine */ true); @@ -96,12 +96,12 @@ ref <POP3Response> POP3Response::readMultilineResponse(ref <POP3Connection> conn // static -ref <POP3Response> POP3Response::readLargeResponse - (ref <POP3Connection> conn, utility::outputStream& os, +shared_ptr <POP3Response> POP3Response::readLargeResponse + (shared_ptr <POP3Connection> conn, utility::outputStream& os, utility::progressListener* progress, const long predictedSize) { - ref <POP3Response> resp = vmime::create <POP3Response> - (conn->getSocket(), conn->getTimeoutHandler()); + shared_ptr <POP3Response> resp = shared_ptr <POP3Response> + (new POP3Response(conn->getSocket(), conn->getTimeoutHandler())); string firstLine; resp->readResponseImpl(firstLine, os, progress, predictedSize); |