blob: 27dc63d0cf2629f23995dd015b5d61b2de202ecf [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
9#ifndef NDN_VALIDATOR_NULL_HPP
10#define NDN_VALIDATOR_NULL_HPP
11
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 {}
Yingdi Yu9a335352014-01-31 11:57:46 -080021
22protected:
Yingdi Yu6ac97982014-01-30 14:49:21 -080023 virtual void
Yingdi Yu9a335352014-01-31 11:57:46 -080024 checkPolicy (const shared_ptr<const Data>& data,
Yingdi Yu6ac97982014-01-30 14:49:21 -080025 int stepCount,
26 const OnDataValidated &onValidated,
27 const OnDataValidationFailed &onValidationFailed,
28 std::vector<shared_ptr<ValidationRequest> > &nextSteps)
29 { onValidated(data); }
Yingdi Yu9a335352014-01-31 11:57:46 -080030
Yingdi Yu6ac97982014-01-30 14:49:21 -080031 virtual void
Yingdi Yu9a335352014-01-31 11:57:46 -080032 checkPolicy (const shared_ptr<const Interest>& interest,
Yingdi Yu6ac97982014-01-30 14:49:21 -080033 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