use FaceUri and NetworkMonitor from ndn-cxx/net
This commit also contains a quick fix in LpReliability to avoid
ndn::lp::Packet::wireEncode(EncodingEstimator&).
refs #3940, #4156
Change-Id: Ice8e3649be21dd023ed1f6562c185f9e6721e45e
diff --git a/tools/ndn-autoconfig/base.hpp b/tools/ndn-autoconfig/base.hpp
index a293d0b..5c9d4cf 100644
--- a/tools/ndn-autoconfig/base.hpp
+++ b/tools/ndn-autoconfig/base.hpp
@@ -31,8 +31,8 @@
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/mgmt/nfd/controller.hpp>
#include <ndn-cxx/mgmt/nfd/face-status.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/face-uri.hpp>
namespace ndn {
namespace tools {
@@ -40,7 +40,6 @@
using ndn::nfd::ControlParameters;
using ndn::nfd::ControlResponse;
-using ndn::util::FaceUri;
/**
* @brief Base class for discovery stages
diff --git a/tools/ndn-autoconfig/main.cpp b/tools/ndn-autoconfig/main.cpp
index fc3a6fc..db45610 100644
--- a/tools/ndn-autoconfig/main.cpp
+++ b/tools/ndn-autoconfig/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,7 @@
#include "ndn-fch-discovery.hpp"
#include "guess-from-identity-name.hpp"
-#include <ndn-cxx/util/network-monitor.hpp>
+#include <ndn-cxx/net/network-monitor.hpp>
#include <ndn-cxx/util/scheduler.hpp>
#include <ndn-cxx/util/scheduler-scoped-event-id.hpp>
@@ -93,7 +93,7 @@
})
{
if (m_isDaemonMode) {
- m_networkMonitor.reset(new ndn::util::NetworkMonitor(m_io));
+ m_networkMonitor.reset(new net::NetworkMonitor(m_io));
m_networkMonitor->onNetworkStateChanged.connect([this] {
// delay stages, so if multiple events are triggered in short sequence,
// only one auto-detection procedure is triggered
@@ -154,7 +154,7 @@
boost::asio::io_service m_io;
Face m_face;
KeyChain m_keyChain;
- unique_ptr<util::NetworkMonitor> m_networkMonitor;
+ unique_ptr<net::NetworkMonitor> m_networkMonitor;
util::Scheduler m_scheduler;
util::scheduler::ScopedEventId m_startStagesEvent;
bool m_isDaemonMode;
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index 6323196..042248a 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -30,8 +30,8 @@
#include <ndn-cxx/mgmt/nfd/controller.hpp>
#include <ndn-cxx/mgmt/nfd/face-monitor.hpp>
#include <ndn-cxx/mgmt/nfd/face-status.hpp>
+#include <ndn-cxx/net/face-uri.hpp>
#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/util/face-uri.hpp>
#include <boost/program_options/options_description.hpp>
#include <boost/program_options/variables_map.hpp>
@@ -43,7 +43,6 @@
namespace ndn {
namespace nfd_autoreg {
-using util::FaceUri;
using ::nfd::Network;
class AutoregServer : boost::noncopyable
diff --git a/tools/nfdc/command-arguments.hpp b/tools/nfdc/command-arguments.hpp
index 010c1c2..49e7419 100644
--- a/tools/nfdc/command-arguments.hpp
+++ b/tools/nfdc/command-arguments.hpp
@@ -29,7 +29,6 @@
#include "core/common.hpp"
#include "status-report.hpp"
#include <ndn-cxx/encoding/nfd-constants.hpp>
-#include <ndn-cxx/util/face-uri.hpp>
#include <boost/any.hpp>
namespace nfd {
@@ -38,7 +37,6 @@
using ndn::nfd::FacePersistency;
using ndn::nfd::RouteOrigin;
-using ndn::util::FaceUri;
/** \brief contains named command arguments
*/
diff --git a/tools/nfdc/command-definition.hpp b/tools/nfdc/command-definition.hpp
index 813e744..7d8c8f0 100644
--- a/tools/nfdc/command-definition.hpp
+++ b/tools/nfdc/command-definition.hpp
@@ -76,13 +76,13 @@
/** \brief FaceUri
*
- * The argument appears in CommandArguments as ndn::util::FaceUri.
+ * The argument appears in CommandArguments as ndn::FaceUri.
*/
FACE_URI,
/** \brief FaceId or FaceUri
*
- * The argument appears in CommandArguments as either uint64_t or ndn::util::FaceUri.
+ * The argument appears in CommandArguments as either uint64_t or ndn::FaceUri.
*/
FACE_ID_OR_URI,
diff --git a/tools/nfdc/face-id-fetcher.hpp b/tools/nfdc/face-id-fetcher.hpp
index 1afeaf5..7c9a40f 100644
--- a/tools/nfdc/face-id-fetcher.hpp
+++ b/tools/nfdc/face-id-fetcher.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,15 +29,12 @@
#include "core/common.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/mgmt/nfd/controller.hpp>
-#include <ndn-cxx/util/face-uri.hpp>
#include <ndn-cxx/security/validator-null.hpp>
namespace nfd {
namespace tools {
namespace nfdc {
-using ndn::util::FaceUri;
-
class FaceIdFetcher
{
public:
diff --git a/tools/nfdc/legacy-nfdc.hpp b/tools/nfdc/legacy-nfdc.hpp
index ada0a7d..782c255 100644
--- a/tools/nfdc/legacy-nfdc.hpp
+++ b/tools/nfdc/legacy-nfdc.hpp
@@ -152,7 +152,7 @@
onCanonizeFailure(const std::string& reason);
void
- startFaceCreate(const ndn::util::FaceUri& canonicalUri);
+ startFaceCreate(const FaceUri& canonicalUri);
void
onObtainFaceIdFailure(const std::string& message);