apps+examples: Adjust Face creation and Face operations for NFD 0.4+ model

Change-Id: Ib0fb0f49a550c77a9bd94729cdf6fb3b11d1e8ab
Refs: #3560
diff --git a/examples/ndn-custom-apps/custom-app.cpp b/examples/ndn-custom-apps/custom-app.cpp
index 00e79a5..7984e28 100644
--- a/examples/ndn-custom-apps/custom-app.cpp
+++ b/examples/ndn-custom-apps/custom-app.cpp
@@ -85,7 +85,7 @@
   // Call trace (for logging purposes)
   m_transmittedInterests(interest, this, m_face);
 
-  m_face->onReceiveInterest(*interest);
+  m_appLink->onReceiveInterest(*interest);
 }
 
 // Callback that will be called when Interest arrives
@@ -108,7 +108,7 @@
   // Call trace (for logging purposes)
   m_transmittedDatas(data, this, m_face);
 
-  m_face->onReceiveData(*data);
+  m_appLink->onReceiveData(*data);
 }
 
 // Callback that will be called when Data arrives
diff --git a/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp b/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
index 3643408..35cd5fd 100644
--- a/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
+++ b/examples/ndn-simple-with-content-freshness/one-interest-requester.cpp
@@ -97,7 +97,7 @@
   NS_LOG_DEBUG(">> I: " << m_name);
 
   // Forward packet to lower (network) layer
-  m_face->onReceiveInterest(*interest);
+  m_appLink->onReceiveInterest(*interest);
 }
 
 void
diff --git a/examples/ndn-triangle-calculate-routes.cpp b/examples/ndn-triangle-calculate-routes.cpp
index b2b8138..614238e 100644
--- a/examples/ndn-triangle-calculate-routes.cpp
+++ b/examples/ndn-triangle-calculate-routes.cpp
@@ -23,7 +23,7 @@
 #include "ns3/network-module.h"
 #include "ns3/ndnSIM-module.h"
 
-#include "model/ndn-net-device-face.hpp"
+#include "ns3/ndnSIM/model/ndn-net-device-link-service.hpp"
 
 namespace ns3 {
 
@@ -83,15 +83,17 @@
       bool isFirst = true;
       for (auto& nextHop : entry.getNextHops()) {
         cout << *nextHop.getFace();
-        auto face = dynamic_pointer_cast<ndn::NetDeviceFace>(nextHop.getFace());
-        if (face == nullptr)
+        auto face = nextHop.getFace();
+        auto linkService = dynamic_cast<ndn::NetDeviceLinkService*>(face->getLinkService());
+        if (linkService == nullptr) {
           continue;
+        }
 
         cout << " towards ";
 
         if (!isFirst)
           cout << ", ";
-        cout << Names::FindName(face->GetNetDevice()->GetChannel()->GetDevice(1)->GetNode());
+        cout << Names::FindName(linkService->GetNetDevice()->GetChannel()->GetDevice(1)->GetNode());
         isFirst = false;
       }
       cout << ")" << endl;