all: rename Tlv namespace to tlv for consistency
This commit renames the Tlv namespace defined in
tlv.hpp to tlv to be more consistent with tlv::security
and tlv::nfd. A Tlv namespace alias is provided for
backwards compatibility.
Change-Id: I21278d6a077afe7776802c3296997d4c1c44c6c6
diff --git a/src/data.cpp b/src/data.cpp
index 596e20b..d095382 100644
--- a/src/data.cpp
+++ b/src/data.cpp
@@ -25,7 +25,7 @@
namespace ndn {
Data::Data()
- : m_content(Tlv::Content) // empty content
+ : m_content(tlv::Content) // empty content
{
}
@@ -79,7 +79,7 @@
if (!unsignedPortion)
{
totalLength += block.prependVarNumber(totalLength);
- totalLength += block.prependVarNumber(Tlv::Data);
+ totalLength += block.prependVarNumber(tlv::Data);
}
return totalLength;
}
@@ -91,7 +91,7 @@
totalLength += encoder.appendBlock(signatureValue);
totalLength += encoder.prependVarNumber(totalLength);
- encoder.prependVarNumber(Tlv::Data);
+ encoder.prependVarNumber(tlv::Data);
const_cast<Data*>(this)->wireDecode(encoder.block());
return m_wire;
@@ -127,23 +127,23 @@
// Signature
// Name
- m_name.wireDecode(m_wire.get(Tlv::Name));
+ m_name.wireDecode(m_wire.get(tlv::Name));
// MetaInfo
- m_metaInfo.wireDecode(m_wire.get(Tlv::MetaInfo));
+ m_metaInfo.wireDecode(m_wire.get(tlv::MetaInfo));
// Content
- m_content = m_wire.get(Tlv::Content);
+ m_content = m_wire.get(tlv::Content);
///////////////
// Signature //
///////////////
// SignatureInfo
- m_signature.setInfo(m_wire.get(Tlv::SignatureInfo));
+ m_signature.setInfo(m_wire.get(tlv::SignatureInfo));
// SignatureValue
- Block::element_const_iterator val = m_wire.find(Tlv::SignatureValue);
+ Block::element_const_iterator val = m_wire.find(tlv::SignatureValue);
if (val != m_wire.elements_end())
m_signature.setValue(*val);
}
@@ -212,7 +212,7 @@
Data::getContent() const
{
if (m_content.empty())
- m_content = dataBlock(Tlv::Content, reinterpret_cast<const uint8_t*>(0), 0);
+ m_content = dataBlock(tlv::Content, reinterpret_cast<const uint8_t*>(0), 0);
if (!m_content.hasWire())
m_content.encode();
@@ -224,7 +224,7 @@
{
onChanged();
- m_content = dataBlock(Tlv::Content, content, contentLength);
+ m_content = dataBlock(tlv::Content, content, contentLength);
return *this;
}
@@ -234,7 +234,7 @@
{
onChanged();
- m_content = Block(Tlv::Content, contentValue); // not a real wire encoding yet
+ m_content = Block(tlv::Content, contentValue); // not a real wire encoding yet
return *this;
}
@@ -244,10 +244,10 @@
{
onChanged();
- if (content.type() == Tlv::Content)
+ if (content.type() == tlv::Content)
m_content = content;
else {
- m_content = Block(Tlv::Content, content);
+ m_content = Block(tlv::Content, content);
}
return *this;