34 : m_dispatcher(dispatcher)
64 if (!sigInfo.hasKeyLocator() ||
69 accept(sigInfo.getKeyLocator().getName().toUri());
79 BOOST_ASSERT(dynamic_cast<const ControlParameters*>(¶meters) !=
nullptr);
82 command.
validateRequest(static_cast<const ControlParameters&>(parameters));
84 catch (
const ControlCommand::ArgumentError&) {
91 ManagerBase::handleCommand(shared_ptr<nfd::ControlCommand> command,
97 BOOST_ASSERT(dynamic_cast<const ControlParameters*>(¶ms) !=
nullptr);
99 command->applyDefaultsToRequest(parameters);
100 handler(*command, prefix, interest, parameters, done);
Represents a SignatureInfo TLV element.
std::function< void(const Block ¬ification)> PostNotification
a function to post a notification
represents a dispatcher on server side of NFD Management protocol
void extractRequester(const Interest &interest, ndn::mgmt::AcceptContinuation accept)
extract a requester from a ControlCommand request
base class of NFD ControlCommand
ManagerBase(Dispatcher &dispatcher, const std::string &module)
Represents an Interest packet.
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
std::function< void(const std::string &requester)> AcceptContinuation
a function to be called if authorization is successful
indicates KeyLocator contains a Name
Authorization makeAcceptAllAuthorization()
return an Authorization that accepts all Interests, with empty string as requester
const Component & at(ssize_t i) const
Get the component at the given index.
Copyright (c) 2011-2015 Regents of the University of California.
Represents an absolute name.
std::function< void(const ControlResponse &resp)> CommandContinuation
a function to be called after ControlCommandHandler completes
base class for a struct that contains ControlCommand parameters
std::function< void(const Name &prefix, const Interest &interest, const ControlParameters ¶ms, const CommandContinuation &done)> ControlCommandHandler
a function to handle an authorized ControlCommand
Block blockFromValue() const
const ssize_t POS_SIG_INFO
std::function< bool(const ControlParameters ¶ms)> ValidateParameters
a function to validate input ControlParameters
void addStatusDataset(const PartialName &relPrefix, Authorization authorize, StatusDatasetHandler handle)
register a StatusDataset or a prefix under which StatusDatasets can be requested
ndn::mgmt::PostNotification registerNotificationStream(const std::string &verb)
std::function< void(const Name &prefix, const Interest &interest, const ControlParameters *params, const AcceptContinuation &accept, const RejectContinuation &reject)> Authorization
a function that performs authorization
void registerStatusDatasetHandler(const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler)
represents an error in TLV encoding or decoding
PostNotification addNotificationStream(const PartialName &relPrefix)
register a NotificationStream
const Name & getName() const
std::function< void(const Name &prefix, const Interest &interest, StatusDatasetContext &context)> StatusDatasetHandler
a function to handle a StatusDataset request