|
| Link ()=default |
| Create an empty Link object. More...
|
|
| Link (const Block &block) |
| Create a Link object from a Block. More...
|
|
| Link (const Name &name) |
| Create a Link object with the given name. More...
|
|
| Link (const Name &name, std::initializer_list< std::pair< uint32_t, Name >> links) |
| Create a Link object with the given name and pairs of <Preference, Name> More...
|
|
void | addDelegation (uint32_t preference, const Name &name) |
| Add a delegation in the format of <Name, Preference> More...
|
|
bool | removeDelegation (const Name &name) |
| Remove a delegation whose name is name . More...
|
|
const DelegationSet & | getDelegations () const |
| Get the pairs of <Name, Preference> More...
|
|
void | wireDecode (const Block &wire) |
| Decode from the wire format. More...
|
|
template<encoding::Tag TAG> |
size_t | wireEncode (EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const |
| Fast encoding or block size estimation. More...
|
|
const Block & | wireEncode () const |
| Encode to a wire format. More...
|
|
const Block & | wireEncode (EncodingBuffer &encoder, const Block &signatureValue) const |
| Finalize Data packet encoding with the specified SignatureValue. More...
|
|
bool | hasWire () const |
| Check if Data is already has wire encoding. More...
|
|
const Name & | getName () const |
| Get name of the Data packet. More...
|
|
Data & | setName (const Name &name) |
| Set name to a copy of the given Name. More...
|
|
const Name & | getFullName () const |
| Get full name of Data packet, including the implicit digest. More...
|
|
const MetaInfo & | getMetaInfo () const |
| Get MetaInfo block from Data packet. More...
|
|
Data & | setMetaInfo (const MetaInfo &metaInfo) |
| Set metaInfo to a copy of the given MetaInfo. More...
|
|
uint32_t | getContentType () const |
|
Data & | setContentType (uint32_t type) |
|
const time::milliseconds & | getFreshnessPeriod () const |
|
Data & | setFreshnessPeriod (const time::milliseconds &freshnessPeriod) |
|
const name::Component & | getFinalBlockId () const |
|
Data & | setFinalBlockId (const name::Component &finalBlockId) |
|
const Block & | getContent () const |
| Get content Block. More...
|
|
Data & | setContent (const uint8_t *buffer, size_t bufferSize) |
| Set the content from the buffer (buffer will be copied) More...
|
|
Data & | setContent (const Block &block) |
| Set the content from the block. More...
|
|
Data & | setContent (const ConstBufferPtr &contentValue) |
| Set the content from the pointer to immutable buffer. More...
|
|
const Signature & | getSignature () const |
|
Data & | setSignature (const Signature &signature) |
| Set the signature to a copy of the given signature. More...
|
|
Data & | setSignatureValue (const Block &value) |
|
bool | operator== (const Data &other) const |
|
bool | operator!= (const Data &other) const |
|
template<typename T > |
shared_ptr< T > | getTag () const |
| get a tag item More...
|
|
template<typename T > |
void | setTag (shared_ptr< T > tag) const |
| set a tag item More...
|
|
template<typename T > |
void | removeTag () const |
| remove tag item More...
|
|
represents a Link instance
Definition at line 34 of file link.hpp.
Create an empty Link object.
Note that in certain contexts that use Link::shared_from_this(), Link must be created using make_shared
:
shared_ptr<Link> linkObject = make_shared<Link>();
Otherwise, Link::shared_from_this() will throw std::bad_weak_ptr.
ndn::Link::Link |
( |
const Block & |
block | ) |
|
|
explicit |
Create a Link object from a Block.
Note that in certain contexts that use Link::shared_from_this(), Link must be created using make_shared
:
shared_ptr<Link> linkObject = make_shared<Link>(block);
Otherwise, Link::shared_from_this() will throw std::bad_weak_ptr.
Definition at line 41 of file link.cpp.
ndn::Link::Link |
( |
const Name & |
name | ) |
|
|
explicit |
Create a Link object with the given name.
- Parameters
-
name | A reference to the name of the redirected namespace |
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);
Otherwise, Link::shared_from_this() will throw std::bad_weak_ptr.
Definition at line 46 of file link.cpp.
ndn::Link::Link |
( |
const Name & |
name, |
|
|
std::initializer_list< std::pair< uint32_t, Name >> |
links |
|
) |
| |
Create a Link object with the given name and pairs of <Preference, Name>
- Parameters
-
name | A reference to the name of the redirected namespace |
links | A reference to the list of pairs of the redirected namespace along with its priority |
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, links);
Otherwise, Link::shared_from_this() will throw std::bad_weak_ptr.
Definition at line 51 of file link.cpp.
const Block & ndn::Data::wireEncode |
( |
EncodingBuffer & |
encoder, |
|
|
const Block & |
signatureValue |
|
) |
| const |
|
inherited |
Finalize Data packet encoding with the specified SignatureValue.
- Parameters
-
encoder | EncodingBuffer instance, containing Name, MetaInfo, Content, and SignatureInfo (without outer TLV header of the Data packet). |
signatureValue | SignatureValue block to be added to Data packet to finalize the wire encoding |
This method is intended to be used in concert with Data::wireEncode(EncodingBuffer&, true) method to optimize Data packet wire format creation:
Data data;
...
EncodingBuffer encoder;
data.wireEncode(encoder, true);
...
Block signatureValue = <sign_over_unsigned_portion>(encoder.buf(), encoder.size());
data.wireEncode(encoder, signatureValue)
Definition at line 106 of file data.cpp.