Public Member Functions | Static Public Member Functions | List of all members
ndn::KeyLocatorLite Class Reference

A KeyLocatorLite holds a type and other info to represent the key which signs a Data packet. More...

#include <key-locator-lite.hpp>

Inheritance diagram for ndn::KeyLocatorLite:
ndn_KeyLocator

Public Member Functions

 KeyLocatorLite (ndn_NameComponent *keyNameComponents, size_t maxKeyNameComponents)
 Create a KeyLocatorLite with the pre-allocated nameComponents, and defaults for all the values. More...
 
ndn_KeyLocatorType getType () const
 
const BlobLitegetKeyData () const
 
NameLitegetKeyName ()
 
const NameLitegetKeyName () const
 
ndn_Error setKeyName (const NameLite &keyName)
 Set this object's key name to have the values from the given keyName. More...
 
void setType (ndn_KeyLocatorType type)
 
void setKeyData (const BlobLite &keyData)
 Set the key data. More...
 
ndn_Error set (const KeyLocatorLite &other)
 Set this key locator to have the values from the other key locator. More...
 

Static Public Member Functions

static KeyLocatorLitedownCast (ndn_KeyLocator &keyLocator)
 Downcast the reference to the ndn_KeyLocator struct to a KeyLocatorLite. More...
 
static const KeyLocatorLitedownCast (const ndn_KeyLocator &keyLocator)
 

Detailed Description

A KeyLocatorLite holds a type and other info to represent the key which signs a Data packet.

Constructor & Destructor Documentation

ndn::KeyLocatorLite::KeyLocatorLite ( ndn_NameComponent keyNameComponents,
size_t  maxKeyNameComponents 
)

Create a KeyLocatorLite with the pre-allocated nameComponents, and defaults for all the values.

Parameters
keyNameComponentsThe pre-allocated array of ndn_NameComponent. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily.
maxKeyNameComponentsThe number of elements in the allocated keyNameComponents array.

Member Function Documentation

static KeyLocatorLite& ndn::KeyLocatorLite::downCast ( ndn_KeyLocator keyLocator)
inlinestatic

Downcast the reference to the ndn_KeyLocator struct to a KeyLocatorLite.

Parameters
keyLocatorA reference to the ndn_KeyLocator struct.
Returns
The same reference as KeyLocatorLite.
ndn_Error ndn::KeyLocatorLite::set ( const KeyLocatorLite other)

Set this key locator to have the values from the other key locator.

Parameters
otherThe other KeyLocatorLite to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's keyName components array.
void ndn::KeyLocatorLite::setKeyData ( const BlobLite keyData)
inline

Set the key data.

Parameters
keyDataThe key data. This does not copy the bytes of the blob.
ndn_Error ndn::KeyLocatorLite::setKeyName ( const NameLite keyName)
inline

Set this object's key name to have the values from the given keyName.

Parameters
keyNameThe key name to get values from.
Returns
0 for success, or an error code if there is not enough room in this object's keyName components array.

The documentation for this class was generated from the following files: