meta-info: allow typed name component in FinalBlockId
refs #4526
Change-Id: I3b6667928fa47c631e45ff5f0ca2c5030c5cc2ad
diff --git a/src/data.hpp b/src/data.hpp
index e0a8466..8eb1b3d 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -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).
*
@@ -206,22 +206,36 @@
Data&
setContentType(uint32_t type);
- const time::milliseconds&
+ time::milliseconds
getFreshnessPeriod() const
{
return m_metaInfo.getFreshnessPeriod();
}
Data&
- setFreshnessPeriod(const time::milliseconds& freshnessPeriod);
+ setFreshnessPeriod(time::milliseconds freshnessPeriod);
- const name::Component&
- getFinalBlockId() const
+ const optional<name::Component>&
+ getFinalBlock() const
{
- return m_metaInfo.getFinalBlockId();
+ return m_metaInfo.getFinalBlock();
}
Data&
+ setFinalBlock(optional<name::Component> finalBlockId);
+
+ /** @deprecated Use @c getFinalBlock
+ * @sa MetaInfo::getFinalBlockId
+ */
+ NDN_CXX_DEPRECATED
+ name::Component
+ getFinalBlockId() const;
+
+ /** @deprecated Use @c setFinalBlock
+ * @sa MetaInfo::setFinalBlockId
+ */
+ NDN_CXX_DEPRECATED
+ Data&
setFinalBlockId(const name::Component& finalBlockId);
protected: