30 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<FaceQueryFilter>));
34 "FaceQueryFilter::Error must inherit from tlv::Error");
43 template<encoding::Tag TAG>
47 size_t totalLength = 0;
54 if (m_facePersistency) {
81 totalLength += encoder.prependVarNumber(totalLength);
100 m_wire = buffer.block();
150 m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
158 m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
166 m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
206 m_uriScheme = uriScheme;
220 m_remoteUri = remoteUri;
234 m_localUri = localUri;
248 m_faceScope = faceScope;
264 m_facePersistency = facePersistency;
280 m_linkType = linkType;
314 os <<
"FaceQueryFilter(";
316 os <<
"FaceID: " << filter.
getFaceId() <<
",\n";
328 os <<
"LocalUri: " << filter.
getLocalUri() <<
",\n";
340 os <<
"LinkType: " << filter.
getLinkType() <<
",\n";
LinkType getLinkType() const
bool hasFaceScope() const
Copyright (c) 2011-2015 Regents of the University of California.
FaceQueryFilter & unsetLocalUri()
size_t prependNonNegativeIntegerBlock(EncodingImpl< TAG > &encoder, uint32_t type, uint64_t value)
Prepend a TLV element containing a non-negative integer.
const std::string & getLocalUri() const
FaceScope getFaceScope() const
void parse() const
Parse TLV-VALUE into sub-elements.
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ChannelStatus)
Represents a TLV element of the NDN packet format.
const std::string & getRemoteUri() const
size_t prependStringBlock(EncodingImpl< TAG > &encoder, uint32_t type, const std::string &value)
Prepend a TLV element containing a string.
bool hasWire() const noexcept
Check if the Block contains a fully encoded wire representation.
std::string readString(const Block &block)
Read TLV-VALUE of a TLV element as a string.
element_const_iterator elements_begin() const
Equivalent to elements().begin()
bool hasRemoteUri() const
uint64_t readNonNegativeInteger(const Block &block)
Read a non-negative integer from a TLV element.
FaceQueryFilter & unsetFaceScope()
FaceQueryFilter & setLocalUri(const std::string &localUri)
element_const_iterator elements_end() const
Equivalent to elements().end()
bool hasUriScheme() const
Copyright (c) 2011-2015 Regents of the University of California.
void reset() noexcept
Reset the Block to a default-constructed state.
uint64_t getFaceId() const
bool operator==(const ChannelStatus &a, const ChannelStatus &b)
const Block & wireEncode() const
encode FaceQueryFilter
FaceQueryFilter & setFaceScope(FaceScope faceScope)
FaceQueryFilter & unsetFaceId()
std::ostream & operator<<(std::ostream &os, FaceScope faceScope)
FaceQueryFilter & setUriScheme(const std::string &uriScheme)
FaceQueryFilter & unsetFacePersistency()
represents Face Query Filter
FaceQueryFilter & unsetUriScheme()
FaceQueryFilter & unsetRemoteUri()
FaceQueryFilter & setRemoteUri(const std::string &remoteUri)
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
FaceQueryFilter & setFaceId(uint64_t faceId)
const std::string & getUriScheme() const
FaceQueryFilter & setLinkType(LinkType linkType)
FaceQueryFilter & setFacePersistency(FacePersistency facePersistency)
FacePersistency getFacePersistency() const
a concept check for TLV abstraction with .wireEncode method
bool hasFacePersistency() const
void wireDecode(const Block &wire)
decode FaceQueryFilter
a concept check for TLV abstraction with .wireDecode method and constructible from Block ...
EncodingImpl< EncoderTag > EncodingBuffer
const nullopt_t nullopt((nullopt_t::init()))
EncodingImpl< EstimatorTag > EncodingEstimator
FaceQueryFilter & unsetLinkType()