table: add Fib::afterNewNextHop signal

Refs: #4931
Change-Id: I68915b5f5688ad2f62147069fea86956a22672b6
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 52dfbd8..7460eda 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-entry.hpp
@@ -36,6 +36,8 @@
 
 namespace fib {
 
+class Fib;
+
 /** \class nfd::fib::NextHopList
  *  \brief Represents a collection of nexthops.
  *
@@ -79,21 +81,24 @@
   bool
   hasNextHop(const Face& face) const;
 
-  /** \brief adds a NextHop record
+private:
+  /** \brief adds a NextHop record to the entry
    *
-   *  If a NextHop record for \p face already exists, its cost is updated.
+   *  If a NextHop record for \p face already exists in the entry, its cost is set to \p cost.
+   *
+   *  \return the iterator to the new or updated NextHop and a bool indicating whether a new
+   *  NextHop was inserted
    */
-  void
+  std::pair<NextHopList::iterator, bool>
   addOrUpdateNextHop(Face& face, uint64_t cost);
 
   /** \brief removes a NextHop record
    *
    *  If no NextHop record for face exists, do nothing.
    */
-  void
+  bool
   removeNextHop(const Face& face);
 
-private:
   /** \note This method is non-const because mutable iterators are needed by callers.
    */
   NextHopList::iterator
@@ -111,6 +116,7 @@
   name_tree::Entry* m_nameTreeEntry = nullptr;
 
   friend class name_tree::Entry;
+  friend class Fib;
 };
 
 } // namespace fib