diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-04 07:50:38 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-05-04 07:50:38 +0000 |
| commit | c1aef8e2d1c7cb018856e1f28cb51f1e3cdc6f45 (patch) | |
| tree | f7bcb50f6d842a2b9d4ff697ef1c7e9800c48909 /src/DiskWriter.h | |
| parent | 5c8f48dc778e8e9c63ca08a68d86734f0edd9115 (diff) | |
2009-05-04 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Now the constructor of AbstractDiskWriter takes filename as an
argument and filename argument is removed from openFile(),
initAndOpenFile(), openExistingFile() interface. storeDir
member and its accessor functions are removed from DiskAdaptor
because it is not used anymore. size() member function of
DefaultDiskWriter, DirectDiskAdaptor and MultiDiskAdaptor now
can be called without opening file.
* src/AbstractDiskWriter.cc
* src/AbstractDiskWriter.h
* src/AbstractSingleDiskAdaptor.cc
* src/AbstractSingleDiskAdaptor.h
* src/ByteArrayDiskWriter.cc
* src/ByteArrayDiskWriter.h
* src/ByteArrayDiskWriterFactory.cc
* src/ByteArrayDiskWriterFactory.h
* src/DefaultDiskWriter.cc
* src/DefaultDiskWriter.h
* src/DefaultDiskWriterFactory.cc
* src/DefaultDiskWriterFactory.h
* src/DefaultPieceStorage.cc
* src/DirectDiskAdaptor.cc
* src/DirectDiskAdaptor.h
* src/DiskAdaptor.h
* src/DiskWriter.h
* src/DiskWriterFactory.h
* src/MessageDigestHelper.cc
* src/MultiDiskAdaptor.cc
* src/RequestGroup.cc
* src/UnknownLengthPieceStorage.cc
* src/Util.cc
* test/DefaultDiskWriterTest.cc
* test/DirectDiskAdaptorTest.cc
* test/FallocFileAllocationIteratorTest.cc
* test/MessageDigestHelperTest.cc
* test/MetalinkProcessorTest.cc
* test/MultiDiskAdaptorTest.cc
* test/MultiFileAllocationIteratorTest.cc
* test/SingleFileAllocationIteratorTest.cc
* test/UtilTest.cc
Diffstat (limited to 'src/DiskWriter.h')
| -rw-r--r-- | src/DiskWriter.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/DiskWriter.h b/src/DiskWriter.h index ede90fcf..663e3407 100644 --- a/src/DiskWriter.h +++ b/src/DiskWriter.h @@ -52,13 +52,11 @@ public: virtual ~DiskWriter() {} /** - * Creates a file output stream to write to the file with the specified name. - * If the file exists, then it is truncated to 0 length. - * @param filename the file name to be opened. + * Opens file. If the file exists, then it is truncated to 0 length. */ - virtual void initAndOpenFile(const std::string& filename, uint64_t totalLength = 0) = 0; + virtual void initAndOpenFile(uint64_t totalLength = 0) = 0; - virtual void openFile(const std::string& filename, uint64_t totalLength = 0) = 0; + virtual void openFile(uint64_t totalLength = 0) = 0; /** * Closes this output stream. @@ -67,12 +65,10 @@ public: virtual void closeFile() = 0; /** - * Opens a file output stream to write to the file with the specified name. - * If the file doesnot exists, an exception may be throwed. - * - * @param filename the file name to be opened. + * Opens a file. If the file doesnot exists, an exception may be + * thrown. */ - virtual void openExistingFile(const std::string& filename, uint64_t totalLength = 0) = 0; + virtual void openExistingFile(uint64_t totalLength = 0) = 0; // Returns file length virtual uint64_t size() = 0; |
