hwdet::LinuxDetector Class Reference

Linux detector class. More...

#include <LinuxDetector.h>

Inheritance diagram for hwdet::LinuxDetector:

hwdet::Detector hwdet::MessageReporter

Public Member Functions

 LinuxDetector (void)
 Constructor.
 ~LinuxDetector (void)
 Destructor.
bool Initialize (void)
 Initialize detector.
bool Detect (void)
 Detect all features.
bool Destroy (void)
 Clear all used memory.
String GetOutputString (void) const
 Get string containing output file.
bool WriteToStream (OStream &stream) const
 Write generated output to the stream.

Private Member Functions

bool DetectOS (void)
 Detect OS features.
bool DetectCPU (void)
 Detect CPU features.
bool DetectMemory (void)
 Detect memory features.
bool DetectDrives (void)
 Detect all drives.
std::vector< StringReadDriveNames (void)
 Determine names of all IDE drives.
std::vector< StringReadPartitionNames (const String &drive_prefix)
 Read names of all partitions on given drive.
std::vector< FstabEntryReadMounts (void)
 Read data about all currently mounted filesystems.
bool DetectBeenDisk (void)
 Detect properties of the BEEN disk.
bool DetectNetwork (void)
 Detect network features.
bool DetectProducts (void)
 Enumerate installed applications.

Private Attributes

DistributionRegistry registry
 Distribution registry.

Data Structures

class  DriveInfo
 Helper class which stores details about one drive device. More...
class  FstabEntry
 Stores one entry from fstab file. More...
class  InterfaceInfo
 Stores data about one network interface. More...
class  PartitionInfo
 Stores details about one partition. More...

Detailed Description

Linux detector class.

This class collects all data about installed hardware and software.


Constructor & Destructor Documentation

hwdet::LinuxDetector::LinuxDetector ( void   ) 

Constructor.

Constructor.

hwdet::LinuxDetector::~LinuxDetector ( void   ) 

Destructor.

Destructor.


Member Function Documentation

bool hwdet::LinuxDetector::Destroy ( void   )  [virtual]

Clear all used memory.

Returns:
true on success, false otherwise.

Implements hwdet::Detector.

bool hwdet::LinuxDetector::Detect ( void   )  [virtual]

Detect all features.

Detect all features.

Returns:
true on success, false otherwise.

Implements hwdet::Detector.

bool hwdet::LinuxDetector::DetectBeenDisk ( void   )  [private]

Detect properties of the BEEN disk.

Read details about the disk on which BEEN is installed. Path to the drive is determined from the BEEN_HOME environment variable.

Returns:
true.

bool hwdet::LinuxDetector::DetectCPU ( void   )  [private]

Detect CPU features.

Returns:
true on success, false otherwise.

bool hwdet::LinuxDetector::DetectDrives ( void   )  [private]

Detect all drives.

Returns:
true on success, false otherwise.

bool hwdet::LinuxDetector::DetectMemory ( void   )  [private]

Detect memory features.

Returns:
true on success, false otherwise.

bool hwdet::LinuxDetector::DetectNetwork ( void   )  [private]

Detect network features.

Returns:
true on success, false otherwise.

bool hwdet::LinuxDetector::DetectOS ( void   )  [private]

Detect OS features.

Returns:
true on success, false otherwise.

bool hwdet::LinuxDetector::DetectProducts ( void   )  [private]

Enumerate installed applications.

Returns:
true on success, false otherwise.

String hwdet::LinuxDetector::GetOutputString ( void   )  const [virtual]

Get string containing output file.

Returns:
String with all data collected by the detector.

Implements hwdet::Detector.

bool hwdet::LinuxDetector::Initialize ( void   )  [virtual]

Initialize detector.

Initialize detector.

Returns:
true on success, false otherwise.

Implements hwdet::Detector.

vector< String > hwdet::LinuxDetector::ReadDriveNames ( void   )  [private]

Determine names of all IDE drives.

Reads names of all IDE HDD devices from /proc/diskstats.

Returns:
Names of all IDE hard disk devices. Note that only device names are returned (without the dev/ prefix).

vector< LinuxDetector::FstabEntry > hwdet::LinuxDetector::ReadMounts ( void   )  [private]

Read data about all currently mounted filesystems.

This will read /proc/mounts file and parse entries for each currently mounted filesystem.

Returns:
List of all entries from the file. Empty list is returned if an error occured.

vector< String > hwdet::LinuxDetector::ReadPartitionNames ( const String drive_prefix  )  [private]

Read names of all partitions on given drive.

Reads names of all partitions of given drive from the /proc/diskstats file.

Returns:
List of partition names for given drive.

bool hwdet::LinuxDetector::WriteToStream ( OStream stream  )  const [virtual]

Write generated output to the stream.

Parameters:
stream Stream to write output to.
Returns:
true on success, false otherwise.

Implements hwdet::Detector.


Field Documentation

DistributionRegistry hwdet::LinuxDetector::registry [private]

Distribution registry.


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:51 2006 for Detector for Linux by  doxygen 1.4.7