module.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_TOOLS_NFDC_MODULE_HPP
27 #define NFD_TOOLS_NFDC_MODULE_HPP
28 
29 #include "core/common.hpp"
30 #include <ndn-cxx/mgmt/nfd/controller.hpp>
31 
32 namespace nfd {
33 namespace tools {
34 namespace nfdc {
35 
36 using ndn::nfd::Controller;
37 using ndn::nfd::CommandOptions;
38 
42 class Module
43 {
44 public:
45  virtual
46  ~Module() = default;
47 
55  virtual void
56  fetchStatus(Controller& controller,
57  const function<void()>& onSuccess,
58  const Controller::DatasetFailCallback& onFailure,
59  const CommandOptions& options) = 0;
60 
65  virtual void
66  formatStatusXml(std::ostream& os) const = 0;
67 
72  virtual void
73  formatStatusText(std::ostream& os) const = 0;
74 };
75 
76 } // namespace nfdc
77 } // namespace tools
78 } // namespace nfd
79 
80 #endif // NFD_TOOLS_NFDC_MODULE_HPP
virtual void formatStatusText(std::ostream &os) const =0
format collected status as text
virtual void fetchStatus(Controller &controller, const function< void()> &onSuccess, const Controller::DatasetFailCallback &onFailure, const CommandOptions &options)=0
collect status from NFD
virtual ~Module()=default
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
virtual void formatStatusXml(std::ostream &os) const =0
format collected status as XML
provides access to an NFD management module
Definition: module.hpp:42