39 class Data :
public TagHost,
public enable_shared_from_this<Data>
100 template<encoding::Tag TAG>
200 const time::milliseconds&
237 setContent(
const uint8_t* buffer,
size_t bufferSize);
288 #ifdef NDN_LP_KEEP_LOCAL_CONTROL_HEADER 293 getLocalControlHeader());
299 getLocalControlHeader()
const);
305 getIncomingFaceId()
const);
311 setIncomingFaceId(uint64_t incomingFaceId));
317 getCachingPolicy()
const);
324 #endif // NDN_LP_KEEP_LOCAL_CONTROL_HEADER 343 mutable Block m_content;
346 mutable Block m_wire;
347 mutable Name m_fullName;
356 return m_wire.hasWire();
374 return m_metaInfo.getType();
377 inline const time::milliseconds&
380 return m_metaInfo.getFreshnessPeriod();
386 return m_metaInfo.getFinalBlockId();
Error(const std::string &what)
const Block & wireEncode() const
Encode to a wire format.
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.
const Block & getContent() const
Get content Block.
Data()
Create an empty Data object.
Data & setSignature(const Signature &signature)
Set the signature to a copy of the given signature.
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.
const Name & getName() const
Get name of the Data packet.
const name::Component & getFinalBlockId() const
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.
bool operator!=(const Data &other) const
bool operator==(const Data &other) const
Copyright (c) 2013-2015 Regents of the University of California.
Data & setFreshnessPeriod(const time::milliseconds &freshnessPeriod)
void onChanged()
Clear the wire encoding.
Data & setSignatureValue(const Block &value)
EncodingImpl< EncoderTag > EncodingBuffer
bool hasWire() const
Check if Data is already has wire encoding.
const MetaInfo & getMetaInfo() const
Get MetaInfo block from Data packet.
Name abstraction to represent an absolute name.
const Name & getFullName() const
Get full name of Data packet, including the implicit digest.
const time::milliseconds & getFreshnessPeriod() const
DEPRECATED(lp::LocalControlHeaderFacade getLocalControlHeader())
Component holds a read-only name component value.
Data & setMetaInfo(const MetaInfo &metaInfo)
Set metaInfo to a copy of the given MetaInfo.
const Signature & getSignature() const
shared_ptr< const Buffer > ConstBufferPtr
Data & setFinalBlockId(const name::Component &finalBlockId)
uint32_t getContentType() const
represents an error in TLV encoding or decoding
A Signature is storage for the signature-related information (info and value) in a Data packet...