diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-10-11 16:58:24 +0000 |
| commit | 048a2cf59737f761876e81a77e8d064c45c752d7 (patch) | |
| tree | 65c9d5498aafe6a8c8e640ddfcc43c7013504d0d /src/FtpConnection.h | |
| parent | e26bbbb9eee140ba24402fe872a752b42f0077de (diff) | |
2007-10-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Implemented BitTorrent/http/ftp integrated download.
I've rewritten lots of files and now some headers have forward
class declarations to reduce compile time.
The implementation is extremely alpha stage, I recommend to use this
for testing purpose only.
Diffstat (limited to 'src/FtpConnection.h')
| -rw-r--r-- | src/FtpConnection.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/FtpConnection.h b/src/FtpConnection.h index 766d3720..6d3a17dc 100644 --- a/src/FtpConnection.h +++ b/src/FtpConnection.h @@ -35,16 +35,16 @@ #ifndef _D_FTP_CONNECTION_H_ #define _D_FTP_CONNECTION_H_ +#include "common.h" #include "Socket.h" #include "Option.h" #include "Logger.h" #include "Segment.h" #include "Request.h" -#include "common.h" +#include "DlAbortEx.h" +#include "DlRetryEx.h" #include <utility> -using namespace std; - class FtpConnection { private: int32_t cuid; @@ -57,24 +57,24 @@ private: int32_t getStatus(const string& response) const; bool isEndOfResponse(int32_t status, const string& response) const; - bool bulkReceiveResponse(pair<int32_t, string>& response); + bool bulkReceiveResponse(pair<int32_t, string>& response) throw(DlRetryEx*); public: FtpConnection(int32_t cuid, const SocketHandle& socket, const RequestHandle req, const Option* op); ~FtpConnection(); - void sendUser() const; - void sendPass() const; - void sendType() const; - void sendCwd() const; - void sendSize() const; - void sendPasv() const; - SocketHandle sendPort() const; - void sendRest(const SegmentHandle& segment) const; - void sendRetr() const; + void sendUser() const throw(DlRetryEx*); + void sendPass() const throw(DlRetryEx*); + void sendType() const throw(DlRetryEx*); + void sendCwd() const throw(DlRetryEx*); + void sendSize() const throw(DlRetryEx*); + void sendPasv() const throw(DlRetryEx*); + SocketHandle sendPort() const throw(DlAbortEx*, DlRetryEx*); + void sendRest(const SegmentHandle& segment) const throw(DlRetryEx*); + void sendRetr() const throw(DlRetryEx*); - int32_t receiveResponse(); - int32_t receiveSizeResponse(int64_t& size); - int32_t receivePasvResponse(pair<string, int32_t>& dest); + int32_t receiveResponse() throw(DlRetryEx*); + int32_t receiveSizeResponse(int64_t& size) throw(DlRetryEx*); + int32_t receivePasvResponse(pair<string, int32_t>& dest) throw(DlRetryEx*); }; #endif // _D_FTP_CONNECTION_H_ |
