Change wire encoding to return a Blob.
diff --git a/ndn-cpp/forwarding-entry.hpp b/ndn-cpp/forwarding-entry.hpp
index 9919f49..177e5c4 100644
--- a/ndn-cpp/forwarding-entry.hpp
+++ b/ndn-cpp/forwarding-entry.hpp
@@ -31,30 +31,18 @@
{
}
- ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat) const
+ Blob wireEncode(WireFormat& wireFormat = *WireFormat::getDefaultWireFormat()) const
{
return wireFormat.encodeForwardingEntry(*this);
}
- ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode() const
- {
- return wireEncode(*WireFormat::getDefaultWireFormat());
- }
- void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat)
+ void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat())
{
wireFormat.decodeForwardingEntry(*this, input, inputLength);
}
- void wireDecode(const unsigned char *input, unsigned int inputLength)
- {
- wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
- }
- void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat)
+ void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat())
{
wireDecode(&input[0], input.size(), wireFormat);
}
- void wireDecode(const std::vector<unsigned char>& input)
- {
- wireDecode(&input[0], input.size());
- }
/**
* Set the forwardingEntryStruct to point to the components in this forwarding entry, without copying any memory.