#include <cfg_drive.h>


Definition at line 80 of file cfg_drive.h.
Public Member Functions | |
| cfg_DriveSettings () | |
| cfg_DriveSettings (const pf_File &a_parsedFile) | |
| virtual | ~cfg_DriveSettings () |
| void | Refresh (const pf_File &a_parsedFile) |
| virtual void | ConvertGroup (const string &a_prodID, const pf_Group &a_group) |
| UInt64_t | FindThreshold (const string &a_vendor, const string &a_product, ivd_MediaType_e a_type) const |
Private Attributes | |
| log_CLASSID_m | |
| vector< cfg_DriveVendor > | m_vendors |
Static Private Attributes | |
| static const string | m_drvFileType_c |
| cfg_DriveSettings::cfg_DriveSettings | ( | ) |
| cfg_DriveSettings::cfg_DriveSettings | ( | const pf_File & | a_parsedFile | ) |
Definition at line 175 of file cfg_drive.cpp.
References log_FUNC_m, and Refresh().
00175 { 00176 log_FUNC_m(cfg_DriveSettings); 00177 Refresh(a_parsedFile); 00178 }

| cfg_DriveSettings::~cfg_DriveSettings | ( | ) | [virtual] |
Definition at line 182 of file cfg_drive.cpp.
References log_FUNC_m.
00182 { 00183 log_FUNC_m(~cfg_DriveSettings); 00184 }
| void cfg_DriveSettings::Refresh | ( | const pf_File & | a_parsedFile | ) |
Definition at line 188 of file cfg_drive.cpp.
References cfg_Base::Convert(), cfg_Base::ConvertFileHeader(), dbg_NORM, log_DBG_m, log_FUNC_m, log_WRN_m, pf_File::m_common, m_drvFileType_c, cfg_Base::m_fileType, and m_vendors.
Referenced by cfg_DriveSettings(), and i_BackEndAgent_i::i_BackEndAgent_i().
00188 { 00189 log_FUNC_m(Refresh); 00190 00191 m_vendors.clear(); 00192 00193 ConvertFileHeader(a_parsedFile); 00194 val_RuleVec rules; 00195 00196 if (m_fileType != m_drvFileType_c) { 00197 log_WRN_m("Invalid file type in header for drive settings: " << m_fileType); 00198 } 00199 00200 Convert(a_parsedFile.m_common, rules); 00201 00202 log_DBG_m(dbg_NORM, "Parsed " << m_vendors.size() << " vendor/product/types."); 00203 }


| void cfg_DriveSettings::ConvertGroup | ( | const string & | a_prodID, | |
| const pf_Group & | a_group | |||
| ) | [virtual] |
Reimplemented from cfg_Base.
Definition at line 207 of file cfg_drive.cpp.
References log_FUNC_m, and m_vendors.
00207 { 00208 log_FUNC_m(ConvertGroup); 00209 00210 cfg_DriveVendor vendor(a_prodID, a_group); 00211 m_vendors.push_back(vendor); 00212 }
| UInt64_t cfg_DriveSettings::FindThreshold | ( | const string & | a_vendor, | |
| const string & | a_product, | |||
| ivd_MediaType_e | a_type | |||
| ) | const |
Definition at line 216 of file cfg_drive.cpp.
References dbg_DETAIL, ivd_MediaTypeToText(), log_DBG_m, log_FUNC_m, and m_vendors.
Referenced by i_BackEndAgent_i::GetSeekThreshold().
00219 { 00220 00221 log_FUNC_m(FindThreshold); 00222 00223 vector<cfg_DriveVendor>::const_iterator drvVend_i; 00224 for (drvVend_i = m_vendors.begin(); drvVend_i != m_vendors.end(); ++drvVend_i) { 00225 UInt64_t th = drvVend_i->GetThreshold(a_vendor, a_product, a_type); 00226 if (th != 0) { 00227 log_DBG_m(dbg_DETAIL, 00228 "Value for vnd/prod/type: " 00229 << a_vendor << "/" << a_product << "/" 00230 << ivd_MediaTypeToText(a_type) 00231 << " = " << th); 00232 return th; 00233 } 00234 } 00235 // Threshold not found. 00236 return 0; 00237 }


cfg_DriveSettings::log_CLASSID_m [private] |
const string cfg_DriveSettings::m_drvFileType_c [static, private] |
vector<cfg_DriveVendor> cfg_DriveSettings::m_vendors [private] |
Definition at line 99 of file cfg_drive.h.
Referenced by ConvertGroup(), FindThreshold(), and Refresh().
1.5.6