util: no-op NetworkMonitor on unsupported platforms

NetworkMonitor::getCapabilities() function reports what functions
and signals are supported on current platform.

refs #4025

Change-Id: I2c2825e0f9919a734fb78b4699a483c837ee09af
diff --git a/src/util/network-monitor.cpp b/src/util/network-monitor.cpp
index 6689711..62d63a1 100644
--- a/src/util/network-monitor.cpp
+++ b/src/util/network-monitor.cpp
@@ -30,34 +30,7 @@
 #elif defined(NDN_CXX_HAVE_RTNETLINK)
 #include "detail/network-monitor-impl-rtnl.hpp"
 #else
-
-namespace ndn {
-namespace util {
-
-class NetworkMonitor::Impl
-{
-public:
-  Impl(NetworkMonitor&, boost::asio::io_service&)
-  {
-    BOOST_THROW_EXCEPTION(Error("Network monitoring is not supported on this platform"));
-  }
-
-  shared_ptr<NetworkInterface>
-  getNetworkInterface(const std::string&) const
-  {
-    return {};
-  }
-
-  std::vector<shared_ptr<NetworkInterface>>
-  listNetworkInterfaces() const
-  {
-    return {};
-  }
-};
-
-} // namespace util
-} // namespace ndn
-
+#include "detail/network-monitor-impl-noop.hpp"
 #endif
 
 namespace ndn {
@@ -70,6 +43,12 @@
 
 NetworkMonitor::~NetworkMonitor() = default;
 
+uint32_t
+NetworkMonitor::getCapabilities() const
+{
+  return m_impl->getCapabilities();
+}
+
 shared_ptr<NetworkInterface>
 NetworkMonitor::getNetworkInterface(const std::string& ifname) const
 {