7#ifndef CALLOUT_MANAGER_H 
    8#define CALLOUT_MANAGER_H 
   14#include <boost/shared_ptr.hpp> 
  136    typedef std::pair<int, CalloutPtr> CalloutEntry;
 
  140    typedef std::vector<CalloutEntry> CalloutVector;
 
  274        return (num_libraries_);
 
 
  290        return (current_library_);
 
 
  308        checkLibraryIndex(library_index);
 
  309        current_library_ = library_index;
 
 
  335        return (library_handle_);
 
 
  345        return (pre_library_handle_);
 
 
  355        return (post_library_handle_);
 
 
  362        return (hook_vector_.size());
 
 
  386    void ensureHookLibsVectorSize();
 
  398    void checkLibraryIndex(
int library_index) 
const;
 
  410    int current_library_;
 
  415    std::vector<CalloutVector> hook_vector_;
 
 
Exception(const char *file, size_t line, const char *what)
Constructor for a given type for exceptions with file name and file line number.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
Per-packet callout handle.
LibraryHandle & getLibraryHandle()
Return library handle.
void callCallouts(int hook_index, CalloutHandle &callout_handle)
Calls the callouts for a given hook.
bool commandHandlersPresent(const std::string &command_name) const
Checks if control command handlers are present for the specified command.
size_t getHookLibsVectorSize() const
Return number of currently available hooks.
void callCommandHandlers(const std::string &command_name, CalloutHandle &callout_handle)
Calls the callouts/command handlers for a given command name.
CalloutManager(int num_libraries=0)
Constructor.
bool deregisterAllCallouts(const std::string &name, int library_index)
Removes all callouts on a hook for the current library.
LibraryHandle & getPostLibraryHandle()
Return post-user callouts library handle.
int getLibraryIndex() const
Get current library index.
int getNumLibraries() const
Get number of libraries.
void setLibraryIndex(int library_index)
Set current library index.
bool deregisterCallout(const std::string &name, CalloutPtr callout, int library_index)
De-Register a callout on a hook for the current library.
bool calloutsPresent(int hook_index) const
Checks if callouts are present on a hook.
void registerCommandHook(const std::string &command_name)
Registers a hook point for the specified command name.
void registerCallout(const std::string &name, CalloutPtr callout, int library_index)
Register a callout on a hook for the current library.
LibraryHandle & getPreLibraryHandle()
Return pre-user callouts library handle.
NoSuchLibrary(const char *file, size_t line, const char *what)
int(* CalloutPtr)(CalloutHandle &)
Typedef for a callout pointer. (Callouts must have "C" linkage.)
Defines the logger used by the top-level component of kea-lfc.