The Sleuth Kit Framework  4.1
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
TskPluginModule Class Referenceabstract

Supports the loading of a custom dynamic library to perform analysis in either a TskPipeline or TskReportPipeline. More...

#include <TskPluginModule.h>

Inheritance diagram for TskPluginModule:
TskModule TskFileAnalysisPluginModule TskReportPluginModule

Public Member Functions

virtual void checkInterface ()=0
 Verifies that the required interface for a plugin module is defined by the module library. More...
 
TskModule::Status initialize ()
 Calls the initialize function in the module library, if present.
 
virtual void setPath (const std::string &location)
 Loads the module library. More...
 
virtual ~TskPluginModule ()
 Destructor that calls the finalize function of the module library and unloads the library.
 
- Public Member Functions inherited from TskModule
std::string getArguments () const
 Get the arguments.
 
std::string getDescription () const
 Get the module description.
 
int getModuleId () const
 Get the module id.
 
std::string getName () const
 Get the module name.
 
virtual std::string getPath () const
 Returns the fully qualified path to the module.
 
std::string getVersion () const
 Get the module version.
 
virtual Status report ()
 Method that is used to run report modules. More...
 
virtual Status run (TskFile *fileToAnalyze)=0
 Method that is used to run file analysis modules. More...
 
void setArguments (const std::string &args)
 Set the arguments to be passed to the module.
 
void setModuleId (int moduleId)
 Set the module id.
 

Protected Member Functions

void * getSymbol (const std::string symbol)
 Get a pointer to a function in the module library. More...
 
bool hasSymbol (const std::string symbol)
 Checks whether or not the module library defines a particular symbol. More...
 
bool isLoaded () const
 Checks whether or not the module library is loaded. More...
 

Static Protected Attributes

static const std::string DESCRIPTION_SYMBOL = "description"
 
static const std::string FINALIZE_SYMBOL = "finalize"
 
static const std::string GET_BUILD_TYPE_SYMBOL = "getBuildType"
 
static const std::string GET_COMPILER_SYMBOL = "getCompiler"
 
static const std::string GET_COMPILER_VERSION_SYMBOL = "getCompilerVersion"
 
static const std::string GET_FRAMEWORK_VERSION_SYMBOL = "getFrameWorkVersion"
 
static const std::string INITIALIZE_SYMBOL = "initialize"
 
static const std::string NAME_SYMBOL = "name"
 
static const std::string REPORT_SYMBOL = "report"
 
static const std::string RUN_SYMBOL = "run"
 
static const std::string VERSION_SYMBOL = "version"
 

Additional Inherited Members

- Public Types inherited from TskModule
enum  Status { OK = 0, FAIL, STOP }
 Standard values that module methods can return. More...
 
- Static Public Attributes inherited from TskModule
static const std::string CURRENT_FILE_MACRO = "#CURRENT_FILE#"
 The TskModule class supports the use of a string macro that is expanded to the path of the file currently under analysis. More...
 
- Static Protected Member Functions inherited from TskModule
static std::string expandArgumentMacros (const std::string &args, const TskFile *fileToAnalyze)
 
- Protected Attributes inherited from TskModule
std::string m_arguments
 
std::string m_description
 
int m_moduleId
 
std::string m_modulePath
 
std::string m_name
 
std::string m_version
 

Detailed Description

Supports the loading of a custom dynamic library to perform analysis in either a TskPipeline or TskReportPipeline.

Member Function Documentation

virtual void TskPluginModule::checkInterface ( )
pure virtual

Verifies that the required interface for a plugin module is defined by the module library.

Returns
Throws TskException if the required interface is not defined.

Implemented in TskReportPluginModule, and TskFileAnalysisPluginModule.

void * TskPluginModule::getSymbol ( const std::string  symbol)
protected

Get a pointer to a function in the module library.

Parameters
symbolThe symbol associated with the desired pointer.
Returns
A pointer to the module library function corresponding to symbol. Throws Poco::NotFoundException if symbol is not found.

Referenced by TskReportPluginModule::report(), and TskFileAnalysisPluginModule::run().

bool TskPluginModule::hasSymbol ( const std::string  symbol)
protected

Checks whether or not the module library defines a particular symbol.

Parameters
symbolThe symbol.
Returns
True if the symbol is defined, false otherwise.

Referenced by TskFileAnalysisPluginModule::checkInterface(), TskReportPluginModule::checkInterface(), TskReportPluginModule::report(), and TskFileAnalysisPluginModule::run().

bool TskPluginModule::isLoaded ( ) const
protected

Checks whether or not the module library is loaded.

Returns
True if the module library is loaded.

Referenced by TskFileAnalysisPluginModule::checkInterface(), TskReportPluginModule::checkInterface(), TskReportPluginModule::report(), and TskFileAnalysisPluginModule::run().

void TskPluginModule::setPath ( const std::string &  location)
virtual

Loads the module library.

Parameters
locationEither a relative or fully qualified path to the module library.

Reimplemented from TskModule.

References LOGERROR, LOGINFO, TskSystemProperties::MODULE_DIR, and TskException::what().


The documentation for this class was generated from the following files:

Copyright © 2011-2013 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.