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/name.hpp b/src/name.hpp
index 7522a19..0e8c840 100644
--- a/src/name.hpp
+++ b/src/name.hpp
@@ -77,7 +77,7 @@
* Create a new Name with no components.
*/
Name()
- : m_nameBlock(Tlv::Name)
+ : m_nameBlock(tlv::Name)
{
}
@@ -198,10 +198,10 @@
Name&
append(const Block& value)
{
- if (value.type() == Tlv::NameComponent)
+ if (value.type() == tlv::NameComponent)
m_nameBlock.push_back(value);
else
- m_nameBlock.push_back(Block(Tlv::NameComponent, value));
+ m_nameBlock.push_back(Block(tlv::NameComponent, value));
return *this;
}
@@ -220,7 +220,7 @@
void
clear()
{
- m_nameBlock = Block(Tlv::Name);
+ m_nameBlock = Block(tlv::Name);
}
/**
@@ -752,7 +752,7 @@
}
totalLength += blk.prependVarNumber(totalLength);
- totalLength += blk.prependVarNumber(Tlv::Name);
+ totalLength += blk.prependVarNumber(tlv::Name);
return totalLength;
}
@@ -777,8 +777,8 @@
inline void
Name::wireDecode(const Block& wire)
{
- if (wire.type() != Tlv::Name)
- throw Tlv::Error("Unexpected TLV type when decoding Name");
+ if (wire.type() != tlv::Name)
+ throw tlv::Error("Unexpected TLV type when decoding Name");
m_nameBlock = wire;
m_nameBlock.parse();