From 079d2844ecde061d45c6884aa0ffee7fdc05de63 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 20 May 2007 13:57:56 +0000 Subject: New files --- src/CheckIntegrityCommand.h | 71 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 src/CheckIntegrityCommand.h (limited to 'src/CheckIntegrityCommand.h') diff --git a/src/CheckIntegrityCommand.h b/src/CheckIntegrityCommand.h new file mode 100644 index 00000000..88f19eb6 --- /dev/null +++ b/src/CheckIntegrityCommand.h @@ -0,0 +1,71 @@ +/* */ +#ifndef _D_CHECK_INTEGRITY_COMMAND_H_ +#define _D_CHECK_INTEGRITY_COMMAND_H_ + +#include "Command.h" +#include "Request.h" +#include "RequestGroup.h" +#include "DownloadEngine.h" +#include "IteratableChunkChecksumValidator.h" + +class CheckIntegrityCommand : public Command { +private: + RequestHandle _req; + RequestGroup* _requestGroup; + DownloadEngine* _e; + IteratableChunkChecksumValidatorHandle _validator; +public: + CheckIntegrityCommand(int cuid, const RequestHandle& req, RequestGroup* requestGroup, DownloadEngine* e): + Command(cuid), + _req(req), + _requestGroup(requestGroup), + _e(e), + _validator(0) + { + ++_requestGroup->numConnection; + } + + virtual ~CheckIntegrityCommand() + { + --_requestGroup->numConnection; + } + + void initValidator(); + + virtual bool execute(); +}; + +#endif // _D_CHECK_INTEGRITY_COMMAND_H_ -- cgit