face: Moving idle UdpFace closing logic to UdpFace class

Change-Id: Ia7310fa18681f17d93c8214ce744da909fea7022
Refs: #1686
diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 9d2368b..ea08f5b 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -24,6 +24,7 @@
  **/
 
 #include "face.hpp"
+#include "face-flags.hpp"
 #include "core/logger.hpp"
 
 namespace nfd {
@@ -128,4 +129,23 @@
   this->onFail(reason);
 }
 
+ndn::nfd::FaceStatus
+Face::getFaceStatus() const
+{
+  const FaceCounters& counters = getCounters();
+
+  ndn::nfd::FaceStatus status;
+  status.setFaceId(getId())
+    .setRemoteUri(getRemoteUri().toString())
+    .setLocalUri(getLocalUri().toString())
+    .setFlags(getFaceFlags(*this))
+    .setNInInterests(counters.getNInInterests())
+    .setNInDatas(counters.getNInDatas())
+    .setNOutInterests(counters.getNOutInterests())
+    .setNOutDatas(counters.getNOutDatas());
+
+  return status;
+}
+
+
 } //namespace nfd