lp: IncomingFaceId, NextHopFaceId, CachePolicy tags
LocalControlHeader is deprecated.
This commit also adjusts includes in some lp/ headers.
refs #3296
Change-Id: Icdc7b469d70739fe5c65da51817c92ff9136c923
diff --git a/src/interest.cpp b/src/interest.cpp
index 35be5ce..1ad619c 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -485,4 +485,53 @@
return os;
}
+#ifdef NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
+// Permit deprecated usage for gcc only.
+// clang allows deprecated usage in deprecated functions, so it doesn't need this directive.
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
+lp::LocalControlHeaderFacade
+Interest::getLocalControlHeader()
+{
+ return lp::LocalControlHeaderFacade(*this);
+}
+
+const lp::LocalControlHeaderFacade
+Interest::getLocalControlHeader() const
+{
+ return lp::LocalControlHeaderFacade(const_cast<Interest&>(*this));
+}
+
+uint64_t
+Interest::getIncomingFaceId() const
+{
+ return getLocalControlHeader().getIncomingFaceId();
+}
+
+Interest&
+Interest::setIncomingFaceId(uint64_t incomingFaceId)
+{
+ getLocalControlHeader().setIncomingFaceId(incomingFaceId);
+ return *this;
+}
+
+uint64_t
+Interest::getNextHopFaceId() const
+{
+ return getLocalControlHeader().getNextHopFaceId();
+}
+
+Interest&
+Interest::setNextHopFaceId(uint64_t nextHopFaceId)
+{
+ getLocalControlHeader().setNextHopFaceId(nextHopFaceId);
+ return *this;
+}
+
+#pragma GCC diagnostic pop
+
+#endif // NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
} // namespace ndn