yast2-hardware-detection
|
SCR Agent for access to hardware autoprobe. More...
#include <HwProbe.h>
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) |
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 |
SCR Agent for access to hardware autoprobe.
Purpose: class definition for HwProbe
Authors: Klaus Kaempf kkaem Arvin Schnell pf@s use.d earvin Maintainer: Arvin Schnell @sus e.dearvin @sus e.de
HwProbe::~HwProbe | ( | ) |
Cleans up
References hd_base.
|
private |
lookup which video card is used by bios return YCPValue
References hd2value(), and hd_base.
Referenced by checkPath().
|
private |
lookup boot architecture return YCPValue
References boot2string(), and hd_base.
Referenced by checkPath().
|
private |
|
private |
lookup hardware components matching item return YCPValue
References hdlist2ycplist(), and list_md.
Referenced by checkPath(), and vesaFramebuffer().
|
private |
|
private |
check path for read, write, and dir func == 0 for read, == 1 for write, == 2 for dir.
checkPath check given path
path | path to check |
func | == 0 for read, == 1 for write, == 2 for dir or return full value for sub-tree |
References biosVideo(), bootArch(), bootDisk(), byItem(), cdb_isdnData(), cpuArch(), filterManual(), hd_base, ITEM, list_md, no_settings, PATHCOUNT, pr_null, Read(), readByUniqueID(), readStatus(), sym_to_status(), and vesaFramebuffer().
|
private |
lookup cpu architecture return YCPValue
References cpu2string(), and hd_base.
Referenced by checkPath().
YCPList HwProbe::Dir | ( | const YCPPath & | path | ) |
|
private |
scan the hardware
References hd_base, and hd_data_first.
|
private |
convert driver_info_t entry to map value
References DRV2TYPE, and strlist2ycplist().
Referenced by hd2value().
|
private |
lookup 'manual' (configured) hardware components matching item return YCPValue
References hdlist2ycplist().
Referenced by checkPath().
|
private |
convert hd_data_t entry to value
References add_devnum(), add_str(), add_strlist(), cpu2string(), driver_info2map(), hd_base, hotplug2string(), resource_type2map(), and strlist2ycplist().
Referenced by biosVideo(), hdlist2ycplist(), and readByUniqueID().
|
private |
convert a hd_data_t linked list to a ycplist
References hd2value().
Referenced by byItem(), and filterManual().
YCPValue HwProbe::Read | ( | const YCPPath & | path, |
const YCPValue & | arg = YCPNull() , |
||
const YCPValue & | optarg = YCPNull() |
||
) |
Reads data. Destroy the result after use.
path | Specifies what part of the subtree should be read. The path is specified relatively to Root()! |
Read
read value from relative path
References checkPath(), and hd_base.
Referenced by checkPath().
|
private |
lookup hardware components matching unique_id return YCPValue
References hd2value(), and hd_base.
Referenced by checkPath().
|
private |
convert res_t entry to map value
References access2string(), add_strlist(), and RES2TYPE.
Referenced by hd2value().
|
private |
finds out framebuffer data return YCPValue
References byItem(), and no_settings.
Referenced by checkPath().
YCPBoolean HwProbe::Write | ( | const YCPPath & | path, |
const YCPValue & | value, | ||
const YCPValue & | arg = YCPNull() |
||
) |
Writes data. Destroy the result after use.
References checkPath().
|
private |
pointer to complete hd structure
Referenced by biosVideo(), bootArch(), bootDisk(), checkPath(), cpuArch(), doScan(), hd2value(), HwProbe(), Read(), readByUniqueID(), and ~HwProbe().