/* */ #ifndef D_ITERATABLE_VALIDATOR_H #define D_ITERATABLE_VALIDATOR_H #include "common.h" #include "SharedHandle.h" #include namespace aria2 { /** * This class provides the interface to validate files. * * Be aware to call init() before first validateChunk() call. * Then, call validateChunk() until finished() returns true. * The progress information is available using getCurrentOffset() and * getTotalLength(). */ class IteratableValidator { public: virtual ~IteratableValidator() {} virtual void init() = 0; virtual void validateChunk() = 0; virtual bool finished() const = 0; virtual off_t getCurrentOffset() const = 0; virtual uint64_t getTotalLength() const = 0; }; typedef SharedHandle IteratableValidatorHandle; } // namespace aria2 #endif // D_ITERATABLE_VALIDATOR_H