blob: 21d00e67c5b68d5645ed5b29078698dcd4c1b4e1 [file] [log] [blame]
Yingdi Yu3715f8d2014-01-30 00:32:20 -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 * See COPYING for copyright and distribution information.
6 */
7
8#ifndef NDN_SEC_RULE_SPECIFIC_H
9#define NDN_SEC_RULE_SPECIFIC_H
10
11#include "sec-rule.hpp"
12#include "../util/regex.hpp"
13
14namespace ndn{
15
16class SecRuleSpecific : public ndn::SecRule
17{
18
19public:
20 SecRuleSpecific(ndn::shared_ptr<ndn::Regex> dataRegex,
21 ndn::shared_ptr<ndn::Regex> signerRegex);
22
23 SecRuleSpecific(const SecRuleSpecific& rule);
24
25 virtual
26 ~SecRuleSpecific() {};
27
28 bool
29 matchDataName(const ndn::Data& data);
30
31 bool
32 matchSignerName(const ndn::Data& data);
33
34 bool
35 satisfy(const ndn::Data& data);
36
37 bool
38 satisfy(const ndn::Name& dataName, const ndn::Name& signerName);
39
40private:
41 ndn::shared_ptr<ndn::Regex> m_dataRegex;
42 ndn::shared_ptr<ndn::Regex> m_signerRegex;
43};
44
45}
46
47#endif