Files
NFD/daemon/mgmt/status-server.hpp
T
Junxiao Shi 88d6937685 mgmt: StatusServer uses ndn::nfd::ForwarderStatus
refs #1422

Change-Id: Iea201b62391ecb2e4376ad85c5dcfefed4500515
2014-03-28 12:47:51 -07:00

41 lines
885 B
C++

/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (C) 2014 Named Data Networking Project
* See COPYING for copyright and distribution information.
*/
#ifndef NFD_MGMT_STATUS_SERVER_HPP
#define NFD_MGMT_STATUS_SERVER_HPP
#include "mgmt/app-face.hpp"
#include <ndn-cpp-dev/management/nfd-forwarder-status.hpp>
namespace nfd {
class Forwarder;
class StatusServer : noncopyable
{
public:
StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder);
private:
void
onInterest(const Interest& interest) const;
shared_ptr<ndn::nfd::ForwarderStatus>
collectStatus() const;
private:
static const Name DATASET_PREFIX;
static const time::milliseconds RESPONSE_FRESHNESS;
shared_ptr<AppFace> m_face;
Forwarder& m_forwarder;
time::system_clock::TimePoint m_startTimestamp;
};
} // namespace nfd
#endif // NFD_MGMT_STATUS_SERVER_HPP