From 1372ac51ade17bc27126449bf29f99c6c2cf7703 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 14 Nov 2010 07:17:55 +0000 Subject: 2010-11-14 Tatsuhiro Tsujikawa Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts. --- src/AdaptiveFileAllocationIterator.cc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/AdaptiveFileAllocationIterator.cc') diff --git a/src/AdaptiveFileAllocationIterator.cc b/src/AdaptiveFileAllocationIterator.cc index cd1fe1e5..347ae0df 100644 --- a/src/AdaptiveFileAllocationIterator.cc +++ b/src/AdaptiveFileAllocationIterator.cc @@ -34,13 +34,13 @@ /* copyright --> */ #include "AdaptiveFileAllocationIterator.h" #include "BinaryStream.h" -#ifdef HAVE_FALLOCATE -# include "FallocFileAllocationIterator.h" -#endif // HAVE_FALLOCATE #include "SingleFileAllocationIterator.h" #include "RecoverableException.h" #include "LogFactory.h" #include "Logger.h" +#ifdef HAVE_FALLOCATE +# include "FallocFileAllocationIterator.h" +#endif // HAVE_FALLOCATE namespace aria2 { @@ -99,4 +99,18 @@ bool AdaptiveFileAllocationIterator::finished() } } +off_t AdaptiveFileAllocationIterator::getCurrentLength() +{ + if(!allocator_) { + return offset_; + } else { + return allocator_->getCurrentLength(); + } +} + +uint64_t AdaptiveFileAllocationIterator::getTotalLength() +{ + return totalLength_; +} + } // namespace aria2 -- cgit