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 | |
Yingdi Yu | fc40d87 | 2014-02-18 12:56:04 -0800 | [diff] [blame^] | 9 | #ifndef NDN_SECURITY_VALIDATOR_NULL_HPP |
| 10 | #define NDN_SECURITY_VALIDATOR_NULL_HPP |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 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 |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 24 | checkPolicy (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) |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 29 | { onValidated(data.shared_from_this()); } |
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 |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 32 | checkPolicy (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) |
Alexander Afanasyev | 0222fba | 2014-02-09 23:16:02 -0800 | [diff] [blame] | 37 | { onValidated(interest.shared_from_this()); } |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 38 | }; |
| 39 | |
Yingdi Yu | fc40d87 | 2014-02-18 12:56:04 -0800 | [diff] [blame^] | 40 | } // namespace ndn |
Yingdi Yu | 6ac9798 | 2014-01-30 14:49:21 -0800 | [diff] [blame] | 41 | |
Yingdi Yu | fc40d87 | 2014-02-18 12:56:04 -0800 | [diff] [blame^] | 42 | #endif //NDN_SECURITY_VALIDATOR_NULL_HPP |