meta-info: allow typed name component in FinalBlockId
refs #4526
Change-Id: I3b6667928fa47c631e45ff5f0ca2c5030c5cc2ad
diff --git a/src/data.cpp b/src/data.cpp
index 9a59089..6b50dca 100644
--- a/src/data.cpp
+++ b/src/data.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -246,7 +246,7 @@
}
Data&
-Data::setFreshnessPeriod(const time::milliseconds& freshnessPeriod)
+Data::setFreshnessPeriod(time::milliseconds freshnessPeriod)
{
resetWire();
m_metaInfo.setFreshnessPeriod(freshnessPeriod);
@@ -254,6 +254,20 @@
}
Data&
+Data::setFinalBlock(optional<name::Component> finalBlockId)
+{
+ resetWire();
+ m_metaInfo.setFinalBlock(std::move(finalBlockId));
+ return *this;
+}
+
+name::Component
+Data::getFinalBlockId() const
+{
+ return m_metaInfo.getFinalBlockId();
+}
+
+Data&
Data::setFinalBlockId(const name::Component& finalBlockId)
{
resetWire();