security: Add helpers for Command Interest
refs: #1238
Change-Id: I5a42f888b83bcc6dc51ea02045e438a4905ed145
diff --git a/src/helper/command-interest-generator.hpp b/src/helper/command-interest-generator.hpp
new file mode 100644
index 0000000..70208f2
--- /dev/null
+++ b/src/helper/command-interest-generator.hpp
@@ -0,0 +1,40 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/**
+ * Copyright (C) 2013 Regents of the University of California.
+ * See COPYING for copyright and distribution information.
+ */
+
+#ifndef NDN_COMMAND_INTEREST_GENERATOR_HPP
+#define NDN_COMMAND_INTEREST_GENERATOR_HPP
+
+#include "../interest.hpp"
+#include "../security/key-chain.hpp"
+
+
+namespace ndn
+{
+
+class CommandInterestGenerator
+{
+public:
+ static const Name DEFAULT_CERTIFICATE_NAME;
+
+ CommandInterestGenerator();
+
+ virtual
+ ~CommandInterestGenerator() {}
+
+ void
+ generate(Interest& interest, const Name& certificateName = DEFAULT_CERTIFICATE_NAME);
+
+ void
+ generateWithIdentity(Interest& interest, const Name& identity);
+
+private:
+ int64_t m_lastTimestamp;
+ KeyChain m_keyChain;
+};
+
+}//ndn
+
+#endif