mgmt: added FIB manager support for insert, delete, and remove-nexthop verbs

Refactor option decoding, verb authorization (placeholder),
and response sending into single location.
Added unit tests for ManagerBase.

refs: #1223

Change-Id: I731be586ee8f06defb00fcadc6010409560891a1
diff --git a/daemon/mgmt/fib-manager.hpp b/daemon/mgmt/fib-manager.hpp
index d77a2f2..3b36aeb 100644
--- a/daemon/mgmt/fib-manager.hpp
+++ b/daemon/mgmt/fib-manager.hpp
@@ -13,6 +13,9 @@
 #include "fw/strategy.hpp"
 #include "mgmt/manager-base.hpp"
 
+#include <ndn-cpp-dev/management/fib-management-options.hpp>
+#include <ndn-cpp-dev/management/control-response.hpp>
+
 namespace nfd {
 
 class Forwarder;
@@ -32,19 +35,28 @@
 private:
 
   void
-  fibInsert(const Interest& request);
+  insertEntry(const ndn::FibManagementOptions& options,
+                ndn::ControlResponse& response);
 
   void
-  fibDelete(const Interest& request);
+  deleteEntry(const ndn::FibManagementOptions& options,
+                ndn::ControlResponse& response);
 
   void
-  fibAddNextHop(const Interest& request);
+  addNextHop(const ndn::FibManagementOptions& options,
+               ndn::ControlResponse& response);
 
   void
-  fibRemoveNextHop(const Interest& request);
+  removeNextHop(const ndn::FibManagementOptions& options,
+                  ndn::ControlResponse& response);
 
   void
-  fibStrategy(const Interest& request);
+  strategy(const ndn::FibManagementOptions& options,
+             ndn::ControlResponse& response);
+
+  bool
+  extractOptions(const Interest& request,
+                   ndn::FibManagementOptions& extractedOptions);
 
   // void
   // onConfig(ConfigFile::Node section, bool isDryRun);
@@ -56,7 +68,8 @@
   std::map<Name, shared_ptr<fw::Strategy> > m_namespaceToStrategyMap;
 
   typedef function<void(FibManager*,
-                        const Interest&)> VerbProcessor;
+                          const ndn::FibManagementOptions&,
+                          ndn::ControlResponse&)> VerbProcessor;
 
   typedef std::map<Name::Component, VerbProcessor> VerbDispatchTable;