mgmt+core: Moving SegmentPublisher to core/ and removing KeyChain from nfd::AppFace
This change ensures interface uniformity between nfd::AppFace and
ndn::Face and allow now templated version of SegmentPublisher to be used
with either.
Change-Id: I82e29528b13b37bd2ae27ef47db30e8c87c15a38
Refs: #1749
diff --git a/daemon/mgmt/status-server.cpp b/daemon/mgmt/status-server.cpp
index 51faca4..8861b9a 100644
--- a/daemon/mgmt/status-server.cpp
+++ b/daemon/mgmt/status-server.cpp
@@ -32,10 +32,11 @@
const Name StatusServer::DATASET_PREFIX = "ndn:/localhost/nfd/status";
const time::milliseconds StatusServer::RESPONSE_FRESHNESS = time::milliseconds(5000);
-StatusServer::StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder)
+StatusServer::StatusServer(shared_ptr<AppFace> face, Forwarder& forwarder, ndn::KeyChain& keyChain)
: m_face(face)
, m_forwarder(forwarder)
, m_startTimestamp(time::system_clock::now())
+ , m_keyChain(keyChain)
{
m_face->setInterestFilter(DATASET_PREFIX, bind(&StatusServer::onInterest, this, _2));
}
@@ -53,7 +54,7 @@
shared_ptr<ndn::nfd::ForwarderStatus> status = this->collectStatus();
data->setContent(status->wireEncode());
- m_face->sign(*data);
+ m_keyChain.sign(*data);
m_face->put(*data);
}