face/mgmt/fw/tools: add localUri to FaceStatus and FaceEventNotification

refs #1396

Change-Id: I6084745c62c44a409ecbd4a795cb712475e32416
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index e184c00..183af17 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -5,6 +5,7 @@
  */
 
 #include "face-manager.hpp"
+#include "face-flags.hpp"
 
 #include "core/logger.hpp"
 #include "core/face-uri.hpp"
@@ -562,7 +563,7 @@
 {
   m_faceTable.add(newFace);
 
-  NFD_LOG_DEBUG("Created face " << newFace->getUri() << " ID " << newFace->getId());
+  //NFD_LOG_DEBUG("Created face " << newFace->getRemoteUri() << " ID " << newFace->getId());
 }
 
 void
@@ -642,25 +643,27 @@
 void
 FaceManager::onAddFace(shared_ptr<Face> face)
 {
-  ndn::nfd::FaceEventNotification faceCreated(ndn::nfd::FACE_EVENT_CREATED,
-                                              face->getId(),
-                                              face->getUri().toString(),
-                                              (face->isLocal() ? ndn::nfd::FACE_IS_LOCAL : 0) |
-                                              (face->isOnDemand() ? ndn::nfd::FACE_IS_ON_DEMAND : 0));
+  ndn::nfd::FaceEventNotification notification;
+  notification.setKind(ndn::nfd::FACE_EVENT_CREATED)
+              .setFaceId(face->getId())
+              .setRemoteUri(face->getRemoteUri().toString())
+              .setLocalUri(face->getLocalUri().toString())
+              .setFlags(getFaceFlags(*face));
 
-  m_notificationStream.postNotification(faceCreated);
+  m_notificationStream.postNotification(notification);
 }
 
 void
 FaceManager::onRemoveFace(shared_ptr<Face> face)
 {
-  ndn::nfd::FaceEventNotification faceDestroyed(ndn::nfd::FACE_EVENT_DESTROYED,
-                                                face->getId(),
-                                                face->getUri().toString(),
-                                                (face->isLocal() ? ndn::nfd::FACE_IS_LOCAL : 0) |
-                                                (face->isOnDemand() ? ndn::nfd::FACE_IS_ON_DEMAND : 0));
+  ndn::nfd::FaceEventNotification notification;
+  notification.setKind(ndn::nfd::FACE_EVENT_DESTROYED)
+              .setFaceId(face->getId())
+              .setRemoteUri(face->getRemoteUri().toString())
+              .setLocalUri(face->getLocalUri().toString())
+              .setFlags(getFaceFlags(*face));
 
-  m_notificationStream.postNotification(faceDestroyed);
+  m_notificationStream.postNotification(notification);
 }