face: pass addFace and NetworkMonitor to ProtocolFactory constructor
refs #4021
Change-Id: I842515eb044bb1c655b347e6069e63c55c4e2d54
diff --git a/daemon/face/face-system.hpp b/daemon/face/face-system.hpp
index 6557c72..039c1c9 100644
--- a/daemon/face/face-system.hpp
+++ b/daemon/face/face-system.hpp
@@ -41,6 +41,7 @@
namespace face {
class ProtocolFactory;
+struct ProtocolFactoryCtorParams;
/** \brief entry point of the face system
*
@@ -50,7 +51,7 @@
class FaceSystem : noncopyable
{
public:
- FaceSystem(FaceTable& faceTable, const shared_ptr<ndn::net::NetworkMonitor>& netmon);
+ FaceSystem(FaceTable& faceTable, shared_ptr<ndn::net::NetworkMonitor> netmon);
DEPRECATED(
explicit
@@ -105,6 +106,10 @@
friend class FaceSystem;
};
+PUBLIC_WITH_TESTS_ELSE_PRIVATE:
+ ProtocolFactoryCtorParams
+ makePFCtorParams();
+
private:
void
processConfig(const ConfigSection& configSection, bool isDryRun,
@@ -123,6 +128,8 @@
std::map<std::string, ProtocolFactory*> m_factoryByScheme;
FaceTable& m_faceTable;
+
+ shared_ptr<ndn::net::NetworkMonitor> m_netmon;
};
} // namespace face