channel-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_CHANNEL_MODULE_HPP
27 #define NFD_TOOLS_NFDC_CHANNEL_MODULE_HPP
28 
29 #include "module.hpp"
30 
31 namespace nfd {
32 namespace tools {
33 namespace nfdc {
34 
35 using ndn::nfd::ChannelStatus;
36 
40 class ChannelModule : public Module, noncopyable
41 {
42 public:
43  virtual void
44  fetchStatus(Controller& controller,
45  const function<void()>& onSuccess,
46  const Controller::DatasetFailCallback& onFailure,
47  const CommandOptions& options) override;
48 
49  virtual void
50  formatStatusXml(std::ostream& os) const override;
51 
56  void
57  formatItemXml(std::ostream& os, const ChannelStatus& item) const;
58 
59  virtual void
60  formatStatusText(std::ostream& os) const override;
61 
66  void
67  formatItemText(std::ostream& os, const ChannelStatus& item) const;
68 
69 private:
70  std::vector<ChannelStatus> m_status;
71 };
72 
73 } // namespace nfdc
74 } // namespace tools
75 } // namespace nfd
76 
77 #endif // NFD_TOOLS_NFDC_CHANNEL_MODULE_HPP
void formatItemText(std::ostream &os, const ChannelStatus &item) const
format a single status item as text
void formatItemXml(std::ostream &os, const ChannelStatus &item) const
format a single status item as XML
virtual void formatStatusText(std::ostream &os) const override
format collected status as text
virtual void fetchStatus(Controller &controller, const function< void()> &onSuccess, const Controller::DatasetFailCallback &onFailure, const CommandOptions &options) override
collect status from NFD
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 override
format collected status as XML
provides access to NFD channel dataset
provides access to an NFD management module
Definition: module.hpp:43