face: Making environment-based selection of the daemon (ndnd-tlv vs. nfd)
If ``NFD`` environment variable is set to any value, a ndn-cpp-dev
application will assume it is connected to nfd and will invoke
appropriate prefix registration protocol.
Change-Id: I33f3a3a29e17b5b5ddd9474427036402d9d657e3
diff --git a/src/face.hpp b/src/face.hpp
index 42f4fd1..9b1fbe4 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -57,27 +57,29 @@
/**
* @brief Create a new Face for communication with an NDN Forwarder using the default UnixTransport.
*/
- Face(bool nfdMode = false);
+ Face();
/**
* @brief Create a new Face for communication with an NDN Forwarder using the default UnixTransport.
* @param ioService A shared pointer to boost::io_service object that should control all IO operations
*/
- Face(const ptr_lib::shared_ptr<boost::asio::io_service> &ioService, bool nfdMode = false);
+ explicit
+ Face(const ptr_lib::shared_ptr<boost::asio::io_service> &ioService);
/**
* Create a new Face for communication with an NDN hub at host:port using the default TcpTransport.
* @param host The host of the NDN hub.
* @param port The port or service name of the NDN hub. If omitted. use 6363.
*/
- Face(const std::string &host, const std::string &port = "6363", bool nfdMode = false);
+ Face(const std::string &host, const std::string &port = "6363");
/**
* Create a new Face for communication with an NDN hub with the given Transport object and connectionInfo.
* @param transport A shared_ptr to a Transport object used for communication.
* @param transport A shared_ptr to a Transport::ConnectionInfo to be used to connect to the transport.
*/
- Face(const shared_ptr<Transport>& transport, bool nfdMode = false);
+ explicit
+ Face(const shared_ptr<Transport>& transport);
/**
* @brief Alternative (special use case) version of the constructor, can be used to aggregate
@@ -92,8 +94,7 @@
* </code>
*/
Face(const shared_ptr<Transport>& transport,
- const shared_ptr<boost::asio::io_service> &ioService,
- bool nfdMode = false);
+ const shared_ptr<boost::asio::io_service> &ioService);
/**
* @brief Express Interest
@@ -194,7 +195,7 @@
private:
void
- construct(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service> &ioService, bool nfdMode);
+ construct(const shared_ptr<Transport>& transport, const shared_ptr<boost::asio::io_service>& ioService);
struct ProcessEventsTimeout {};
typedef std::list<shared_ptr<PendingInterest> > PendingInterestTable;