37 class Data :
public TagHost,
public enable_shared_from_this<Data>
98 template<encoding::Tag TAG>
100 wireEncode(EncodingImpl<TAG>& encoder,
bool wantUnsignedPortionOnly =
false)
const;
198 const time::milliseconds&
235 setContent(
const uint8_t* buffer,
size_t bufferSize);
301 mutable Block m_content;
304 mutable Block m_wire;
305 mutable Name m_fullName;
335 inline const time::milliseconds&
Error(const std::string &what)
Data & setContentType(uint32_t type)
Copyright (c) 2013-2016 Regents of the University of California.
void wireDecode(const Block &wire)
Decode from the wire format.
Data()
Create an empty Data object.
Data & setSignature(const Signature &signature)
Set the signature to a copy of the given signature.
uint32_t getContentType() const
Base class to store tag information (e.g., inside Interest and Data packets)
Data & setName(const Name &name)
Set name to a copy of the given Name.
std::ostream & operator<<(std::ostream &os, const Data &data)
Data & setContent(const uint8_t *buffer, size_t bufferSize)
Set the content from the buffer (buffer will be copied)
Class representing a wire element of NDN-TLV packet format.
const MetaInfo & getMetaInfo() const
Get MetaInfo block from Data packet.
bool operator!=(const Data &other) const
Data & setFreshnessPeriod(const time::milliseconds &freshnessPeriod)
const Name & getName() const
Get name of the Data packet.
void onChanged()
Clear the wire encoding.
Data & setSignatureValue(const Block &value)
EncodingImpl< EncoderTag > EncodingBuffer
const name::Component & getFinalBlockId() const
Name abstraction to represent an absolute name.
const Block & wireEncode() const
Encode to a wire format.
const Signature & getSignature() const
Component holds a read-only name component value.
const Block & getContent() const
Get content Block.
bool operator==(const Data &other) const
bool hasWire() const
Check if the Block has fully encoded wire.
Data & setMetaInfo(const MetaInfo &metaInfo)
Set metaInfo to a copy of the given MetaInfo.
shared_ptr< const Buffer > ConstBufferPtr
const Name & getFullName() const
Get full name of Data packet, including the implicit digest.
Data & setFinalBlockId(const name::Component &finalBlockId)
bool hasWire() const
Check if Data is already has wire encoding.
represents an error in TLV encoding or decoding
const time::milliseconds & getFreshnessPeriod() const
A Signature is storage for the signature-related information (info and value) in a Data packet...