26 #ifndef NFD_TOOLS_NDN_AUTOCONFIG_STAGE_HPP
27 #define NFD_TOOLS_NDN_AUTOCONFIG_STAGE_HPP
29 #include <ndn-cxx/net/face-uri.hpp>
30 #include <ndn-cxx/util/signal.hpp>
39 class Stage : boost::noncopyable
42 class Error :
public std::runtime_error
45 using std::runtime_error::runtime_error;
54 virtual const std::string&
70 succeed(
const FaceUri& hubFaceUri);
73 fail(
const std::string& msg);
95 bool m_isInProgress =
false;
void start()
Start running this stage.
void provideHubFaceUri(const std::string &s)
Parse HUB FaceUri from string and declare success.
signal::Signal< Stage, FaceUri > onSuccess
Signal emitted when a HUB FaceUri is found.
virtual const std::string & getName() const =0
Get stage name.
signal::Signal< Stage, std::string > onFailure
Signal emitted when discovery fails.
void succeed(const FaceUri &hubFaceUri)
void fail(const std::string &msg)