summaryrefslogtreecommitdiff
path: root/src/ByteArrayDiskWriter.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-24 14:32:49 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-03-24 14:32:49 +0000
commita37aaa9c0c43c1013b323f28545eb9330d56dee3 (patch)
tree0aef46aad2dee8da1dd5f95d9a9d90100caa90b7 /src/ByteArrayDiskWriter.h
parent5649cf6cda777cff7749b12f5286272959520a4f (diff)
2007-03-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To add the ability to resume downloading a partially downloaded file which is downloaded from the beginning: * src/FileAllocator.h: Made abstract class. New DefaultFileAllocator takes this role. * src/main.cc: Added -c option. * src/BitfieldMan.h, src/BitfieldMan.cc (setBitRange): New function. * src/DiskWriter.h (openExistingFile): Added totalLength argument. * src/prefs.h (PREF_CONTINUE): New definition. * src/SegmentMan.h, src/SegmentMan.cc (markPieceDone): New function. * src/DefaultDiskWriter.cc (createNewDiskWriter): Add GlowFileAllocator to the new object. * src/AbstractDiskWriter.h (glowFileAllocator): New variable. * src/AbstractDiskWriter.cc (openExistingFile): Now preallocate file space from the end of the existing file if totalLength argument is specified and grater than 0. * src/UrlRequestInfo.cc: If -c option is specified and the file to download exists in local, continue the download of the file. --allow-overwrite=true is assumed in this context. * src/DefaultFileAllocator.h, src/DefaultFileAllocator.cc: New class. * src/GlowFileAllocator.h, src/GlowFileAllocator.cc: New class. Throw exception if --check-integrity=true is specified but chunk checksums are not provided: * src/UrlRequestInfo.cc
Diffstat (limited to 'src/ByteArrayDiskWriter.h')
-rw-r--r--src/ByteArrayDiskWriter.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ByteArrayDiskWriter.h b/src/ByteArrayDiskWriter.h
index e11917ff..7e1b0b02 100644
--- a/src/ByteArrayDiskWriter.h
+++ b/src/ByteArrayDiskWriter.h
@@ -55,7 +55,7 @@ public:
virtual void closeFile();
- virtual void openExistingFile(const string& filename);
+ virtual void openExistingFile(const string& filename, int64_t totalLength = 0);
// position is ignored
virtual void writeData(const char* data, int32_t len, int64_t position = 0);