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));
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);
const Name & getName() const
Represents a SignatureInfo TLV element.
represents parameters in a ControlCommand request or response
Accept any value the remote endpoint offers.
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
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
ManagerBase(Dispatcher &dispatcher, const std::string &module)
represents an Interest packet
std::function< void(const std::string &requester)> AcceptContinuation
a function to be called if authorization is successful
indicates KeyLocator contains a Name
Authorization makeAcceptAllAuthorization()
Block blockFromValue() const
Copyright (c) 2011-2015 Regents of the University of California.
Represents an absolute name.
const Component & at(ssize_t i) const
Get the component at the given index.
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
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
std::function< void(const Name &prefix, const Interest &interest, StatusDatasetContext &context)> StatusDatasetHandler
a function to handle a StatusDataset request