tools, tests: replace FaceFlags with individual fields

refs #1992

Change-Id: Ic635deb5c6c03f2eba4c440357ca435a46a91588
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index 5164f5d..0b6f7a5 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -137,7 +137,7 @@
   }
 
   void
-  registerPrefixesIfNeeded(uint64_t faceId, const FaceUri& uri, bool isOnDemand)
+  registerPrefixesIfNeeded(uint64_t faceId, const FaceUri& uri, FacePersistency facePersistency)
   {
     if (hasAllowedSchema(uri)) {
       boost::system::error_code ec;
@@ -148,7 +148,8 @@
         registerPrefixesForFace(faceId, m_allFacesPrefixes);
 
         // register autoreg prefixes if new face is on-demand and not blacklisted and whitelisted
-        if (isOnDemand && !isBlacklisted(address) && isWhitelisted(address)) {
+        if (facePersistency == FACE_PERSISTENCY_ON_DEMAND &&
+            !isBlacklisted(address) && isWhitelisted(address)) {
           registerPrefixesForFace(faceId, m_autoregPrefixes);
         }
       }
@@ -159,12 +160,12 @@
   onNotification(const FaceEventNotification& notification)
   {
     if (notification.getKind() == FACE_EVENT_CREATED &&
-        !notification.isLocal())
+        notification.getFaceScope() != FACE_SCOPE_LOCAL)
       {
         std::cerr << "PROCESSING: " << notification << std::endl;
 
         registerPrefixesIfNeeded(notification.getFaceId(), FaceUri(notification.getRemoteUri()),
-                                 notification.isOnDemand());
+                                 notification.getFacePersistency());
       }
     else
       {
@@ -295,7 +296,7 @@
 
         nfd::FaceStatus faceStatus(block);
         registerPrefixesIfNeeded(faceStatus.getFaceId(), FaceUri(faceStatus.getRemoteUri()),
-                                 faceStatus.isOnDemand());
+                                 faceStatus.getFacePersistency());
       }
   }