all: avoid usage of deprecated namespace ndn::Tlv
refs #2079 Change-Id: I3d8748929706726b55fe1a9a0f6ae00857ea3547
This commit is contained in:
1 parent
a110f268c7
commit
67f11acf5c
9 files changed
+17
-16
No files matched your search
+3
-2
@@ -84,8 +84,9 @@ using ndn::Exclude;
|
||||
using ndn::Block;
|
||||
|
||||
namespace tlv {
|
||||
using namespace ndn::Tlv;
|
||||
}
|
||||
// Don't write "namespace tlv = ndn::tlv", because NFD can add other members into this namespace.
|
||||
using namespace ndn::tlv;
|
||||
} // namespace tlv
|
||||
|
||||
namespace name = ndn::name;
|
||||
namespace time = ndn::time;
|
||||
|
||||
@@ -52,7 +52,7 @@ ManagerBase::extractParameters(const Name::Component& parameterComponent,
|
||||
Block rawParameters = parameterComponent.blockFromValue();
|
||||
extractedParameters.wireDecode(rawParameters);
|
||||
}
|
||||
catch (const ndn::Tlv::Error& e)
|
||||
catch (const tlv::Error&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -373,7 +373,7 @@ RibManager::extractParameters(const Name::Component& parameterComponent,
|
||||
Block rawParameters = parameterComponent.blockFromValue();
|
||||
extractedParameters.wireDecode(rawParameters);
|
||||
}
|
||||
catch (const ndn::Tlv::Error& e)
|
||||
catch (const tlv::Error&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ protected:
|
||||
size_t totalLength = 0;
|
||||
for (int64_t i = 0; i < N; i++)
|
||||
{
|
||||
totalLength += prependNonNegativeIntegerBlock(outBuffer, ndn::Tlv::Content, i);
|
||||
totalLength += prependNonNegativeIntegerBlock(outBuffer, tlv::Content, i);
|
||||
}
|
||||
m_totalPayloadLength += totalLength;
|
||||
return totalLength;
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
// wrap data in a single Content TLV for easy parsing
|
||||
m_buffer.prependVarNumber(m_buffer.size());
|
||||
m_buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
m_buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
BOOST_TEST_CHECKPOINT("creating parser");
|
||||
ndn::Block parser(m_buffer.buf(), m_buffer.size());
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
// wrap the Channel Status entries in a single Content TLV for easy parsing
|
||||
m_buffer.prependVarNumber(m_buffer.size());
|
||||
m_buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
m_buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
ndn::Block parser(m_buffer.buf(), m_buffer.size());
|
||||
parser.parse();
|
||||
|
||||
@@ -82,7 +82,7 @@ readNonNegativeIntegerType(const Block& block,
|
||||
}
|
||||
std::stringstream error;
|
||||
error << "expected type " << type << " got " << block.type();
|
||||
throw ndn::Tlv::Error(error.str());
|
||||
throw tlv::Error(error.str());
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
@@ -96,7 +96,7 @@ checkedReadNonNegativeIntegerType(Block::element_const_iterator& i,
|
||||
++i;
|
||||
return readNonNegativeIntegerType(block, type);
|
||||
}
|
||||
throw ndn::Tlv::Error("Unexpected end of FaceStatus");
|
||||
throw tlv::Error("Unexpected end of FaceStatus");
|
||||
}
|
||||
|
||||
class FaceStatusPublisherFixture : public BaseFixture
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
|
||||
// wrap the Face Statuses in a single Content TLV for easy parsing
|
||||
m_buffer.prependVarNumber(m_buffer.size());
|
||||
m_buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
m_buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
ndn::Block parser(m_buffer.buf(), m_buffer.size());
|
||||
parser.parse();
|
||||
|
||||
@@ -51,7 +51,7 @@ readNonNegativeIntegerType(const Block& block,
|
||||
}
|
||||
std::stringstream error;
|
||||
error << "Expected type " << type << " got " << block.type();
|
||||
throw ndn::Tlv::Error(error.str());
|
||||
throw tlv::Error(error.str());
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
@@ -68,7 +68,7 @@ checkedReadNonNegativeIntegerType(Block::element_const_iterator& i,
|
||||
std::stringstream error;
|
||||
error << "Unexpected end of Block while attempting to read type #"
|
||||
<< type;
|
||||
throw ndn::Tlv::Error(error.str());
|
||||
throw tlv::Error(error.str());
|
||||
}
|
||||
|
||||
class FibEnumerationPublisherFixture : public BaseFixture
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
BOOST_REQUIRE(i != entry.elements_end());
|
||||
|
||||
|
||||
BOOST_REQUIRE(i->type() == ndn::Tlv::Name);
|
||||
BOOST_REQUIRE(i->type() == tlv::Name);
|
||||
Name prefix(*i);
|
||||
++i;
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
|
||||
// wrap the FIB Entry blocks in a single Content TLV for easy parsing
|
||||
m_buffer.prependVarNumber(m_buffer.size());
|
||||
m_buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
m_buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
ndn::Block parser(m_buffer.buf(), m_buffer.size());
|
||||
parser.parse();
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
// wrap the Strategy Choice entries in a single Content TLV for easy parsing
|
||||
m_buffer.prependVarNumber(m_buffer.size());
|
||||
m_buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
m_buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
ndn::Block parser(m_buffer.buf(), m_buffer.size());
|
||||
parser.parse();
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
|
||||
buffer.appendByteArray(payload.value(), payload.value_size());
|
||||
buffer.prependVarNumber(buffer.size());
|
||||
buffer.prependVarNumber(ndn::Tlv::Content);
|
||||
buffer.prependVarNumber(tlv::Content);
|
||||
|
||||
ndn::Block parser(buffer.buf(), buffer.size());
|
||||
parser.parse();
|
||||
|
||||
Reference in new issue
Block a user