From 7ab35173bce99c6c9a5f189cdd83f93fcb3e9086 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 12 Jun 2013 14:02:40 +0200 Subject: Moved POP3 connection-related things to POP3Connection object. --- src/net/pop3/POP3Response.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/net/pop3/POP3Response.cpp') diff --git a/src/net/pop3/POP3Response.cpp b/src/net/pop3/POP3Response.cpp index d61e1e6d..975cd642 100644 --- a/src/net/pop3/POP3Response.cpp +++ b/src/net/pop3/POP3Response.cpp @@ -28,6 +28,7 @@ #include "vmime/net/pop3/POP3Response.hpp" +#include "vmime/net/pop3/POP3Connection.hpp" #include "vmime/platform.hpp" @@ -52,10 +53,10 @@ POP3Response::POP3Response(ref sok, ref toh) // static -ref POP3Response::readResponse - (ref sok, ref toh) +ref POP3Response::readResponse(ref conn) { - ref resp = vmime::create (sok, toh); + ref resp = vmime::create + (conn->getSocket(), conn->getTimeoutHandler()); string buffer; resp->readResponseImpl(buffer, /* multiLine */ false); @@ -69,10 +70,10 @@ ref POP3Response::readResponse // static -ref POP3Response::readMultilineResponse - (ref sok, ref toh) +ref POP3Response::readMultilineResponse(ref conn) { - ref resp = vmime::create (sok, toh); + ref resp = vmime::create + (conn->getSocket(), conn->getTimeoutHandler()); string buffer; resp->readResponseImpl(buffer, /* multiLine */ true); @@ -96,10 +97,11 @@ ref POP3Response::readMultilineResponse // static ref POP3Response::readLargeResponse - (ref sok, ref toh, - utility::outputStream& os, utility::progressListener* progress, const long predictedSize) + (ref conn, utility::outputStream& os, + utility::progressListener* progress, const long predictedSize) { - ref resp = vmime::create (sok, toh); + ref resp = vmime::create + (conn->getSocket(), conn->getTimeoutHandler()); string firstLine; resp->readResponseImpl(firstLine, os, progress, predictedSize); -- cgit