The Sleuth Kit Framework  4.1
Public Member Functions | List of all members
TskSystemPropertiesImpl Class Reference

An implementation of TskSystemProperties that uses Poco AbstractConfiguration class to set and retrieve name/value pairs from an XML file. More...

#include <TskSystemPropertiesImpl.h>

Inheritance diagram for TskSystemPropertiesImpl:
TskSystemProperties

Public Member Functions

void initialize (const std::wstring &configfile)
 Initialize using a configuration file. More...
 
void initialize (const std::string &configfile)
 Initialize using a configuration file. More...
 
void initialize ()
 Initialize with no initial system property settings.
 
 TskSystemPropertiesImpl ()
 Default constructor. More...
 
- Public Member Functions inherited from TskSystemProperties
std::string expandMacros (const std::string &inputStr) const
 Expands any system property macros in a given string. More...
 
std::wstring expandMacrosW (const std::wstring &inputStr) const
 Expands any system property macros in a given string. More...
 
std::string get (PredefinedProperty prop) const
 Retrieves the string value associated with a name. More...
 
std::string get (const std::string &name) const
 Retrieves the string value associated with a name. More...
 
std::wstring getW (PredefinedProperty prop) const
 Retrieves the string value associated with a name. More...
 
std::wstring getW (const std::wstring &name) const
 Retrieves the string value associated with a name. More...
 
bool isConfigured () const
 Determines whether or not all required predefined system properties are currently set. More...
 
void set (PredefinedProperty prop, const std::string &value)
 Associates a string value with a name. More...
 
void set (const std::string &name, const std::string &value)
 Associates a string value with an unofficial name. More...
 
void setW (PredefinedProperty prop, const std::wstring &value)
 Associates a string value with a name. More...
 
void setW (const std::wstring &name, const std::wstring &value)
 Associates a string value with an unofficial name. More...
 
 TskSystemProperties ()
 Default constructor.
 
virtual ~TskSystemProperties ()
 Destructor, virtual since this is an abstract base class.
 

Additional Inherited Members

- Public Types inherited from TskSystemProperties
enum  PredefinedProperty {
  PROG_DIR, CONFIG_DIR, MODULE_DIR, MODULE_CONFIG_DIR,
  OUT_DIR, SYSTEM_OUT_DIR, MODULE_OUT_DIR, LOG_DIR,
  DB_HOST, DB_PORT, CARVE_DIR, UNALLOC_SECTORS_IMG_FILE_NAME,
  MAX_UNALLOC_SECTORS_IMG_FILE_SIZE, CARVE_EXTRACT_KEEP_INPUT_FILES, CARVE_EXTRACT_KEEP_OUTPUT_FILES, SCALPEL_DIR,
  SCALPEL_CONFIG_FILE, PIPELINE_CONFIG_FILE, SESSION_ID, CURRENT_TASK,
  CURRENT_SEQUENCE_NUMBER, NODE, PID, START_TIME,
  CURRENT_TIME, UNIQUE_ID, IMAGE_FILE, END_PROPS
}
 The TSK Framework predefines a set of system properties. More...
 

Detailed Description

An implementation of TskSystemProperties that uses Poco AbstractConfiguration class to set and retrieve name/value pairs from an XML file.

Allows system property values to refer to other system property values (see the TskSystemProperties class description for more details).

The XML schema for this is that the name of the value is the tag and the value is stored in the tag. Here is an example:

<?xml version="1.0" encoding="utf-8"?>
<TSK_FRAMEWORK_CONFIG>
  <CONFIG_DIR>#PROG_DIR#/Config</CONFIG_DIR>
  <MODULE_DIR>#PROG_DIR#/Modules</MODULE_DIR>
</TSK_FRAMEWORK_CONFIG>
* 

You can make up your own tags and the values will be inserted and available via the TskSystemProperties service.

Constructor & Destructor Documentation

TskSystemPropertiesImpl::TskSystemPropertiesImpl ( )
inline

Default constructor.

The TskSystemPropertiesImpl object must then be initialized with a call to one of the initialize() member functions before the object can be used.

Member Function Documentation

void TskSystemPropertiesImpl::initialize ( const std::wstring &  configfile)

Initialize using a configuration file.

Parameters
configfilePath to the XML file to be used to initialize the system properties.

References initialize(), and TskUtilities::toUTF8().

Referenced by TskServices::getSystemProperties().

void TskSystemPropertiesImpl::initialize ( const std::string &  configfile)

Initialize using a configuration file.

Parameters
configfilePath to the XML file to be used to initialize the system properties.

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.