publisher: remove unused functions
Change-Id: Ifc9a590de11fa841b1d27027d46a9376c5dff41f
refs: #4127
diff --git a/src/publisher/dataset-interest-handler.cpp b/src/publisher/dataset-interest-handler.cpp
index 6fe9d4f..d6f8ce7 100644
--- a/src/publisher/dataset-interest-handler.cpp
+++ b/src/publisher/dataset-interest-handler.cpp
@@ -185,82 +185,4 @@
context.end();
}
-template<> std::list<tlv::AdjacencyLsa>
-getTlvLsas<tlv::AdjacencyLsa>(const Lsdb& lsdb)
-{
- std::list<tlv::AdjacencyLsa> lsas;
-
- auto lsaRange = std::make_pair<std::list<AdjLsa>::const_iterator,
- std::list<AdjLsa>::const_iterator>(
- lsdb.getAdjLsdb().cbegin(), lsdb.getAdjLsdb().cend());
- for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
- tlv::AdjacencyLsa tlvLsa;
-
- std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
- tlvLsa.setLsaInfo(*tlvLsaInfo);
-
- for (const Adjacent& adj : lsa->getAdl().getAdjList()) {
- tlv::Adjacency tlvAdj;
- tlvAdj.setName(adj.getName());
- tlvAdj.setUri(adj.getFaceUri().toString());
- tlvAdj.setCost(adj.getLinkCost());
- tlvLsa.addAdjacency(tlvAdj);
- }
- lsas.push_back(tlvLsa);
- }
-
- return lsas;
-
-}
-
-template<> std::list<tlv::CoordinateLsa>
-getTlvLsas<tlv::CoordinateLsa>(const Lsdb& lsdb)
-{
- std::list<tlv::CoordinateLsa> lsas;
-
- auto lsaRange = std::make_pair<std::list<CoordinateLsa>::const_iterator,
- std::list<CoordinateLsa>::const_iterator>(
- lsdb.getCoordinateLsdb().cbegin(), lsdb.getCoordinateLsdb().cend());
-
- for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
- tlv::CoordinateLsa tlvLsa;
-
- std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
- tlvLsa.setLsaInfo(*tlvLsaInfo);
-
- tlvLsa.setHyperbolicRadius(lsa->getCorRadius());
- tlvLsa.setHyperbolicAngle(lsa->getCorTheta());
-
- lsas.push_back(tlvLsa);
- }
-
- return lsas;
-
-}
-
-template<> std::list<tlv::NameLsa>
-getTlvLsas<tlv::NameLsa>(const Lsdb& lsdb)
-{
- std::list<tlv::NameLsa> lsas;
-
- auto lsaRange = std::make_pair<std::list<NameLsa>::const_iterator,
- std::list<NameLsa>::const_iterator>(
- lsdb.getNameLsdb().cbegin(), lsdb.getNameLsdb().cend());
- for (auto lsa = lsaRange.first; lsa != lsaRange.second; lsa++) {
- tlv::NameLsa tlvLsa;
-
- std::shared_ptr<tlv::LsaInfo> tlvLsaInfo = tlv::makeLsaInfo(*lsa);
- tlvLsa.setLsaInfo(*tlvLsaInfo);
-
- for (const ndn::Name& name : lsa->getNpl().getNames()) {
- tlvLsa.addName(name);
- }
-
- lsas.push_back(tlvLsa);
- }
-
- return lsas;
-
-}
-
} // namespace nlsr
diff --git a/src/publisher/dataset-interest-handler.hpp b/src/publisher/dataset-interest-handler.hpp
index 2822ae5..46262b1 100644
--- a/src/publisher/dataset-interest-handler.hpp
+++ b/src/publisher/dataset-interest-handler.hpp
@@ -119,18 +119,6 @@
const std::list<RoutingTableEntry>& m_dryRoutingTableEntries;
};
-template<typename T> std::list<T>
-getTlvLsas(const Lsdb& lsdb);
-
-template<> std::list<tlv::AdjacencyLsa>
-getTlvLsas<tlv::AdjacencyLsa>(const Lsdb& lsdb);
-
-template<> std::list<tlv::CoordinateLsa>
-getTlvLsas<tlv::CoordinateLsa>(const Lsdb& lsdb);
-
-template<> std::list<tlv::NameLsa>
-getTlvLsas<tlv::NameLsa>(const Lsdb& lsdb);
-
} // namespace nlsr
#endif // NLSR_PUBLISHER_DATASET_INTEREST_HANDLER_HPP
diff --git a/src/tlv/coordinate-lsa.cpp b/src/tlv/coordinate-lsa.cpp
index 20af101..f05b682 100644
--- a/src/tlv/coordinate-lsa.cpp
+++ b/src/tlv/coordinate-lsa.cpp
@@ -25,8 +25,6 @@
#include <ndn-cxx/util/concepts.hpp>
#include <ndn-cxx/encoding/block-helpers.hpp>
-#include <iostream>
-
namespace nlsr {
namespace tlv {