39 class Data :
public TagHost,
public enable_shared_from_this<Data>
100 template<encoding::Tag TAG>
102 wireEncode(EncodingImpl<TAG>& encoder,
bool wantUnsignedPortionOnly =
false)
const;
200 const time::milliseconds&
237 setContent(
const uint8_t* buffer,
size_t bufferSize);
323 mutable Block m_content;
326 mutable Block m_wire;
327 mutable Name m_fullName;
339 return m_wire.hasWire();
357 return m_metaInfo.getType();
360 inline const time::milliseconds&
363 return m_metaInfo.getFreshnessPeriod();
369 return m_metaInfo.getFinalBlockId();
381 return m_localControlHeader;
387 return m_localControlHeader;
Error(const std::string &what)
Data & setContentType(uint32_t type)
Copyright (c) 2011-2015 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.
Copyright (c) 2013-2014 Regents of the University of California.
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.
nfd::LocalControlHeader::CachingPolicy getCachingPolicy() const
const Signature & getSignature() const
Component holds a read-only name component value.
uint64_t getIncomingFaceId() const
const Block & getContent() const
Get content Block.
bool operator==(const Data &other) const
Data & setMetaInfo(const MetaInfo &metaInfo)
Set metaInfo to a copy of the given MetaInfo.
Data & setIncomingFaceId(uint64_t incomingFaceId)
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.
nfd::LocalControlHeader & getLocalControlHeader()
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...
Data & setCachingPolicy(nfd::LocalControlHeader::CachingPolicy cachingPolicy)