blob: 94c8e82a3907cb1727e0f34745fd9444b006065d [file] [log] [blame]
Junxiao Shiea48d8b2014-03-16 13:53:47 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_MGMT_STATUS_SERVER_HPP
8#define NFD_MGMT_STATUS_SERVER_HPP
9
10#include "mgmt/app-face.hpp"
11#include <ndn-cpp-dev/management/nfd-status.hpp>
12
13namespace nfd {
14
15class Forwarder;
16
17class StatusServer : noncopyable
18{
19public:
20 StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder);
21
22private:
23 void
24 onInterest(const Interest& interest) const;
25
26 shared_ptr<ndn::nfd::Status>
27 collectStatus() const;
28
29private:
30 static const Name DATASET_PREFIX;
31 static const ndn::Milliseconds RESPONSE_FRESHNESS;
32
33 shared_ptr<AppFace> m_face;
34 Forwarder& m_forwarder;
35 ndn::nfd::Status::Timestamp m_startTimestamp;
36};
37
38} // namespace nfd
39
40#endif // NFD_MGMT_STATUS_SERVER_HPP