represents a Link object More...
#include <ndn-cxx/link.hpp>
Inheritance diagram for ndn::Link:
Collaboration diagram for ndn::Link:Classes | |
| class | Error |
Public Member Functions | |
| Link () | |
| Create an empty Link object. More... | |
| Link (const Block &wire, bool wantSort=true) | |
| Decode a Link object from a Block. More... | |
| Link (const Name &name, std::initializer_list< Delegation > dels={}) | |
| Create a Link object with the given name and delegations. More... | |
| void | addDelegation (uint32_t preference, const Name &name) |
| Add a delegation in the format of <Name, Preference> More... | |
| uint64_t | getCongestionMark () const |
| get the value of the CongestionMark tag More... | |
| const Block & | getContent () const |
| Get Content. More... | |
| uint32_t | getContentType () const |
| const DelegationList & | getDelegationList () const |
| Get the delegations. More... | |
| const optional< name::Component > & | getFinalBlock () const |
| time::milliseconds | getFreshnessPeriod () const |
| const Name & | getFullName () const |
| Get full name including implicit digest. More... | |
| const MetaInfo & | getMetaInfo () const |
| Get MetaInfo. More... | |
| const Name & | getName () const |
| Get name. More... | |
| const Signature & | getSignature () const |
| Get Signature. More... | |
| template<typename T > | |
| shared_ptr< T > | getTag () const |
| get a tag item More... | |
| bool | hasWire () const |
| Check if this instance has cached wire encoding. More... | |
| bool | removeDelegation (const Name &name) |
Remove a delegation whose name is name. More... | |
| template<typename T > | |
| void | removeTag () const |
| remove tag item More... | |
| void | setCongestionMark (uint64_t mark) |
| set the CongestionMark tag to the specified value More... | |
| Data & | setContent (const Block &block) |
| Set Content from a block. More... | |
| Data & | setContent (const uint8_t *value, size_t valueSize) |
| Copy Content value from raw buffer. More... | |
| Data & | setContent (ConstBufferPtr value) |
| Set Content from wire buffer. More... | |
| Data & | setContentType (uint32_t type) |
| void | setDelegationList (const DelegationList &dels) |
| Set the delegations. More... | |
| Data & | setFinalBlock (optional< name::Component > finalBlockId) |
| Data & | setFreshnessPeriod (time::milliseconds freshnessPeriod) |
| Data & | setMetaInfo (const MetaInfo &metaInfo) |
| Set MetaInfo. More... | |
| Data & | setName (const Name &name) |
| Set name. More... | |
| Data & | setSignature (const Signature &signature) |
| Set Signature. More... | |
| Data & | setSignatureValue (const Block &value) |
| Set SignatureValue. More... | |
| template<typename T > | |
| void | setTag (shared_ptr< T > tag) const |
| set a tag item More... | |
| void | wireDecode (const Block &wire, bool wantSort=true) |
| Decode from the wire format. More... | |
| void | wireDecode (const Block &wire) |
Decode from wire in NDN Packet Format v0.2 or v0.3. More... | |
| template<encoding::Tag TAG> | |
| size_t | wireEncode (EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const |
Prepend wire encoding to encoder in NDN Packet Format v0.2. More... | |
| const Block & | wireEncode (EncodingBuffer &encoder, const Block &signatureValue) const |
| Finalize Data packet encoding with the specified SignatureValue. More... | |
| const Block & | wireEncode () const |
Encode to a Block. More... | |
Protected Member Functions | |
| void | resetWire () |
| Clear wire encoding and cached FullName. More... | |
|
default |
|
explicit |
|
explicit |
Create a Link object with the given name and delegations.
| name | A reference to the name of the redirected namespace |
| dels | Delegations in payload |
Note that in certain contexts that use Link::shared_from_this(), Link must be created using make_shared:
shared_ptr<Link> link = make_shared<Link>(name, dels);
| void ndn::Link::addDelegation | ( | uint32_t | preference, |
| const Name & | name | ||
| ) |
|
inherited |
get the value of the CongestionMark tag
Definition at line 28 of file packet-base.cpp.
|
inherited |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
get a tag item
| T | type of the tag, which must be a subclass of ndn::Tag |
| nullptr | if no Tag of type T is stored |
Definition at line 66 of file tag-host.hpp.
|
inlineinherited |
| bool ndn::Link::removeDelegation | ( | const Name & | name | ) |
|
inherited |
remove tag item
Definition at line 93 of file tag-host.hpp.
|
protectedinherited |
|
inherited |
set the CongestionMark tag to the specified value
Definition at line 41 of file packet-base.cpp.
|
inherited |
|
inherited |
|
inherited |
| void ndn::Link::setDelegationList | ( | const DelegationList & | dels | ) |
|
inherited |
|
inherited |
|
inherited |
set a tag item
| T | type of the tag, which must be a subclass of ndn::Tag |
Definition at line 79 of file tag-host.hpp.
| void ndn::Link::wireDecode | ( | const Block & | wire, |
| bool | wantSort = true |
||
| ) |
|
inherited |
|
inherited |
Prepend wire encoding to encoder in NDN Packet Format v0.2.
| encoder | EncodingEstimator or EncodingBuffer instance |
| wantUnsignedPortionOnly | If true, only prepends Name, MetaInfo, Content, and SignatureInfo to encoder, but omit SignatureValue and outmost Type-Length of Data element. This is intended to be used with wireEncode(encoder, signatureValue). |
| Error | SignatureBits are not provided and wantUnsignedPortionOnly is false. |
|
inherited |
Finalize Data packet encoding with the specified SignatureValue.
| encoder | EncodingBuffer containing Name, MetaInfo, Content, and SignatureInfo, but without SignatureValue or outmost Type-Length of Data element |
| signatureValue | SignatureValue element |
This method is intended to be used in concert with Data::wireEncode(encoder, true)
|
inherited |