yast2-hardware-detection
|
00001 00013 // -*- c++ -*- 00014 00015 #ifndef HwProbe_h 00016 #define HwProbe_h 00017 00018 #include <stdio.h> 00019 #include <sys/types.h> 00020 00021 #include <hd.h> // libhd 00022 00023 #include <scr/SCRAgent.h> 00024 00025 #include "Y2.h" 00026 00030 class HwProbe : public SCRAgent 00031 { 00032 public: 00033 enum hwinfo_settings { no_settings=0, list_md }; 00034 00038 HwProbe(); 00039 00043 ~HwProbe (); 00044 00050 YCPValue Read(const YCPPath& path, const YCPValue& arg = YCPNull(), const YCPValue& optarg = YCPNull()); 00051 00055 YCPBoolean Write(const YCPPath& path, const YCPValue& value, const YCPValue& arg = YCPNull()); 00056 00060 YCPList Dir(const YCPPath& path); 00061 00062 // ---------------------------------------- 00063 00064 private: 00069 hd_data_t *hd_base; 00070 00074 YCPValue hd2value (hd_t *hd); 00075 00079 YCPList hdlist2ycplist (hd_t *hd, hd_hw_item_t filteritem = (hd_hw_item_t)0); 00080 00084 YCPMap resource_type2map (const res_any_t *res, const char **name); 00085 00089 YCPMap driver_info2map (const driver_info_t *drv, const char **name); 00090 00095 YCPValue byItem (hd_hw_item_t item, enum hwinfo_settings ); 00096 00101 YCPValue readByUniqueID (const YCPValue& arg); 00102 00107 YCPValue filterManual (hd_hw_item_t item); 00108 00113 YCPValue bootArch (); 00114 00119 YCPValue cpuArch (); 00120 00125 YCPValue bootDisk (); 00126 00131 YCPValue cdb_isdnData (); 00132 00137 YCPValue biosVideo (); 00138 00143 YCPValue vesaFramebuffer (); 00144 00149 YCPValue checkPath (const YCPPath& path, const YCPValue& arg, const YCPValue& writeval, int func); 00150 00154 int doScan (int force); 00155 }; 00156 00157 00158 // helper macros to hide hd_data_t internals 00159 00160 #define hd_data_first(hddata) (hddata->hd) 00161 #define hd_next(hd) (hd->next) 00162 00163 #endif // HwProbe_h