blob: f389d4c190f7f5be501bbb6c4cad6d1ef04bec29 [file] [log] [blame]
Yingdi Yu6ac97982014-01-30 14:49:21 -08001/* -*- 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 Yufc40d872014-02-18 12:56:04 -08009#ifndef NDN_SECURITY_VALIDATOR_NULL_HPP
10#define NDN_SECURITY_VALIDATOR_NULL_HPP
Yingdi Yu6ac97982014-01-30 14:49:21 -080011
12#include "validator.hpp"
13
14namespace ndn {
15
16class ValidatorNull : public Validator {
Yingdi Yu9a335352014-01-31 11:57:46 -080017public:
Yingdi Yu6ac97982014-01-30 14:49:21 -080018 virtual
19 ~ValidatorNull()
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070020 {
21 }
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070022
Yingdi Yu9a335352014-01-31 11:57:46 -080023protected:
Yingdi Yu6ac97982014-01-30 14:49:21 -080024 virtual void
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070025 checkPolicy(const Data& data,
26 int nSteps,
27 const OnDataValidated& onValidated,
28 const OnDataValidationFailed& onValidationFailed,
29 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
30 {
31 onValidated(data.shared_from_this());
32 }
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070033
Yingdi Yu6ac97982014-01-30 14:49:21 -080034 virtual void
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070035 checkPolicy(const Interest& interest,
36 int nSteps,
37 const OnInterestValidated& onValidated,
38 const OnInterestValidationFailed& onValidationFailed,
39 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
40 {
41 onValidated(interest.shared_from_this());
42 }
Yingdi Yu6ac97982014-01-30 14:49:21 -080043};
44
Yingdi Yufc40d872014-02-18 12:56:04 -080045} // namespace ndn
Yingdi Yu6ac97982014-01-30 14:49:21 -080046
Yingdi Yufc40d872014-02-18 12:56:04 -080047#endif //NDN_SECURITY_VALIDATOR_NULL_HPP