This was a result of the review.
/// command handlers for the control API.
///
/// The command handlers are registered by a hook library by calling
-/// @ref isc::hooks::LibraryHandle::registerCommandHandler. This call
+/// @ref isc::hooks::LibraryHandle::registerCommandCallout. This call
/// creates a hook point for this command (if one doesn't exist) and then
/// registeres the specified handler(s). When the @ref HookedCommandMgr
/// receives a command for processing it calls the
TEST_F(CommandMgrTest, delegateProcessCommand) {
// Register callout so as we can check that it is called before
// processing the command by the manager.
- HooksManager::preCalloutsLibraryHandle().registerCommandHandler(
+ HooksManager::preCalloutsLibraryHandle().registerCommandCallout(
"my-command", control_command_receive_handle_callout);
// Install local handler
TEST_F(CommandMgrTest, delegateListCommands) {
// Register callout so as we can check that it is called before
// processing the command by the manager.
- HooksManager::preCalloutsLibraryHandle().registerCommandHandler(
+ HooksManager::preCalloutsLibraryHandle().registerCommandCallout(
"my-command", control_command_receive_handle_callout);
// Create my-command-bis which is unique for the local Command Manager,
///
/// The @ref CalloutManager::registerCommandHook has been added to allow for
/// dynamically creating hook points for which command handlers are registered.
-/// This method is called from the @ref LibraryHandle::registerCommandHandler
+/// This method is called from the @ref LibraryHandle::registerCommandCallout
/// as a result of registering the command handlers by the hook library in
/// its @c load() function. If the hook point for the given command already
/// exists, this function doesn't do anything. The
-/// @ref LibraryHandle::registerCommandHandler can install callouts on this
+/// @ref LibraryHandle::registerCommandCallout can install callouts on this
/// hook point.
///
/// Note that the callout functions do not access the CalloutManager: instead,
}
void
-LibraryHandle::registerCommandHandler(const std::string& command_name,
+LibraryHandle::registerCommandCallout(const std::string& command_name,
CalloutPtr callout) {
// Register hook point for this command, if one doesn't exist.
callout_manager_->registerCommandHook(command_name);
/// handler similarly to this:
/// @code
/// int load(LibraryHandle& libhandle) {
-/// libhandle.registerCommandHandler("foo-bar", foo_bar_handler);
+/// libhandle.registerCommandCallout("foo-bar", foo_bar_handler);
/// return (0);
/// }
/// @endcode
///
/// @param command_name Command name for which handler should be installed.
/// @param callout Pointer to the command handler implemented as a callout.
- void registerCommandHandler(const std::string& command_name, CalloutPtr callout);
+ void registerCommandCallout(const std::string& command_name, CalloutPtr callout);
/// @brief De-Register a callout on a hook
///
// 'command-two' should also be called.
getCalloutManager()->setLibraryIndex(0);
- getCalloutManager()->getLibraryHandle().registerCommandHandler("command-one",
+ getCalloutManager()->getLibraryHandle().registerCommandCallout("command-one",
callout_one);
- getCalloutManager()->getLibraryHandle().registerCommandHandler("command-one",
+ getCalloutManager()->getLibraryHandle().registerCommandCallout("command-one",
callout_four);
getCalloutManager()->setLibraryIndex(1);
- getCalloutManager()->getLibraryHandle().registerCommandHandler("command-one",
+ getCalloutManager()->getLibraryHandle().registerCommandCallout("command-one",
callout_two);
- getCalloutManager()->getLibraryHandle().registerCommandHandler("command-two",
+ getCalloutManager()->getLibraryHandle().registerCommandCallout("command-two",
callout_three);
// Command handlers are installed for commands: 'command-one' and 'command-two'.
handle.registerCallout("hookpt_three", hook_nonstandard_three);
// Register command_handler_one as control command handler.
- handle.registerCommandHandler("command-one", command_handler_one);
- handle.registerCommandHandler("command-two", command_handler_two);
+ handle.registerCommandCallout("command-one", command_handler_one);
+ handle.registerCommandCallout("command-two", command_handler_two);
return (0);
}
handle.registerCallout("hookpt_three", hook_nonstandard_three);
// Register command_handler_one as control command handler.
- handle.registerCommandHandler("command-one", command_handler_one);
- handle.registerCommandHandler("command-two", command_handler_two);
+ handle.registerCommandCallout("command-one", command_handler_one);
+ handle.registerCommandCallout("command-two", command_handler_two);
return (0);
}