nfd::tools::nfdc::CsModule Class Reference

provides access to NFD CS management More...

#include <tools/nfdc/cs-module.hpp>

+ Inheritance diagram for nfd::tools::nfdc::CsModule:
+ Collaboration diagram for nfd::tools::nfdc::CsModule:

Public Member Functions

void fetchStatus (Controller &controller, const std::function< void()> &onSuccess, const Controller::DatasetFailCallback &onFailure, const CommandOptions &options) override
 collect status from NFD More...
 
void formatStatusText (std::ostream &os) const override
 format collected status as text More...
 
void formatStatusXml (std::ostream &os) const override
 format collected status as XML More...
 

Static Public Member Functions

static void config (ExecuteContext &ctx)
 the 'cs config' command More...
 
static void erase (ExecuteContext &ctx)
 the 'cs erase' command More...
 
static void formatItemText (std::ostream &os, const CsInfo &item)
 
static void formatItemXml (std::ostream &os, const CsInfo &item)
 
static void registerCommands (CommandParser &parser)
 register 'cs config' command More...
 

Detailed Description

provides access to NFD CS management

See also
https://redmine.named-data.net/projects/nfd/wiki/CsMgmt

Definition at line 41 of file cs-module.hpp.

Member Function Documentation

void nfd::tools::nfdc::CsModule::config ( ExecuteContext ctx)
static

the 'cs config' command

Definition at line 55 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::erase ( ExecuteContext ctx)
static

the 'cs erase' command

Definition at line 90 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::fetchStatus ( Controller &  controller,
const std::function< void()> &  onSuccess,
const Controller::DatasetFailCallback &  onFailure,
const CommandOptions &  options 
)
overridevirtual

collect status from NFD

Precondition
no other fetchStatus is in progress
Parameters
controllera controller through which StatusDataset can be requested
onSuccessinvoked when status has been collected into this instance
onFailurepassed to controller.fetch
optionspassed to controller.fetch

Implements nfd::tools::nfdc::Module.

Definition at line 118 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::formatItemText ( std::ostream &  os,
const CsInfo &  item 
)
static

Definition at line 159 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::formatItemXml ( std::ostream &  os,
const CsInfo &  item 
)
static

Definition at line 138 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::formatStatusText ( std::ostream &  os) const
overridevirtual

format collected status as text

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 151 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::formatStatusXml ( std::ostream &  os) const
overridevirtual

format collected status as XML

Precondition
fetchStatus has been successful
Parameters
osoutput stream

Implements nfd::tools::nfdc::Module.

Definition at line 132 of file cs-module.cpp.

void nfd::tools::nfdc::CsModule::registerCommands ( CommandParser parser)
static

register 'cs config' command

Definition at line 36 of file cs-module.cpp.