71 template<encoding::Tag TAG>
73 wireEncode(EncodingImpl<TAG>& encoder,
bool wantUnsignedPortionOnly =
false)
const;
114 return m_wire.hasWire();
177 setContent(
const uint8_t* value,
size_t valueSize);
210 return m_metaInfo.getType();
219 return m_metaInfo.getFreshnessPeriod();
228 return m_metaInfo.getFinalBlock();
261 mutable Block m_wire;
262 mutable Name m_fullName;
266 extern template size_t 267 Data::wireEncode<encoding::EncoderTag>(
EncodingBuffer&, bool)
const;
269 extern template size_t 282 return !(lhs == rhs);
287 #endif // NDN_DATA_HPP Error(const std::string &what)
Data & setContentType(uint32_t type)
Copyright (c) 2013-2017 Regents of the University of California.
void wireDecode(const Block &wire)
Decode from wire in NDN Packet Format v0.2 or v0.3.
time::milliseconds getFreshnessPeriod() const
Data & setSignature(const Signature &signature)
Set Signature.
uint32_t getContentType() const
Data & setName(const Name &name)
Set name.
std::ostream & operator<<(std::ostream &os, const Data &data)
Data(const Name &name=Name())
Construct an unsigned Data packet with given name and empty Content.
Data & setContent(const Block &block)
Set Content from a block.
const Signature & getSignature() const
Get Signature.
void resetWire()
Clear wire encoding and cached FullName.
Represents a TLV element of NDN packet format.
const MetaInfo & getMetaInfo() const
Get MetaInfo.
const optional< name::Component > & getFinalBlock() const
bool operator!=(const Data &lhs, const Data &rhs)
Data & setSignatureValue(const Block &value)
Set SignatureValue.
name::Component getFinalBlockId() const
base class to allow simple management of packet tags
Represents an absolute name.
const Block & wireEncode() const
Encode to a Block.
const Name & getName() const
Get name.
Represents a name component.
Data & setFreshnessPeriod(time::milliseconds freshnessPeriod)
Data & setFinalBlock(optional< name::Component > finalBlockId)
const Block & getContent() const
Get Content.
bool operator==(const Data &lhs, const Data &rhs)
Data & setMetaInfo(const MetaInfo &metaInfo)
Set MetaInfo.
#define NDN_CXX_DEPRECATED
Mark a type, variable, or function as deprecated.
const Name & getFullName() const
Get full name including implicit digest.
Data & setFinalBlockId(const name::Component &finalBlockId)
Represents a Data packet.
bool hasWire() const
Check if this instance has cached wire encoding.
EncodingImpl< EncoderTag > EncodingBuffer
represents an error in TLV encoding or decoding
EncodingImpl< EstimatorTag > EncodingEstimator
Holds SignatureInfo and SignatureValue in a Data packet.
shared_ptr< const Buffer > ConstBufferPtr