face+table: move EndpointId typedef out of Transport and use it in table

refs: #4843

Change-Id: I2b200518a57b21d66eae4360166afda31c3bf11b
diff --git a/daemon/table/fib-entry.cpp b/daemon/table/fib-entry.cpp
index cf14936..53dd584 100644
--- a/daemon/table/fib-entry.cpp
+++ b/daemon/table/fib-entry.cpp
@@ -35,7 +35,7 @@
 }
 
 NextHopList::iterator
-Entry::findNextHop(const Face& face, uint64_t endpointId)
+Entry::findNextHop(const Face& face, EndpointId endpointId)
 {
   return std::find_if(m_nextHops.begin(), m_nextHops.end(),
                       [&face, endpointId] (const NextHop& nexthop) {
@@ -44,13 +44,13 @@
 }
 
 bool
-Entry::hasNextHop(const Face& face, uint64_t endpointId) const
+Entry::hasNextHop(const Face& face, EndpointId endpointId) const
 {
   return const_cast<Entry*>(this)->findNextHop(face, endpointId) != m_nextHops.end();
 }
 
 void
-Entry::addOrUpdateNextHop(Face& face, uint64_t endpointId, uint64_t cost)
+Entry::addOrUpdateNextHop(Face& face, EndpointId endpointId, uint64_t cost)
 {
   auto it = this->findNextHop(face, endpointId);
   if (it == m_nextHops.end()) {
@@ -62,7 +62,7 @@
 }
 
 void
-Entry::removeNextHop(const Face& face, uint64_t endpointId)
+Entry::removeNextHop(const Face& face, EndpointId endpointId)
 {
   auto it = this->findNextHop(face, endpointId);
   if (it != m_nextHops.end()) {
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 2b86f66..5571da3 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -77,7 +77,7 @@
   /** \return whether there is a NextHop record for \p face with the given \p endpointId
    */
   bool
-  hasNextHop(const Face& face, uint64_t endpointId) const;
+  hasNextHop(const Face& face, EndpointId endpointId) const;
 
   /** \brief adds a NextHop record
    *
@@ -85,12 +85,12 @@
    *  its cost is updated.
    */
   void
-  addOrUpdateNextHop(Face& face, uint64_t endpointId, uint64_t cost);
+  addOrUpdateNextHop(Face& face, EndpointId endpointId, uint64_t cost);
 
   /** \brief removes the NextHop record for \p face with the given \p endpointId
    */
   void
-  removeNextHop(const Face& face, uint64_t endpointId);
+  removeNextHop(const Face& face, EndpointId endpointId);
 
   /** \brief removes all NextHop records on \p face for any \p endpointId
    */
@@ -101,7 +101,7 @@
   /** \note This method is non-const because mutable iterators are needed by callers.
    */
   NextHopList::iterator
-  findNextHop(const Face& face, uint64_t endpointId);
+  findNextHop(const Face& face, EndpointId endpointId);
 
   /** \brief sorts the nexthop list by cost
    */
diff --git a/daemon/table/fib-nexthop.cpp b/daemon/table/fib-nexthop.cpp
index e456c15..2b946c5 100644
--- a/daemon/table/fib-nexthop.cpp
+++ b/daemon/table/fib-nexthop.cpp
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace fib {
 
-NextHop::NextHop(Face& face, uint64_t endpointId)
+NextHop::NextHop(Face& face, EndpointId endpointId)
   : m_face(&face)
   , m_endpointId(endpointId)
   , m_cost(0)
diff --git a/daemon/table/fib-nexthop.hpp b/daemon/table/fib-nexthop.hpp
index 313508d..e0cf599 100644
--- a/daemon/table/fib-nexthop.hpp
+++ b/daemon/table/fib-nexthop.hpp
@@ -39,7 +39,7 @@
 {
 public:
   explicit
-  NextHop(Face& face, uint64_t endpointId);
+  NextHop(Face& face, EndpointId endpointId);
 
   Face&
   getFace() const
@@ -47,7 +47,7 @@
     return *m_face;
   }
 
-  uint64_t
+  EndpointId
   getEndpointId() const
   {
     return m_endpointId;
@@ -67,7 +67,7 @@
 
 private:
   Face* m_face;
-  uint64_t m_endpointId;
+  EndpointId m_endpointId;
   uint64_t m_cost;
 };
 
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index ccde921..4c74e3f 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.cpp
@@ -143,7 +143,7 @@
 }
 
 void
-Fib::removeNextHop(Entry& entry, const Face& face, uint64_t endpointId)
+Fib::removeNextHop(Entry& entry, const Face& face, EndpointId endpointId)
 {
   entry.removeNextHop(face, endpointId);
   this->eraseIfEmpty(entry);
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index cfdc4f1..c7fb9cc 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.hpp
@@ -108,7 +108,7 @@
   /** \brief removes the NextHop record for \p face with a given \p endpointId
    */
   void
-  removeNextHop(Entry& entry, const Face& face, uint64_t endpointId);
+  removeNextHop(Entry& entry, const Face& face, EndpointId endpointId);
 
   /** \brief removes the NextHop record for \p face for any \p endpointId
    */
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 2edbc9f..53929e6 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -50,7 +50,7 @@
 }
 
 InRecordCollection::iterator
-Entry::getInRecord(const Face& face, uint64_t endpointId)
+Entry::getInRecord(const Face& face, EndpointId endpointId)
 {
   return std::find_if(m_inRecords.begin(), m_inRecords.end(),
     [&face, endpointId] (const InRecord& inRecord) {
@@ -59,7 +59,7 @@
 }
 
 InRecordCollection::iterator
-Entry::insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest)
+Entry::insertOrUpdateInRecord(Face& face, EndpointId endpointId, const Interest& interest)
 {
   BOOST_ASSERT(this->canMatch(interest));
 
@@ -77,7 +77,7 @@
 }
 
 void
-Entry::deleteInRecord(const Face& face, uint64_t endpointId)
+Entry::deleteInRecord(const Face& face, EndpointId endpointId)
 {
   auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
     [&face, endpointId] (const InRecord& inRecord) {
@@ -95,7 +95,7 @@
 }
 
 OutRecordCollection::iterator
-Entry::getOutRecord(const Face& face, uint64_t endpointId)
+Entry::getOutRecord(const Face& face, EndpointId endpointId)
 {
   return std::find_if(m_outRecords.begin(), m_outRecords.end(),
     [&face, endpointId] (const OutRecord& outRecord) {
@@ -104,7 +104,7 @@
 }
 
 OutRecordCollection::iterator
-Entry::insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest)
+Entry::insertOrUpdateOutRecord(Face& face, EndpointId endpointId, const Interest& interest)
 {
   BOOST_ASSERT(this->canMatch(interest));
 
@@ -122,7 +122,7 @@
 }
 
 void
-Entry::deleteOutRecord(const Face& face, uint64_t endpointId)
+Entry::deleteOutRecord(const Face& face, EndpointId endpointId)
 {
   auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
     [&face, endpointId] (const OutRecord& outRecord) {
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index b1dc9ee..5a814bd 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -136,18 +136,18 @@
    *  \return an iterator to the in-record, or .in_end() if it does not exist
    */
   InRecordCollection::iterator
-  getInRecord(const Face& face, uint64_t endpointId);
+  getInRecord(const Face& face, EndpointId endpointId);
 
   /** \brief insert or update an in-record
    *  \return an iterator to the new or updated in-record
    */
   InRecordCollection::iterator
-  insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest);
+  insertOrUpdateInRecord(Face& face, EndpointId endpointId, const Interest& interest);
 
   /** \brief delete the in-record for \p face and \p endpointId if it exists
    */
   void
-  deleteInRecord(const Face& face, uint64_t endpointId);
+  deleteInRecord(const Face& face, EndpointId endpointId);
 
   /** \brief delete all in-records
    */
@@ -203,18 +203,18 @@
    *  \return an iterator to the out-record, or .out_end() if it does not exist
    */
   OutRecordCollection::iterator
-  getOutRecord(const Face& face, uint64_t endpointId);
+  getOutRecord(const Face& face, EndpointId endpointId);
 
   /** \brief insert or update an out-record
    *  \return an iterator to the new or updated out-record
    */
   OutRecordCollection::iterator
-  insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest);
+  insertOrUpdateOutRecord(Face& face, EndpointId endpointId, const Interest& interest);
 
   /** \brief delete the out-record for \p face and \p endpointId if it exists
    */
   void
-  deleteOutRecord(const Face& face, uint64_t endpointId);
+  deleteOutRecord(const Face& face, EndpointId endpointId);
 
 public: // cleanup
   /** \brief delete all in-records and out-records for \p face if it exists
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index 61fef7e..212ad23 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.cpp
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace pit {
 
-FaceRecord::FaceRecord(Face& face, uint64_t endpointId)
+FaceRecord::FaceRecord(Face& face, EndpointId endpointId)
   : m_face(face)
   , m_endpointId(endpointId)
   , m_lastNonce(0)
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index 3e3f020..8f4132c 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.hpp
@@ -40,12 +40,12 @@
 class FaceRecord : public StrategyInfoHost
 {
 public:
-  FaceRecord(Face& face, uint64_t endpointId);
+  FaceRecord(Face& face, EndpointId endpointId);
 
   Face&
   getFace() const;
 
-  uint64_t
+  EndpointId
   getEndpointId() const;
 
   uint32_t
@@ -67,7 +67,7 @@
 
 private:
   Face& m_face;
-  uint64_t m_endpointId;
+  EndpointId m_endpointId;
   uint32_t m_lastNonce;
   time::steady_clock::TimePoint m_lastRenewed;
   time::steady_clock::TimePoint m_expiry;
@@ -79,7 +79,7 @@
   return m_face;
 }
 
-inline uint64_t
+inline EndpointId
 FaceRecord::getEndpointId() const
 {
   return m_endpointId;
diff --git a/daemon/table/pit-in-record.cpp b/daemon/table/pit-in-record.cpp
index 7bb10b9..e26e767 100644
--- a/daemon/table/pit-in-record.cpp
+++ b/daemon/table/pit-in-record.cpp
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace pit {
 
-InRecord::InRecord(Face& face, uint64_t endpointId)
+InRecord::InRecord(Face& face, EndpointId endpointId)
   : FaceRecord(face, endpointId)
 {
 }
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index d758097..f03c608 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.hpp
@@ -36,7 +36,7 @@
 class InRecord : public FaceRecord
 {
 public:
-  InRecord(Face& face, uint64_t endpointId);
+  InRecord(Face& face, EndpointId endpointId);
 
   void
   update(const Interest& interest);
diff --git a/daemon/table/pit-out-record.cpp b/daemon/table/pit-out-record.cpp
index 75d7e7f..5a42151 100644
--- a/daemon/table/pit-out-record.cpp
+++ b/daemon/table/pit-out-record.cpp
@@ -28,7 +28,7 @@
 namespace nfd {
 namespace pit {
 
-OutRecord::OutRecord(Face& face, uint64_t endpointId)
+OutRecord::OutRecord(Face& face, EndpointId endpointId)
   : FaceRecord(face, endpointId)
 {
 }
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index c0537fd..985a129 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.hpp
@@ -36,7 +36,7 @@
 class OutRecord : public FaceRecord
 {
 public:
-  OutRecord(Face& face, uint64_t endpointId);
+  OutRecord(Face& face, EndpointId endpointId);
 
   /** \return last NACK returned by \p getFace()
    *