blob: 4d7b56b7118a2fab9d37d61700466dc07db1008b [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()
20 {}
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070021
Yingdi Yu9a335352014-01-31 11:57:46 -080022protected:
Yingdi Yu6ac97982014-01-30 14:49:21 -080023 virtual void
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070024 checkPolicy (const Data& data,
25 int stepCount,
26 const OnDataValidated& onValidated,
27 const OnDataValidationFailed& onValidationFailed,
28 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
Alexander Afanasyev0222fba2014-02-09 23:16:02 -080029 { onValidated(data.shared_from_this()); }
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070030
Yingdi Yu6ac97982014-01-30 14:49:21 -080031 virtual void
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070032 checkPolicy (const Interest& interest,
33 int stepCount,
34 const OnInterestValidated& onValidated,
35 const OnInterestValidationFailed& onValidationFailed,
36 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
Alexander Afanasyev0222fba2014-02-09 23:16:02 -080037 { onValidated(interest.shared_from_this()); }
Yingdi Yu6ac97982014-01-30 14:49:21 -080038};
39
Yingdi Yufc40d872014-02-18 12:56:04 -080040} // namespace ndn
Yingdi Yu6ac97982014-01-30 14:49:21 -080041
Yingdi Yufc40d872014-02-18 12:56:04 -080042#endif //NDN_SECURITY_VALIDATOR_NULL_HPP