yast2-hardware-detection
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
HwProbe Class Reference

SCR Agent for access to hardware autoprobe. More...

#include <HwProbe.h>

Inheritance diagram for HwProbe:
SCRAgent

Public Types

enum  hwinfo_settings { no_settings =0, list_md }
 

Public Member Functions

 HwProbe ()
 
 ~HwProbe ()
 
YCPValue Read (const YCPPath &path, const YCPValue &arg=YCPNull(), const YCPValue &optarg=YCPNull())
 
YCPBoolean Write (const YCPPath &path, const YCPValue &value, const YCPValue &arg=YCPNull())
 
YCPList Dir (const YCPPath &path)
 
- Public Member Functions inherited from SCRAgent
 SCRAgent ()
 
virtual ~SCRAgent ()
 
virtual YCPValue Execute (const YCPPath &path, const YCPValue &=YCPNull(), const YCPValue &=YCPNull())
 
virtual YCPMap Error (const YCPPath &)
 
virtual YCPBoolean RegisterAgent (const YCPPath &path, const YCPValue &)
 
virtual YCPBoolean UnregisterAgent (const YCPPath &path)
 
virtual YCPBoolean UnregisterAllAgents ()
 
virtual YCPBoolean UnmountAgent (const YCPPath &)
 
virtual YCPBoolean RegisterNewAgents ()
 
virtual YCPValue otherCommand (const YCPTerm &term)
 
virtual const char * root () const
 
void setAsCurrentSCR ()
 
string targetPath (const string &path) const
 

Private Member Functions

YCPValue hd2value (hd_t *hd)
 
YCPList hdlist2ycplist (hd_t *hd, hd_hw_item_t filteritem=(hd_hw_item_t) 0)
 
YCPMap resource_type2map (const res_any_t *res, const char **name)
 
YCPMap driver_info2map (const driver_info_t *drv, const char **name)
 
YCPValue byItem (hd_hw_item_t item, enum hwinfo_settings)
 
YCPValue readByUniqueID (const YCPValue &arg)
 
YCPValue filterManual (hd_hw_item_t item)
 
YCPValue bootArch ()
 
YCPValue cpuArch ()
 
YCPValue bootDisk ()
 
YCPValue cdb_isdnData ()
 
YCPValue biosVideo ()
 
YCPValue vesaFramebuffer ()
 
YCPValue checkPath (const YCPPath &path, const YCPValue &arg, const YCPValue &writeval, int func)
 
int doScan (int force)
 

Private Attributes

hd_data_t * hd_base
 

Additional Inherited Members

- Static Public Member Functions inherited from SCRAgent
static YCPValue readconf (const char *filename)
 
static SCRAgentinstance ()
 
- Public Attributes inherited from SCRAgent
SCRAgentmainscragent
 

Detailed Description

SCR Agent for access to hardware autoprobe.

HwProbe.h

Purpose: class definition for HwProbe

Authors: Klaus Kaempf kkaem.nosp@m.pf@s.nosp@m.use.d.nosp@m.e Arvin Schnell arvin.nosp@m.@sus.nosp@m.e.de Maintainer: Arvin Schnell arvin.nosp@m.@sus.nosp@m.e.de

Member Enumeration Documentation

Enumerator
no_settings 
list_md 

Constructor & Destructor Documentation

HwProbe::HwProbe ( )

Creates a new HwProbe.

References hd_base, and y2debug.

HwProbe::~HwProbe ( )

Cleans up

References hd_base, and y2debug.

Member Function Documentation

YCPValue HwProbe::biosVideo ( )
private

lookup which video card is used by bios return YCPValue

References YCPList::add(), hd2value(), hd_base, and result().

Referenced by checkPath().

YCPValue HwProbe::bootArch ( )
private

lookup boot architecture return YCPValue

References boot2string(), and hd_base.

Referenced by checkPath().

YCPValue HwProbe::bootDisk ( )
private

lookup boot disk return YCPValue

References hd_base.

Referenced by checkPath().

YCPValue HwProbe::byItem ( hd_hw_item_t  item,
enum  hwinfo_settings 
)
private

lookup hardware components matching item return YCPValue

References hdlist2ycplist(), and list_md.

Referenced by checkPath(), and vesaFramebuffer().

