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
Removed MetalinkProcessorFactory. Since we don't use both
libxml2 and expat simultaneously, MetalinkProcessor is now not
base class and it is directly implemented in
XML2SAXMetalinkProcessor and ExpatMetalinkProcessor.
* src/ExpatMetalinkProcessor.cc
* src/ExpatMetalinkProcessor.h
* src/Makefile.am
* src/MetalinkHelper.cc
* src/MetalinkProcessor.h
* src/MetalinkProcessorFactory.cc: Removed.
* src/MetalinkProcessorFactory.h: Removed
* src/XML2SAXMetalinkProcessor.cc
* src/XML2SAXMetalinkProcessor.h
* test/MetalinkProcessorTest.cc
Rewritten Exception class. Throw exception object, not its pointer and
catch by reference, so that remove problematic delete operator for
catched exception.
* src/Exception.cc
* src/Exception.h
* test/ExceptionTest.cc
* src/*: All files throwing/catching exception.
* test/*: All files throwing/catching exception.
Rewritten SharedHandle. Now copy constructor taking raw pointer
has
keyword explicit and SharedHandle's default constructor
initializes
its internal obj to null, old implementation initializes it
using
obj's default constructor.
To assign null, write SharedHandle<T> x(...); x.reset();
TODO: test/SharedHandleTest.cc needs more tests.
* src/SharedHandle.h
Fixed possible memory leak when an exception is thrown.
* src/XML2SAXMetalinkProcessor.cc
Added Expat support. If both libxml2 and Expat are installed,
then
libxml2 is used by default.
MetalinkProcessorFactory chooses from XML2SAXMetalinkProcessor
and
ExpatMetalinkProcessor according to the configuration.
* src/ExpatMetalinkProcessor.{h, cc}
* src/main.cc: Removed libxml2 specific header and init/free
function.
* src/MetalinkProcessorFactory.{h, cc}
* src/MetalinkHelper.cc
* src/Metalinker.h: Removed unnecessary libxml2 header.
* src/MetalinkProcessor.h
* test/XML2SAXMetalinkProcessorTest.cc: Removed because
MetalinkProcessorTest is used instead.
* test/MetalinkProcessorTest.cc: Added. It is actually the same
with
XML2SAXMetalinkProcessor, replaced XML2SAXMetalinkProcessor with
MetalinkProcessorFactory::newInstance().
* m4/libexpat.m4
* configure.ac: Added configuration options for libexpat.