blob: 1802018f1e730ca858efbaaf65fcb6ca8c591a33 [file] [log] [blame]
Steve DiBenedetto042bfe92014-01-30 15:05:08 -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#include "manager-base.hpp"
8#include "mgmt/app-face.hpp"
9
10#include <ndn-cpp-dev/management/control-response.hpp>
11
12namespace nfd {
13
14ManagerBase::ManagerBase(shared_ptr<AppFace> face)
15 : m_face(face)
16{
17
18}
19
20ManagerBase::~ManagerBase()
21{
22
23}
24
25void
26ManagerBase::sendResponse(const Name& name,
27 uint32_t code,
28 const std::string& text)
29{
30 Data response(name);
31
32 response.setContent(ndn::ControlResponse(code, text).wireEncode());
33 m_face->put(response);
34}
35
36
37} // namespace nfd