YCPValue HwProbe::cdb_isdnData ( )
private

lookup isdn hardware data return YCPValue

References YCPMap::add(), YCPList::add(), String2List(), and y2debug.

Referenced by checkPath().

YCPValue HwProbe::checkPath ( const YCPPath path,
const YCPValue arg,
const YCPValue writeval,
int  func 
)
private

check path for read, write, and dir func == 0 for read, == 1 for write, == 2 for dir.

checkPath check given path

Parameters
pathpath to check
func== 0 for read, == 1 for write, == 2 for dir or return full value for sub-tree

References YCPMap::add(), YCPList::add(), biosVideo(), bootArch(), bootDisk(), byItem(), cdb_isdnData(), cpuArch(), filterManual(), hd_base, YCPElement::isNull(), ITEM, list_md, no_settings, PATHCOUNT, pr_null, Read(), readByUniqueID(), readStatus(), result(), sym_to_status(), vesaFramebuffer(), y2debug, y2warning, and YCPError().

Referenced by Dir(), Read(), and Write().

YCPValue HwProbe::cpuArch ( )
private

lookup cpu architecture return YCPValue

References cpu2string(), and hd_base.

Referenced by checkPath().

YCPList HwProbe::Dir ( const YCPPath path)
virtual

Get a list of all subtrees.

Dir

show subtree possibilities

Implements SCRAgent.

References checkPath(), and YCPElement::isNull().

int HwProbe::doScan ( int  force)
private

scan the hardware

References hd_base, and hd_data_first.

YCPMap HwProbe::driver_info2map ( const driver_info_t *  drvinfo,
const char **  name 
)
private

convert driver_info_t entry to map value

References YCPList::add(), YCPMap::add(), DRV2TYPE, modules, YCPList::size(), and strlist2ycplist().

Referenced by hd2value().

YCPValue HwProbe::filterManual ( hd_hw_item_t  item)
private

lookup 'manual' (configured) hardware components matching item return YCPValue

References hdlist2ycplist().

Referenced by checkPath().

YCPValue HwProbe::hd2value ( hd_t *  hd)
private
YCPList HwProbe::hdlist2ycplist ( hd_t *  hd,
hd_hw_item_t  filteritem = (hd_hw_item_t)0 
)
private

convert a hd_data_t linked list to a ycplist

References YCPList::add(), and hd2value().

Referenced by byItem(), and filterManual().

YCPValue HwProbe::Read ( const YCPPath path,
const YCPValue arg = YCPNull(),
const YCPValue optarg = YCPNull() 
)
virtual

Reads data. Destroy the result after use.

Parameters
pathSpecifies what part of the subtree should be read. The path is specified relatively to Root()!

Read

read value from relative path

Implements SCRAgent.

References checkPath(), hd_base, y2debug, and y2error.

Referenced by checkPath().

YCPValue HwProbe::readByUniqueID ( const YCPValue arg)
private

lookup hardware components matching unique_id return YCPValue

References hd2value(), hd_base, YCPElement::isNull(), and y2milestone.

Referenced by checkPath().

YCPMap HwProbe::resource_type2map ( const res_any_t *  res,
const char **  name 
)
private

convert res_t entry to map value

References access2string(), YCPMap::add(), add_strlist(), YCPElement::isNull(), RES2TYPE, and YCPMap::size().

Referenced by hd2value().

YCPValue HwProbe::vesaFramebuffer ( )
private

finds out framebuffer data return YCPValue

References byItem(), YCPElement::isNull(), no_settings, result(), and YCPMap::value().

Referenced by checkPath().

YCPBoolean HwProbe::Write ( const YCPPath path,
const YCPValue value,
const YCPValue arg = YCPNull() 
)
virtual

Writes data. Destroy the result after use.

Implements SCRAgent.

References checkPath(), YCPElement::isNull(), y2debug, and ycp2error.

Member Data Documentation

hd_data_t* HwProbe::hd_base
private

pointer to complete hd structure

Referenced by biosVideo(), bootArch(), bootDisk(), checkPath(), cpuArch(), doScan(), hd2value(), HwProbe(), Read(), readByUniqueID(), and ~HwProbe().


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

Generated on a sunny day for yast2-hardware-detection by doxygen 1.8.11