blob: c9a14f5ecd7407acd202aead6cbe5b71ae849264 [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;
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070031 static const time::milliseconds RESPONSE_FRESHNESS;
Junxiao Shiea48d8b2014-03-16 13:53:47 -070032
33 shared_ptr<AppFace> m_face;
34 Forwarder& m_forwarder;
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070035 time::system_clock::TimePoint m_startTimestamp;
Junxiao Shiea48d8b2014-03-16 13:53:47 -070036};
37
38} // namespace nfd
39
40#endif // NFD_MGMT_STATUS_SERVER_HPP