diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-06 14:29:36 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-06 14:29:36 +0000 |
| commit | efbfe4c006cfb6e0bf3ee4ed57d0657c0cd85c19 (patch) | |
| tree | a72723a125c34220772259f051673ff88598bded /src/DownloadCommand.h | |
| parent | 552c753dbba55005964ad60698d803a44dac6391 (diff) | |
2010-09-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Data from remote server in HTTP/FTP download are now written to
the disk(or memory) through StreamFilter. Decoding chunked and
gziped streams are done cascading StreamFilter.
Removed inefficient 1byte read code.
* src/ChunkedDecodingStreamFilter.cc
* src/ChunkedDecodingStreamFilter.h
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/GZipDecodingStreamFilter.cc
* src/GZipDecodingStreamFilter.h
* src/HttpConnection.cc
* src/HttpDownloadCommand.cc
* src/HttpResponse.cc
* src/HttpResponse.h
* src/HttpResponseCommand.cc
* src/HttpResponseCommand.h
* src/HttpSkipResponseCommand.cc
* src/HttpSkipResponseCommand.h
* src/Makefile.am
* src/NullSinkStreamFilter.cc
* src/NullSinkStreamFilter.h
* src/RequestGroup.cc
* src/SinkStreamFilter.cc
* src/SinkStreamFilter.h
* src/StreamFilter.cc
* src/StreamFilter.h
* test/ChunkedDecodingStreamFilterTest.cc
* test/GZipDecodingStreamFilterTest.cc
* test/HttpResponseTest.cc
* test/Makefile.am
* test/MockSegment.h
Diffstat (limited to 'src/DownloadCommand.h')
| -rw-r--r-- | src/DownloadCommand.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/DownloadCommand.h b/src/DownloadCommand.h index 128b6bf7..13342c70 100644 --- a/src/DownloadCommand.h +++ b/src/DownloadCommand.h @@ -39,8 +39,8 @@ namespace aria2 { -class Decoder; class PeerStat; +class StreamFilter; #ifdef ENABLE_MESSAGE_DIGEST class MessageDigestContext; #endif // ENABLE_MESSAGE_DIGEST @@ -67,9 +67,9 @@ private: void checkLowestDownloadSpeed() const; - SharedHandle<Decoder> transferEncodingDecoder_; + SharedHandle<StreamFilter> streamFilter_; - SharedHandle<Decoder> contentEncodingDecoder_; + bool sinkFilterOnly_; protected: virtual bool executeInternal(); @@ -86,19 +86,12 @@ public: const SharedHandle<SocketCore>& s); virtual ~DownloadCommand(); - const SharedHandle<Decoder>& getTransferEncodingDecoder() const + const SharedHandle<StreamFilter>& getStreamFilter() const { - return transferEncodingDecoder_; + return streamFilter_; } - void setTransferEncodingDecoder(const SharedHandle<Decoder>& decoder); - - const SharedHandle<Decoder>& getContentEncodingDecoder() const - { - return contentEncodingDecoder_; - } - - void setContentEncodingDecoder(const SharedHandle<Decoder>& decoder); + void installStreamFilter(const SharedHandle<StreamFilter>& streamFilter); void setStartupIdleTime(time_t startupIdleTime) { |
