src: use psync::SegmentPublisher and fix proccessing of interests w/ segments

refs: #4784, #4760

Change-Id: Ia017a6f340e1cd35991068453c9da595c453ca1f
diff --git a/src/lsdb.hpp b/src/lsdb.hpp
index 2ebb952..183f3dc 100644
--- a/src/lsdb.hpp
+++ b/src/lsdb.hpp
@@ -35,6 +35,8 @@
 #include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
 
+#include <PSync/segment-publisher.hpp>
+
 #include <utility>
 #include <boost/cstdint.hpp>
 
@@ -219,6 +221,12 @@
   expressInterest(const ndn::Name& interestName, uint32_t timeoutCount,
                   ndn::time::steady_clock::TimePoint deadline = DEFAULT_LSA_RETRIEVAL_DEADLINE);
 
+  /* \brief Process interest which can be either:
+   * 1) Discovery interest from segment fetcher:
+   *    /localhop/<network>/nlsr/LSA/<site>/<router>/<lsaType>/<seqNo>
+   * 2) Interest containing segment number:
+   *    /localhop/<network>/nlsr/LSA/<site>/<router>/<lsaType>/<seqNo>/<version>/<segmentNo>
+  */
   void
   processInterest(const ndn::Name& name, const ndn::Interest& interest);
 
@@ -311,9 +319,6 @@
 private:
 
   void
-  putLsaData(const ndn::Interest& interest, const std::string& content);
-
-  void
   processInterestForNameLsa(const ndn::Interest& interest,
                             const ndn::Name& lsaKey,
                             uint64_t seqNo);
@@ -417,6 +422,7 @@
   ndn::util::signal::ScopedConnection m_onNewLsaConnection;
 
   std::set<std::shared_ptr<ndn::util::SegmentFetcher>> m_fetchers;
+  psync::SegmentPublisher m_segmentPublisher;
 };
 
 } // namespace nlsr