41 using tlv::Error::Error;
67 template<encoding::Tag TAG>
173 setContent(
const uint8_t* value,
size_t valueSize);
221 const optional<name::Component>&
243 mutable Block m_wire;
244 mutable Name m_fullName;
248 extern template size_t 249 Data::wireEncode<encoding::EncoderTag>(
EncodingBuffer&,
bool)
const;
251 extern template size_t 264 return !(lhs == rhs);
269 #endif // NDN_DATA_HPP const Block & wireEncode() const
Encode to a Block.
bool hasWire() const
Check if the Block has fully encoded wire.
Data & setContentType(uint32_t type)
Copyright (c) 2011-2015 Regents of the University of California.
const Name & getName() const
Get name.
void wireDecode(const Block &wire)
Decode from wire in NDN Packet Format v0.2 or v0.3.
const Block & getContent() const
Get Content.
Data & setSignature(const Signature &signature)
Set Signature.
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.
void resetWire()
Clear wire encoding and cached FullName.
Represents a TLV element of NDN packet format.
bool operator!=(const Data &lhs, const Data &rhs)
Data & setSignatureValue(const Block &value)
Set SignatureValue.
const Signature & getSignature() const
Get Signature.
base class to allow simple management of packet tags
bool hasWire() const
Check if this instance has cached wire encoding.
Represents an absolute name.
const Name & getFullName() const
Get full name including implicit digest.
Data & setFreshnessPeriod(time::milliseconds freshnessPeriod)
Data & setFinalBlock(optional< name::Component > finalBlockId)
const MetaInfo & getMetaInfo() const
Get MetaInfo.
bool operator==(const Data &lhs, const Data &rhs)
Data & setMetaInfo(const MetaInfo &metaInfo)
Set MetaInfo.
time::milliseconds getFreshnessPeriod() const
Represents a Data packet.
uint32_t getContentType() const
const optional< name::Component > & getFinalBlock() const
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