34 const std::string& module)
35 : m_dispatcher(dispatcher)
63 if (!sigInfo.hasKeyLocator() ||
68 accept(sigInfo.getKeyLocator().getName().toUri());
78 BOOST_ASSERT(dynamic_cast<const ControlParameters*>(¶meters) !=
nullptr);
81 command.
validateRequest(static_cast<const ControlParameters&>(parameters));
90 ManagerBase::handleCommand(shared_ptr<nfd::ControlCommand> command,
96 BOOST_ASSERT(dynamic_cast<const ControlParameters*>(¶ms) !=
nullptr);
98 command->applyDefaultsToRequest(parameters);
99 handler(*command, prefix, interest, parameters, done);
const Component & at(ssize_t i) const
Get component at the specified index.
represents parameters in a ControlCommand request or response
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()
Copyright (c) 2011-2015 Regents of the University of California.
Name abstraction to represent 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
void addStatusDataset(const PartialName &relPrefix, const Authorization &authorization, const StatusDatasetHandler &handler)
register a StatusDataset or a prefix under which StatusDatasets can be requested
Block blockFromValue() const
const ssize_t POS_SIG_INFO
std::function< bool(const ControlParameters ¶ms)> ValidateParameters
a function to validate input ControlParameters
ndn::mgmt::PostNotification registerNotificationStream(const std::string &verb)
represents an error in ControlParameters
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
function< void(const ControlCommand &command, const Name &prefix, const Interest &interest, const ControlParameters ¶meters, const ndn::mgmt::CommandContinuation done)> ControlCommandHandler
const Name & getName() const
std::function< void(const Name &prefix, const Interest &interest, StatusDatasetContext &context)> StatusDatasetHandler
a function to handle a StatusDataset request