Add ChatPolicyRule
diff --git a/src/chat-policy-rule.h b/src/chat-policy-rule.h
new file mode 100644
index 0000000..dfb434d
--- /dev/null
+++ b/src/chat-policy-rule.h
@@ -0,0 +1,47 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ * Yingdi Yu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
+#ifndef CHAT_POLICY_RULE_H
+#define CHAT_POLICY_RULE_H
+
+#include <ndn.cxx/security/policy/policy-rule.h>
+
+class ChatPolicyRule : public ndn::security::PolicyRule
+{
+
+public:
+ ChatPolicyRule();
+
+ virtual
+ ~ChatPolicyRyle() {};
+
+ bool
+ matchDataName(const Data & data);
+
+ bool
+ matchSignerName(const Data & data);
+
+ bool
+ satisfy(const Data & data);
+
+ bool
+ satisfy(const Name & dataName, const Name & signerName);
+
+ TiXmlElement *
+ toXmlElement();
+
+private:
+ ndn::Ptr<ndn::Regex> m_dataRegex;
+ ndn::Ptr<ndn::Regex> m_signerRegex;
+ ndn::Name m_dataRef;
+ ndn::Name m_signerRef;
+};
+
+#endif //CHAT_POLICY_RULE_H