lsdb: emit signals when modified

RoutingTable and NamePrefixTable consume the signal
and behave accordingly.

refs: #4127

Change-Id: I6540f30f0222f804b01dc7d9640831c84e5264cc
diff --git a/src/security/certificate-store.cpp b/src/security/certificate-store.cpp
index 99067a7..1a3025e 100644
--- a/src/security/certificate-store.cpp
+++ b/src/security/certificate-store.cpp
@@ -33,11 +33,7 @@
 CertificateStore::CertificateStore(ndn::Face& face, ConfParameter& confParam, Lsdb& lsdb)
   : m_face(face)
   , m_confParam(confParam)
-  , m_lsdb(lsdb)
   , m_validator(m_confParam.getValidator())
-  , m_afterSegmentValidatedConnection(m_lsdb.afterSegmentValidatedSignal.connect(
-                                      std::bind(&CertificateStore::afterFetcherSignalEmitted,
-                                                this, _1)))
 {
   for (const auto& x: confParam.getIdCerts()) {
     auto idCert = ndn::io::load<ndn::security::Certificate>(x);
@@ -45,6 +41,9 @@
   }
 
   registerKeyPrefixes();
+
+  m_afterSegmentValidatedConnection = lsdb.afterSegmentValidatedSignal.connect(
+    [this] (const ndn::Data& data) { afterFetcherSignalEmitted(data); });
 }
 
 void
diff --git a/src/security/certificate-store.hpp b/src/security/certificate-store.hpp
index 95437c5..79a0cf7 100644
--- a/src/security/certificate-store.hpp
+++ b/src/security/certificate-store.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  The University of Memphis,
+ * Copyright (c) 2014-2021,  The University of Memphis,
  *                           Regents of the University of California,
  *                           Arizona Board of Regents.
  *
@@ -96,7 +96,6 @@
   CertMap m_certificates;
   ndn::Face& m_face;
   ConfParameter& m_confParam;
-  Lsdb& m_lsdb;
   ndn::security::ValidatorConfig& m_validator;
   ndn::util::signal::ScopedConnection m_afterSegmentValidatedConnection;
 };