69 template<encoding::Tag TAG>
170 setContent(
const uint8_t* value,
size_t valueSize);
209 const time::milliseconds&
240 mutable Block m_wire;
241 mutable Name m_fullName;
245 extern template size_t 246 Data::wireEncode<encoding::EncoderTag>(
EncodingBuffer&, bool)
const;
248 extern template size_t 261 return !(lhs == rhs);
266 #endif // NDN_DATA_HPP Error(const std::string &what)
const Block & wireEncode() const
Encode to a wire format.
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 the wire format.
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())
Create a new Data with the 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.
const name::Component & getFinalBlockId() const
bool operator!=(const Data &lhs, const Data &rhs)
Data & setFreshnessPeriod(const time::milliseconds &freshnessPeriod)
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 already has wire.
Represents an absolute name.
const time::milliseconds & getFreshnessPeriod() const
const Name & getFullName() const
Get full name including implicit digest.
Component holds a read-only name component value.
const MetaInfo & getMetaInfo() const
Get MetaInfo.
bool operator==(const Data &lhs, const Data &rhs)
Data & setMetaInfo(const MetaInfo &metaInfo)
Set MetaInfo.
Data & setFinalBlockId(const name::Component &finalBlockId)
Represents a Data packet.
uint32_t getContentType() 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