/* */ #ifndef _D_BT_ALLOWED_FAST_MESSAGE_VALIDATOR_H_ #define _D_BT_ALLOWED_FAST_MESSAGE_VALIDATOR_H_ #include "BtMessageValidator.h" #include "BtAllowedFastMessage.h" #include "PeerMessageUtil.h" namespace aria2 { class BtAllowedFastMessageValidator : public BtMessageValidator { private: const BtAllowedFastMessage* message; int32_t numPiece; public: BtAllowedFastMessageValidator(const BtAllowedFastMessage* message, int32_t numPiece): message(message), numPiece(numPiece) {} virtual bool validate(Errors& error) { // TODO PeerMessageUtil::checkIndex(message->getIndex(), numPiece); return true; } }; typedef SharedHandle BtAllowedFastMessageValidatorHandle; } // namespace aria2 #endif // _D_BT_ALLOWED_FAST_MESSAGE_VALIDATOR_H_