/* */ #ifndef _D_ITERATABLE_CHECKSUM_VALIDATOR_H_ #define _D_ITERATABLE_CHECKSUM_VALIDATOR_H_ #include "IteratableValidator.h" namespace aria2 { class SingleFileDownloadContext; class PieceStorage; class Logger; class MessageDigestContext; class IteratableChecksumValidator:public IteratableValidator { private: SharedHandle _dctx; SharedHandle _pieceStorage; off_t _currentOffset; SharedHandle _ctx; Logger* _logger; unsigned char* _buffer; public: IteratableChecksumValidator(const SharedHandle& dctx, const SharedHandle& pieceStorage); virtual ~IteratableChecksumValidator(); virtual void init(); virtual void validateChunk(); virtual bool finished() const; virtual off_t getCurrentOffset() const { return _currentOffset; } virtual uint64_t getTotalLength() const; }; typedef SharedHandle IteratableChecksumValidatorHandle; } // namespace aria2 #endif // _D_ITERATABLE_CHECKSUM_VALIDATOR_H_