#include <manager-base.hpp>
Classes | |
struct | Error |
Public Member Functions | |
ManagerBase (shared_ptr< InternalFace > face, const std::string &privilege, ndn::KeyChain &keyChain) | |
virtual | ~ManagerBase () |
void | onCommandValidationFailed (const shared_ptr< const Interest > &command, const std::string &error) |
Protected Member Functions | |
void | setResponse (ControlResponse &response, uint32_t code, const std::string &text) |
void | setResponse (ControlResponse &response, uint32_t code, const std::string &text, const Block &body) |
void | sendResponse (const Name &name, const ControlResponse &response) |
void | sendResponse (const Name &name, uint32_t code, const std::string &text) |
void | sendResponse (const Name &name, uint32_t code, const std::string &text, const Block &body) |
void | sendNack (const Name &name) |
virtual bool | validateParameters (const ControlCommand &command, ControlParameters ¶meters) |
void | addInterestRule (const std::string ®ex, const ndn::IdentityCertificate &certificate) |
void | addInterestRule (const std::string ®ex, const Name &keyName, const ndn::PublicKey &publicKey) |
void | validate (const Interest &interest, const ndn::OnInterestValidated &onValidated, const ndn::OnInterestValidationFailed &onValidationFailed) |
Static Protected Member Functions | |
static bool | extractParameters (const Name::Component ¶meterComponent, ControlParameters &extractedParameters) |
Protected Attributes | |
shared_ptr< InternalFace > | m_face |
ndn::KeyChain & | m_keyChain |
Definition at line 46 of file manager-base.hpp.
nfd::ManagerBase::ManagerBase | ( | shared_ptr< InternalFace > | face, |
const std::string & | privilege, | ||
ndn::KeyChain & | keyChain | ||
) |
Definition at line 33 of file manager-base.cpp.
Referenced by nfd::ManagerBase::Error::Error().
|
virtual |
Definition at line 41 of file manager-base.cpp.
Referenced by nfd::ManagerBase::Error::Error().
void nfd::ManagerBase::onCommandValidationFailed | ( | const shared_ptr< const Interest > & | command, |
const std::string & | error | ||
) |
Definition at line 136 of file manager-base.cpp.
References NFD_LOG_DEBUG, and sendResponse().
Referenced by nfd::ManagerBase::Error::Error(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), and nfd::StrategyChoiceManager::onStrategyChoiceRequest().
|
staticprotected |
Definition at line 47 of file manager-base.cpp.
References ndn::Block::blockFromValue(), NFD_LOG_DEBUG, and ndn::nfd::ControlParameters::wireDecode().
Referenced by nfd::ManagerBase::Error::Error(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), and nfd::StrategyChoiceManager::onStrategyChoiceRequest().
|
inlineprotected |
Definition at line 125 of file manager-base.hpp.
Referenced by nfd::ManagerBase::Error::Error(), nfd::FibManager::onFibRequest(), nfd::StrategyChoiceManager::onStrategyChoiceRequest(), and setResponse().
|
inlineprotected |
Definition at line 134 of file manager-base.hpp.
References setResponse().
|
protected |
Definition at line 85 of file manager-base.cpp.
References m_face, m_keyChain, and NFD_LOG_DEBUG.
Referenced by nfd::ManagerBase::Error::Error(), onCommandValidationFailed(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), nfd::StrategyChoiceManager::onStrategyChoiceRequest(), and sendResponse().
|
protected |
Definition at line 65 of file manager-base.cpp.
References sendResponse().
|
protected |
Definition at line 74 of file manager-base.cpp.
References sendResponse().
|
protected |
Definition at line 103 of file manager-base.cpp.
References ndn::tlv::ContentType_Nack, m_face, m_keyChain, NFD_LOG_DEBUG, and ndn::MetaInfo::setType().
Referenced by nfd::ManagerBase::Error::Error(), and nfd::FaceManager::onFaceRequest().
|
protectedvirtual |
Definition at line 118 of file manager-base.cpp.
References ndn::nfd::ControlCommand::applyDefaultsToRequest(), and ndn::nfd::ControlCommand::validateRequest().
Referenced by nfd::ManagerBase::Error::Error(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), and nfd::StrategyChoiceManager::onStrategyChoiceRequest().
|
inlineprotected |
Definition at line 144 of file manager-base.hpp.
References m_face.
Referenced by nfd::ManagerBase::Error::Error().
|
inlineprotected |
Definition at line 151 of file manager-base.hpp.
References m_face.
|
inlineprotected |
Definition at line 159 of file manager-base.hpp.
References m_face.
Referenced by nfd::ManagerBase::Error::Error(), nfd::FaceManager::onFaceRequest(), nfd::FibManager::onFibRequest(), and nfd::StrategyChoiceManager::onStrategyChoiceRequest().
|
protected |
Definition at line 120 of file manager-base.hpp.
Referenced by addInterestRule(), nfd::FaceManager::onFaceRequest(), sendNack(), sendResponse(), and validate().
|
protected |
Definition at line 121 of file manager-base.hpp.
Referenced by nfd::FaceManager::onFaceRequest(), sendNack(), and sendResponse().