/* */ #ifndef D_CHECK_INTEGRITY_ENTRY_H #define D_CHECK_INTEGRITY_ENTRY_H #include "RequestGroupEntry.h" #include #include "SharedHandle.h" #include "ProgressAwareEntry.h" namespace aria2 { class IteratableValidator; class DownloadEngine; class FileAllocationEntry; class CheckIntegrityEntry : public RequestGroupEntry, public ProgressAwareEntry { private: SharedHandle validator_; protected: void setValidator(const SharedHandle& validator); void proceedFileAllocation(std::vector& commands, const SharedHandle& entry, DownloadEngine* e); public: CheckIntegrityEntry(RequestGroup* requestGroup, Command* nextCommand = 0); virtual ~CheckIntegrityEntry(); virtual int64_t getTotalLength(); virtual int64_t getCurrentLength(); virtual void validateChunk(); virtual bool finished(); virtual bool isValidationReady() = 0; virtual void initValidator() = 0; virtual void onDownloadFinished(std::vector& commands, DownloadEngine* e) = 0; virtual void onDownloadIncomplete(std::vector& commands, DownloadEngine* e) = 0; void cutTrailingGarbage(); }; } // namespace aria2 #endif // D_CHECK_INTEGRITY_ENTRY_H