core: slim down `common.hpp`

Change-Id: I875c35147edd2261fbaa24e809c170d5cd9b94d3
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 688867f..0070a3e 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -43,7 +43,8 @@
     NDN_THROW(std::invalid_argument("AccessStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument("AccessStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("AccessStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
index 194c9ca..324fea8 100644
--- a/daemon/fw/access-strategy.hpp
+++ b/daemon/fw/access-strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -80,7 +80,7 @@
     }
 
   public:
-    scheduler::ScopedEventId rtoTimer;
+    ndn::scheduler::ScopedEventId rtoTimer;
   };
 
   /** \brief StrategyInfo in measurements table.
diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index df1f4ff..957e3a0 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -29,7 +29,7 @@
 namespace nfd::fw::asf {
 
 time::nanoseconds
-FaceInfo::scheduleTimeout(const Name& interestName, scheduler::EventCallback cb)
+FaceInfo::scheduleTimeout(const Name& interestName, ndn::scheduler::EventCallback cb)
 {
   BOOST_ASSERT(!m_timeoutEvent);
   m_lastInterestName = interestName;
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index bfed7ca..4883315 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -53,7 +53,7 @@
   }
 
   time::nanoseconds
-  scheduleTimeout(const Name& interestName, scheduler::EventCallback cb);
+  scheduleTimeout(const Name& interestName, ndn::scheduler::EventCallback cb);
 
   void
   cancelTimeout(const Name& prefix);
@@ -113,11 +113,11 @@
   size_t m_nTimeouts = 0;
 
   // Timeout associated with measurement
-  scheduler::ScopedEventId m_measurementExpiration;
+  ndn::scheduler::ScopedEventId m_measurementExpiration;
   friend class NamespaceInfo;
 
   // RTO associated with Interest
-  scheduler::ScopedEventId m_timeoutEvent;
+  ndn::scheduler::ScopedEventId m_timeoutEvent;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index 25e0ac3..fb07db2 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -172,7 +172,7 @@
   }
   else {
     NDN_THROW(std::invalid_argument("Probing interval must be >= " +
-                                    to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
+                                    std::to_string(MIN_PROBING_INTERVAL.count()) + " milliseconds"));
   }
 }
 
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index 8ff31a2..7695095 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -39,8 +39,8 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument(
-      "AsfStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("AsfStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
 
   StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index a275b3a..45935b1 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,8 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument(
-      "BestRouteStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("BestRouteStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
 
   StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index b19530d..dd61ca8 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2022,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,8 @@
 #include <boost/range/adaptor/indirected.hpp>
 #include <boost/range/adaptor/map.hpp>
 
+#include <map>
+
 namespace nfd {
 
 /**
diff --git a/daemon/fw/multicast-strategy.cpp b/daemon/fw/multicast-strategy.cpp
index 678f52a..08eda9a 100644
--- a/daemon/fw/multicast-strategy.cpp
+++ b/daemon/fw/multicast-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -38,8 +38,8 @@
 {
   ParsedInstanceName parsed = parseInstanceName(name);
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument(
-      "MulticastStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("MulticastStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
 
   StrategyParameters params = parseParameters(parsed.parameters);
diff --git a/daemon/fw/random-strategy.cpp b/daemon/fw/random-strategy.cpp
index a7ba224..1cda978 100644
--- a/daemon/fw/random-strategy.cpp
+++ b/daemon/fw/random-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -42,8 +42,8 @@
     NDN_THROW(std::invalid_argument("RandomStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument(
-      "RandomStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("RandomStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
diff --git a/daemon/fw/self-learning-strategy.cpp b/daemon/fw/self-learning-strategy.cpp
index acf1f22..7cb14c4 100644
--- a/daemon/fw/self-learning-strategy.cpp
+++ b/daemon/fw/self-learning-strategy.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -52,8 +52,8 @@
     NDN_THROW(std::invalid_argument("SelfLearningStrategy does not accept parameters"));
   }
   if (parsed.version && *parsed.version != getStrategyName()[-1].toVersion()) {
-    NDN_THROW(std::invalid_argument(
-      "SelfLearningStrategy does not support version " + to_string(*parsed.version)));
+    NDN_THROW(std::invalid_argument("SelfLearningStrategy does not support version " +
+                                    std::to_string(*parsed.version)));
   }
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 }
diff --git a/daemon/fw/strategy.hpp b/daemon/fw/strategy.hpp
index 5e99d6a..460fbdc 100644
--- a/daemon/fw/strategy.hpp
+++ b/daemon/fw/strategy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -31,6 +31,10 @@
 
 #include <boost/lexical_cast/try_lexical_convert.hpp>
 
+#include <functional>
+#include <map>
+#include <set>
+
 namespace nfd::fw {
 
 class StrategyParameters;
diff --git a/daemon/fw/unsolicited-data-policy.hpp b/daemon/fw/unsolicited-data-policy.hpp
index ec9984b..fe113b5 100644
--- a/daemon/fw/unsolicited-data-policy.hpp
+++ b/daemon/fw/unsolicited-data-policy.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2023,  Regents of the University of California,
+ * Copyright (c) 2014-2024,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,10 @@
 
 #include "face/face.hpp"
 
+#include <functional>
+#include <map>
+#include <set>
+
 namespace nfd::fw {
 
 /**