data: Implementing Data::getFullName() method to get Data packet name with implicit digest
Note that getFullName() method will throw a Data::Error if Data packet
does not have wire encoding, i.e., it has not been constructed from wire
and is not yet signed.
Change-Id: I7a9b8a6c9e4c6eced9bc907bfc81adb5d4f0e4b3
Refs: #1298
diff --git a/src/data.hpp b/src/data.hpp
index 9338258..70d1a72 100644
--- a/src/data.hpp
+++ b/src/data.hpp
@@ -157,6 +157,15 @@
//
/**
+ * @brief Get full name of Data packet, including the implicit digest
+ *
+ * @throws Error if Data packet doesn't have a full name yet (wire encoding has not been
+ * yet created)
+ */
+ const Name&
+ getFullName() const;
+
+ /**
* @brief Get MetaInfo block from Data packet
*/
const MetaInfo&
@@ -306,6 +315,7 @@
Signature m_signature;
mutable Block m_wire;
+ mutable Name m_fullName;
nfd::LocalControlHeader m_localControlHeader;
friend class nfd::LocalControlHeader;