face: Adding new 'createFace' method in all Factories

This method accepts parsed URI object and attempts to create Face on the
right channel (e.g., if hostname in URI resolved to IPv6, IPv6 TCP channel
will be used).

Factories that do not support 'createFace' operation will throw an exception.

As of this commit, *Factory::create methods are renamed to more explicit
*Factory::createChannel, and *Factory::connect to *Factory::createFace.
All other Factory-specific methods should denote what exactly is
created: channel, face, or multicast face.

Change-Id: I6396dc84c4cd8bbcdde9f55cfac90635d99e93e9
Refs: #1195
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index c8dbcf9..78adf6f 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -15,8 +15,8 @@
 NFD_LOG_INIT("EthernetFactory")
 
 shared_ptr<EthernetFace>
-EthernetFactory::createMulticast(const ethernet::Endpoint& interface,
-                                 const ethernet::Address& address)
+EthernetFactory::createMulticastFace(const ethernet::Endpoint& interface,
+                                     const ethernet::Address& address)
 {
   std::vector<ethernet::Endpoint> ifs = findAllInterfaces();
   if (std::find(ifs.begin(), ifs.end(), interface) == ifs.end())
@@ -25,7 +25,7 @@
   if (!address.isMulticast())
     throw Error(address.toString() + " is not a multicast address");
 
-  shared_ptr<EthernetFace> face = findMulticast(interface, address);
+  shared_ptr<EthernetFace> face = findMulticastFace(interface, address);
   if (face)
     return face;
 
@@ -92,8 +92,8 @@
 }
 
 shared_ptr<EthernetFace>
-EthernetFactory::findMulticast(const ethernet::Endpoint& interface,
-                               const ethernet::Address& address) const
+EthernetFactory::findMulticastFace(const ethernet::Endpoint& interface,
+                                   const ethernet::Address& address) const
 {
   MulticastFacesMap::const_iterator i = m_multicastFaces.find(std::make_pair(interface, address));
   if (i != m_multicastFaces.end())
@@ -102,4 +102,12 @@
     return shared_ptr<EthernetFace>();
 }
 
+void
+EthernetFactory::createFace(const FaceUri& uri,
+                            const FaceCreatedCallback& onCreated,
+                            const FaceConnectFailedCallback& onConnectFailed)
+{
+  throw Error("EthernetFactory does not support 'createFace' operation");
+}
+
 } // namespace nfd