tools: nfdc creates Face and KeyChain in main function
refs #3749
Change-Id: I169ad766634371b0192ebae640355298b78aaaa4
diff --git a/tools/nfdc/legacy-nfdc.hpp b/tools/nfdc/legacy-nfdc.hpp
index 1c3772b..9acb228 100644
--- a/tools/nfdc/legacy-nfdc.hpp
+++ b/tools/nfdc/legacy-nfdc.hpp
@@ -26,9 +26,7 @@
#ifndef NFD_TOOLS_NFDC_LEGACY_NFDC_HPP
#define NFD_TOOLS_NFDC_LEGACY_NFDC_HPP
-#include "core/common.hpp"
-#include <ndn-cxx/face.hpp>
-#include <ndn-cxx/security/key-chain.hpp>
+#include "execute-command.hpp"
#include <ndn-cxx/mgmt/nfd/controller.hpp>
namespace nfd {
@@ -51,8 +49,7 @@
}
};
- explicit
- LegacyNfdc(ndn::Face& face);
+ LegacyNfdc(Face& face, KeyChain& keyChain);
bool
dispatch(const std::string& cmd);
@@ -169,8 +166,7 @@
ndn::nfd::FacePersistency m_facePersistency;
private:
- ndn::KeyChain m_keyChain;
- ndn::Face& m_face;
+ Face& m_face;
ndn::nfd::Controller m_controller;
};
@@ -178,7 +174,7 @@
legacyNfdcUsage();
int
-legacyNfdcMain(const std::string& subcommand, const std::vector<std::string>& args);
+legacyNfdcMain(ExecuteContext& ctx);
} // namespace nfdc
} // namespace tools