53 std::optional<uint64_t> version,
58 " is not a valid discovery Interest name"));
63 Data data(discoveryInterestName);
66 keyChain.
sign(data, si);
74 m_versionedName = name;
89 name[-2].isVersion() && name[-1].isSegment();
97 .setMustBeFresh(
true);
void parse() const
Parse TLV-VALUE into sub-elements.
const Block & get(uint32_t type) const
Return the first sub-element of the specified TLV-TYPE.
size_t value_size() const noexcept
Return the size of TLV-VALUE, i.e., the TLV-LENGTH.
Represents a Data packet.
Data & setContent(const Block &block)
Set Content from a Block.
Data & setFreshnessPeriod(time::milliseconds freshnessPeriod)
Set the FreshnessPeriod.
uint32_t getContentType() const noexcept
Return the value of ContentType.
const Name & getName() const noexcept
Get the Data name.
const Block & getContent() const noexcept
Get the Content element.
Represents an Interest packet.
Represents an absolute name.
Name & appendSegment(uint64_t segmentNo)
Append a segment number (sequential) component.
Name & appendVersion(const std::optional< uint64_t > &version=std::nullopt)
Append a version component.
size_t size() const noexcept
Returns the number of components.
bool empty() const noexcept
Checks if the name is empty, i.e., has no components.
Name & append(const Component &component)
Append a name component.
size_t wireEncode(EncodingImpl< TAG > &encoder) const
Prepend wire encoding to encoder.
void toUri(std::ostream &os, name::UriFormat format=name::UriFormat::DEFAULT) const
Write URI representation of the name to the output stream.
void wireDecode(const Block &wire)
Decode name from wire encoding.
Represents a name component.
The main interface for signing key management.
void sign(Data &data, const SigningInfo ¶ms=SigningInfo())
Sign a Data packet according to the supplied signing information.
Signing parameters passed to KeyChain.
std::string to_string(const errinfo_stacktrace &x)
::boost::chrono::milliseconds milliseconds
@ ContentType_Blob
payload