34 NDN_THROW(
Error(
"Cannot start a stage when it's in progress"));
36 m_isInProgress =
true;
38 std::cerr <<
"Starting " << this->
getName() <<
" stage" << std::endl;
50 this->
fail(
"Cannot parse FaceUri: " + s);
57 std::cerr <<
"Stage " << this->
getName() <<
" succeeded with " << hubFaceUri << std::endl;
59 m_isInProgress =
false;
65 std::cerr <<
"Stage " << this->
getName() <<
" failed: " << msg << std::endl;
67 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)