Confdump Agent  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Public Member Functions | Private Member Functions | Private Attributes
Confdump::System::LinuxDumper::SystemContext Class Reference

Context of the access to this system. More...

#include <LinuxDumper.hpp>

List of all members.

Public Member Functions

boost::shared_ptr< std::streambuf > openRoFile (const boost::filesystem::path &path) const
 Conveniently open a read-only file.
 SystemContext (boost::shared_ptr< LinuxDumper > driver)
 ~SystemContext ()
Result allConfigurationFiles () const
QByteArray slurpConfigurationFile (const boost::filesystem::path &path, QString refersToTable)
 Conveniently obtain the contents of a file.
QByteArray slurpConfigurationFile (QString path, QString refersToTable)
 Conveniently obtain the contents of a file.

Private Member Functions

 SystemContext ()

Private Attributes

Result configurationFiles_
boost::shared_ptr< LinuxDumperdriver_

Detailed Description

Context of the access to this system.

This class provides a level of abstraction over all system accesses that may be subject to a user-specified context. It also provides convience wrappers over basic functions.

Example: file access may be done in a specified root for forensics/recovery purposes ("/mnt"), although the default (and only option at the moment) is to use the filesystem root "/".

Definition at line 59 of file LinuxDumper.hpp.


Constructor & Destructor Documentation

Definition at line 116 of file LinuxDumper.cpp.

Definition at line 121 of file LinuxDumper.cpp.


Member Function Documentation

shared_ptr< std::streambuf > Confdump::System::LinuxDumper::SystemContext::openRoFile ( const boost::filesystem::path &  path) const

Conveniently open a read-only file.

Opens the file represented by path as a streambuf ready for I/O operations.

Files opened this way are not automatically added to the ConfigurationFile table.

Exceptions:
boost::system::system_erroron failure

Definition at line 125 of file LinuxDumper.cpp.

QByteArray Confdump::System::LinuxDumper::SystemContext::slurpConfigurationFile ( const boost::filesystem::path &  path,
QString  refersToTable 
)

Conveniently obtain the contents of a file.

Opens the file represented by path and returns the content as a QByteArray.

Files obtained this way are automatically added to the ConfiguratilFile table.

Exceptions:
boost::system::system_erroron failure

Definition at line 141 of file LinuxDumper.cpp.

QByteArray Confdump::System::LinuxDumper::SystemContext::slurpConfigurationFile ( QString  path,
QString  refersToTable 
)

Conveniently obtain the contents of a file.

Opens the file represented by path and returns the content as a QByteArray.

Files obtained this way are automatically added to the ConfiguratilFile table.

Exceptions:
boost::system::system_erroron failure

Definition at line 148 of file LinuxDumper.cpp.


Member Data Documentation

Definition at line 93 of file LinuxDumper.hpp.

Definition at line 94 of file LinuxDumper.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends