tools: refactor ndn-autoconfig
Hub face creation and prefix registrations are moved into a new
Procedure class. Main function is simplified.
refs #4158
Change-Id: I15b660e3b8a1bde89498a1cb549a87788de46c7a
diff --git a/tools/ndn-autoconfig/ndn-fch-discovery.hpp b/tools/ndn-autoconfig/ndn-fch-discovery.hpp
index 2b8de07..000568d 100644
--- a/tools/ndn-autoconfig/ndn-fch-discovery.hpp
+++ b/tools/ndn-autoconfig/ndn-fch-discovery.hpp
@@ -43,12 +43,19 @@
/**
* @brief Create stage to discover NDN hub using NDN-FCH protocol
*/
- NdnFchDiscovery(Face& face, KeyChain& keyChain,
- const std::string& url,
- const NextStageCallback& nextStageOnFailure);
+ explicit
+ NdnFchDiscovery(const std::string& url);
+ const std::string&
+ getName() const override
+ {
+ static const std::string STAGE_NAME("NDN-FCH");
+ return STAGE_NAME;
+ }
+
+private:
void
- start() override;
+ doStart() override;
private:
std::string m_url;