Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 6 | * See COPYING for copyright and distribution information. |
| 7 | */ |
| 8 | |
| 9 | #ifndef NDN_VALIDATOR_NULL_HPP |
| 10 | #define NDN_VALIDATOR_NULL_HPP |
| 11 | |
| 12 | #include "validator.hpp" |
| 13 | |
| 14 | namespace ndn { |
| 15 | |
| 16 | class ValidatorNull : public Validator { |
Yingdi Yu | 9a33535 | 2014-01-31 11:57:46 -0800 | [diff] [blame^] | 17 | public: |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 18 | virtual |
| 19 | ~ValidatorNull() |
| 20 | {} |
Yingdi Yu | 9a33535 | 2014-01-31 11:57:46 -0800 | [diff] [blame^] | 21 | |
| 22 | protected: |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 23 | virtual void |
Yingdi Yu | 9a33535 | 2014-01-31 11:57:46 -0800 | [diff] [blame^] | 24 | checkPolicy (const shared_ptr<const Data>& data, |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 25 | int stepCount, |
| 26 | const OnDataValidated &onValidated, |
| 27 | const OnDataValidationFailed &onValidationFailed, |
| 28 | std::vector<shared_ptr<ValidationRequest> > &nextSteps) |
| 29 | { onValidated(data); } |
Yingdi Yu | 9a33535 | 2014-01-31 11:57:46 -0800 | [diff] [blame^] | 30 | |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 31 | virtual void |
Yingdi Yu | 9a33535 | 2014-01-31 11:57:46 -0800 | [diff] [blame^] | 32 | checkPolicy (const shared_ptr<const Interest>& interest, |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 33 | int stepCount, |
| 34 | const OnInterestValidated &onValidated, |
| 35 | const OnInterestValidationFailed &onValidationFailed, |
| 36 | std::vector<shared_ptr<ValidationRequest> > &nextSteps) |
| 37 | { onValidated(interest); } |
| 38 | }; |
| 39 | |
| 40 | } |
| 41 | |
| 42 | #endif |