blob: 1bb6d019b3f53be1e9da69284a3a0bd8689589b3 [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
Alexander Afanasyev2a7f7202014-04-23 14:25:29 -070016class ValidatorNull : public Validator
17{
Yingdi Yu9a335352014-01-31 11:57:46 -080018public:
Yingdi Yu6ac97982014-01-30 14:49:21 -080019 virtual
20 ~ValidatorNull()
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070021 {
22 }
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070023
Yingdi Yu9a335352014-01-31 11:57:46 -080024protected:
Yingdi Yu6ac97982014-01-30 14:49:21 -080025 virtual void
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070026 checkPolicy(const Data& data,
27 int nSteps,
28 const OnDataValidated& onValidated,
29 const OnDataValidationFailed& onValidationFailed,
30 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
31 {
32 onValidated(data.shared_from_this());
33 }
Alexander Afanasyevfdbfc6d2014-04-14 15:12:11 -070034
Yingdi Yu6ac97982014-01-30 14:49:21 -080035 virtual void
Yingdi Yu4b8c6a22014-04-15 23:00:54 -070036 checkPolicy(const Interest& interest,
37 int nSteps,
38 const OnInterestValidated& onValidated,
39 const OnInterestValidationFailed& onValidationFailed,
40 std::vector<shared_ptr<ValidationRequest> >& nextSteps)
41 {
42 onValidated(interest.shared_from_this());
43 }
Yingdi Yu6ac97982014-01-30 14:49:21 -080044};
45
Yingdi Yufc40d872014-02-18 12:56:04 -080046} // namespace ndn
Yingdi Yu6ac97982014-01-30 14:49:21 -080047
Yingdi Yufc40d872014-02-18 12:56:04 -080048#endif //NDN_SECURITY_VALIDATOR_NULL_HPP