37 ndn::nfd::CommandOptions
40 return ndn::nfd::CommandOptions()
41 .setTimeout(time::duration_cast<time::milliseconds>(this->
getTimeout()));
44 ndn::nfd::CommandFailureCallback
47 return [=] (
const ControlResponse& resp) {
49 this->
err <<
"Error " << resp.getCode() <<
" when " << commandName <<
": " << resp.getText() <<
'\n';
53 ndn::nfd::DatasetFailureCallback
56 return [=] (uint32_t code,
const std::string& reason) {
58 this->
err <<
"Error " << code <<
" when fetching " << datasetName <<
": " << reason <<
'\n';
ndn::nfd::DatasetFailureCallback makeDatasetFailureHandler(const std::string &datasetName)
ndn::nfd::CommandFailureCallback makeCommandFailureHandler(const std::string &commandName)
int exitCode
program exit code
ndn::nfd::CommandOptions makeCommandOptions() const
std::ostream & err
error stream
ndn::time::nanoseconds getTimeout() const