mgmt: Dispatcher

Change-Id: I92b3dc9daae75abac9d791632b6a0bec111b4573
refs: #2107
diff --git a/src/management/nfd-control-response.hpp b/src/management/nfd-control-response.hpp
index 42ffd3d..83ba11d 100644
--- a/src/management/nfd-control-response.hpp
+++ b/src/management/nfd-control-response.hpp
@@ -22,112 +22,12 @@
 #ifndef NDN_MANAGEMENT_CONTROL_RESPONSE_HPP
 #define NDN_MANAGEMENT_CONTROL_RESPONSE_HPP
 
-#include "../encoding/block.hpp"
+#include "../mgmt/dispatcher.hpp"
 
 namespace ndn {
 namespace nfd {
 
-/**
- * @ingroup management
- * @brief Class defining abstraction of ControlResponse for NFD Control Protocol
- *
- * @see http://redmine.named-data.net/projects/nfd/wiki/ControlCommand#Response-format
- * @detail This type is copyable because it's an abstraction of a TLV type.
- */
-class ControlResponse
-{
-public:
-  class Error : public tlv::Error
-  {
-  public:
-    explicit
-    Error(const std::string& what)
-      : tlv::Error(what)
-    {
-    }
-  };
-
-  ControlResponse();
-
-  ControlResponse(uint32_t code, const std::string& text);
-
-  explicit
-  ControlResponse(const Block& block);
-
-  uint32_t
-  getCode() const;
-
-  void
-  setCode(uint32_t code);
-
-  const std::string&
-  getText() const;
-
-  void
-  setText(const std::string& text);
-
-  const Block&
-  getBody() const;
-
-  void
-  setBody(const Block& body);
-
-  const Block&
-  wireEncode() const;
-
-  void
-  wireDecode(const Block& block);
-
-protected:
-  uint32_t m_code;
-  std::string m_text;
-  Block m_body;
-
-  mutable Block m_wire;
-};
-
-inline uint32_t
-ControlResponse::getCode() const
-{
-  return m_code;
-}
-
-inline void
-ControlResponse::setCode(uint32_t code)
-{
-  m_code = code;
-  m_wire.reset();
-}
-
-inline const std::string&
-ControlResponse::getText() const
-{
-  return m_text;
-}
-
-inline void
-ControlResponse::setText(const std::string& text)
-{
-  m_text = text;
-  m_wire.reset();
-}
-
-inline const Block&
-ControlResponse::getBody() const
-{
-  return m_body;
-}
-
-inline void
-ControlResponse::setBody(const Block& body)
-{
-  m_body = body;
-  m_body.encode(); // will do nothing if already encoded
-  m_wire.reset();
-}
-
-std::ostream&
-operator<<(std::ostream& os, const ControlResponse& response);
+typedef ndn::mgmt::ControlResponse ControlResponse;
 
 } // namespace nfd
 } // namespace ndn