hwdet::EqueryPackager Class Reference

Adapter for the equery command. More...

#include <EqueryPackager.h>

Inheritance diagram for hwdet::EqueryPackager:

hwdet::Packager hwdet::MessageReporter

Public Member Functions

 EqueryPackager (MessageReporter *parent_reporter)
 Create new packager.
virtual ~EqueryPackager (void)
 Free used resources.
virtual bool IsSupported (void)
 Is packager supported?
virtual bool DetectSoftware (XMLElement *products)
 Query data from package manager.

Private Attributes

bool is_supported
 Is packager supported?

Data Structures

class  EqueryExec
 Execs equery command and parses its output. More...

Detailed Description

Adapter for the equery command.

This class provides means to query applications via the equery command.


Constructor & Destructor Documentation

hwdet::EqueryPackager::EqueryPackager ( MessageReporter parent_reporter  ) 

Create new packager.

Parameters:
parent_reporter Message reporter which will receive all messages generated by this class.

hwdet::EqueryPackager::~EqueryPackager ( void   )  [virtual]

Free used resources.


Member Function Documentation

bool hwdet::EqueryPackager::DetectSoftware ( XMLElement products  )  [virtual]

Query data from package manager.

This will exec equery and parse all data generated by the command.

Parameters:
products XML node which will receive parsed data.
Returns:
true on success, false otherwise.

Implements hwdet::Packager.

bool hwdet::EqueryPackager::IsSupported ( void   )  [virtual]

Is packager supported?

Test if eqeury is supported. equery is supported if /usr/bin/equery file exists and current user has permissions to execute that file.

Returns:
true if equery is supported, false otherwise.

Implements hwdet::Packager.


Field Documentation

bool hwdet::EqueryPackager::is_supported [private]

Is packager supported?


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