mgmt: encode/decode CS Information Dataset

refs #4219

Change-Id: Ia51b455fc9b16f8f3c468de2847ced6d73a87bdc
diff --git a/src/mgmt/nfd/status-dataset.hpp b/src/mgmt/nfd/status-dataset.hpp
index f3d2c5e..f7f7917 100644
--- a/src/mgmt/nfd/status-dataset.hpp
+++ b/src/mgmt/nfd/status-dataset.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -28,6 +28,7 @@
 #include "face-query-filter.hpp"
 #include "channel-status.hpp"
 #include "fib-entry.hpp"
+#include "cs-info.hpp"
 #include "strategy-choice.hpp"
 #include "rib-entry.hpp"
 
@@ -50,7 +51,7 @@
    * \brief if defined, specifies constructor argument type;
    *        otherwise, constructor has no argument
    */
-  typedef int ParamType;
+  using ParamType = int;
 #endif
 
   /**
@@ -65,7 +66,7 @@
   /**
    * \brief provides the result type, usually a vector
    */
-  typedef std::vector<int> ResultType;
+  using ResultType = std::vector<int>;
 #endif
 
   /**
@@ -111,7 +112,6 @@
   PartialName m_datasetName;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a status/general dataset
@@ -122,13 +122,12 @@
 public:
   ForwarderGeneralStatusDataset();
 
-  typedef ForwarderStatus ResultType;
+  using ResultType = ForwarderStatus;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief provides common functionality among FaceDataset and FaceQueryDataset
@@ -136,7 +135,7 @@
 class FaceDatasetBase : public StatusDataset
 {
 public:
-  typedef std::vector<FaceStatus> ResultType;
+  using ResultType = std::vector<FaceStatus>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
@@ -146,7 +145,6 @@
   FaceDatasetBase(const PartialName& datasetName);
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/list dataset
@@ -158,7 +156,6 @@
   FaceDataset();
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/query dataset
@@ -167,7 +164,7 @@
 class FaceQueryDataset : public FaceDatasetBase
 {
 public:
-  typedef FaceQueryFilter ParamType;
+  using ParamType = FaceQueryFilter;
 
   explicit
   FaceQueryDataset(const FaceQueryFilter& filter);
@@ -180,7 +177,6 @@
   FaceQueryFilter m_filter;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a faces/channels dataset
@@ -191,13 +187,12 @@
 public:
   ChannelDataset();
 
-  typedef std::vector<ChannelStatus> ResultType;
+  using ResultType = std::vector<ChannelStatus>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a fib/list dataset
@@ -208,12 +203,27 @@
 public:
   FibDataset();
 
-  typedef std::vector<FibEntry> ResultType;
+  using ResultType = std::vector<FibEntry>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
+/**
+ * \ingroup management
+ * \brief represents a cs/info dataset
+ * \sa https://redmine.named-data.net/projects/nfd/wiki/CsMgmt#CS-Information-Dataset
+ */
+class CsInfoDataset : public StatusDataset
+{
+public:
+  CsInfoDataset();
+
+  using ResultType = CsInfo;
+
+  ResultType
+  parseResult(ConstBufferPtr payload) const;
+};
 
 /**
  * \ingroup management
@@ -225,13 +235,12 @@
 public:
   StrategyChoiceDataset();
 
-  typedef std::vector<StrategyChoice> ResultType;
+  using ResultType = std::vector<StrategyChoice>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 /**
  * \ingroup management
  * \brief represents a rib/list dataset
@@ -242,13 +251,12 @@
 public:
   RibDataset();
 
-  typedef std::vector<RibEntry> ResultType;
+  using ResultType = std::vector<RibEntry>;
 
   ResultType
   parseResult(ConstBufferPtr payload) const;
 };
 
-
 } // namespace nfd
 } // namespace ndn