/* */ #include "FtpTunnelResponseCommand.h" #include "FtpNegotiationCommand.h" #include "Request.h" #include "HttpConnection.h" #include "HttpRequest.h" #include "Segment.h" #include "SocketCore.h" #include "SocketRecvBuffer.h" #ifdef HAVE_LIBSSH2 #include "SftpNegotiationCommand.h" #endif // HAVE_LIBSSH2 namespace aria2 { FtpTunnelResponseCommand::FtpTunnelResponseCommand( cuid_t cuid, const std::shared_ptr& req, const std::shared_ptr& fileEntry, RequestGroup* requestGroup, const std::shared_ptr& httpConnection, DownloadEngine* e, const std::shared_ptr& s) : AbstractProxyResponseCommand(cuid, req, fileEntry, requestGroup, httpConnection, e, s) { } FtpTunnelResponseCommand::~FtpTunnelResponseCommand() = default; std::unique_ptr FtpTunnelResponseCommand::getNextCommand() { #ifdef HAVE_LIBSSH2 if (getRequest()->getProtocol() == "sftp") { return make_unique( getCuid(), getRequest(), getFileEntry(), getRequestGroup(), getDownloadEngine(), getSocket()); } #endif // HAVE_LIBSSH2 return make_unique(getCuid(), getRequest(), getFileEntry(), getRequestGroup(), getDownloadEngine(), getSocket()); } } // namespace aria2