All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sec-rule-specific.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
8 #ifndef NDN_SECURITY_SEC_RULE_SPECIFIC_H
9 #define NDN_SECURITY_SEC_RULE_SPECIFIC_H
10 
11 #include "../common.hpp"
12 #include "sec-rule.hpp"
13 #include "../util/regex.hpp"
14 
15 namespace ndn {
16 
17 class SecRuleSpecific : public SecRule
18 {
19 
20 public:
21  SecRuleSpecific(shared_ptr<Regex> dataRegex,
22  shared_ptr<Regex> signerRegex);
23 
24  SecRuleSpecific(const SecRuleSpecific& rule);
25 
26  virtual
28 
29  bool
30  matchDataName(const Data& data);
31 
32  bool
33  matchSignerName(const Data& data);
34 
35  bool
36  satisfy(const Data& data);
37 
38  bool
39  satisfy(const Name& dataName, const Name& signerName);
40 
41 private:
42  shared_ptr<Regex> m_dataRegex;
43  shared_ptr<Regex> m_signerRegex;
44 };
45 
46 } // namespace ndn
47 
48 #endif //NDN_SECURITY_SEC_RULE_SPECIFIC_H
bool matchDataName(const Data &data)
bool matchSignerName(const Data &data)
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:26
SecRuleSpecific(shared_ptr< Regex > dataRegex, shared_ptr< Regex > signerRegex)
bool satisfy(const Data &data)