system/settings.cpp: remove delivery_system setting, add FST version

This commit is contained in:
[CST] Focus
2014-04-02 16:57:21 +04:00
parent 14d4ffa28f
commit c2cbfdbfac
2 changed files with 5 additions and 14 deletions

View File

@@ -116,25 +116,16 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE
CScanSettings::CScanSettings(void) CScanSettings::CScanSettings(void)
: configfile('\t') : configfile('\t')
{ {
delivery_system = DVB_S;
bouquetMode = CZapitClient::BM_UPDATEBOUQUETS; bouquetMode = CZapitClient::BM_UPDATEBOUQUETS;
scanType = CServiceScan::SCAN_TVRADIO; scanType = CServiceScan::SCAN_TVRADIO;
satName = "none"; satName = "none";
cableName ="none"; cableName ="none";
} }
bool CScanSettings::loadSettings(const char * const fileName, const delivery_system_t dsys) bool CScanSettings::loadSettings(const char * const fileName)
{ {
bool ret = configfile.loadConfig(fileName); bool ret = configfile.loadConfig(fileName);
if (configfile.getInt32("delivery_system", -1) != dsys)
{
// configfile is not for this delivery system
configfile.clear();
ret = false;
}
delivery_system = dsys;
bouquetMode = (CZapitClient::bouquetMode) configfile.getInt32("bouquetMode" , bouquetMode); bouquetMode = (CZapitClient::bouquetMode) configfile.getInt32("bouquetMode" , bouquetMode);
scanType = (CZapitClient::scanType) configfile.getInt32("scanType", scanType); scanType = (CZapitClient::scanType) configfile.getInt32("scanType", scanType);
@@ -162,6 +153,7 @@ bool CScanSettings::loadSettings(const char * const fileName, const delivery_sys
#endif #endif
fast_type = configfile.getInt32("fast_type", 2); fast_type = configfile.getInt32("fast_type", 2);
fast_op = configfile.getInt32("fast_op", 0); fast_op = configfile.getInt32("fast_op", 0);
fst_version = configfile.getInt32("fst_version", 0);
cable_nid = configfile.getInt32("cable_nid", 0); cable_nid = configfile.getInt32("cable_nid", 0);
return ret; return ret;
@@ -169,7 +161,6 @@ bool CScanSettings::loadSettings(const char * const fileName, const delivery_sys
bool CScanSettings::saveSettings(const char * const fileName) bool CScanSettings::saveSettings(const char * const fileName)
{ {
configfile.setInt32("delivery_system", delivery_system);
configfile.setInt32("bouquetMode", bouquetMode); configfile.setInt32("bouquetMode", bouquetMode);
configfile.setInt32("scanType", scanType); configfile.setInt32("scanType", scanType);
@@ -182,6 +173,7 @@ bool CScanSettings::saveSettings(const char * const fileName)
configfile.setInt32("scan_logical_hd", scan_logical_hd); configfile.setInt32("scan_logical_hd", scan_logical_hd);
configfile.setInt32("fast_type", fast_type); configfile.setInt32("fast_type", fast_type);
configfile.setInt32("fast_op", fast_op); configfile.setInt32("fast_op", fast_op);
configfile.setInt32("fst_version", fst_version);
configfile.setInt32("cable_nid", cable_nid); configfile.setInt32("cable_nid", cable_nid);
configfile.setString("satName", satName); configfile.setString("satName", satName);

View File

@@ -773,7 +773,6 @@ class CScanSettings
int bouquetMode; int bouquetMode;
int scanType; int scanType;
delivery_system_t delivery_system;
int scan_nit; int scan_nit;
int scan_nit_manual; int scan_nit_manual;
int scan_bat; int scan_bat;
@@ -783,6 +782,7 @@ class CScanSettings
int scan_logical_hd; int scan_logical_hd;
int fast_type; int fast_type;
int fast_op; int fast_op;
int fst_version;
int cable_nid; int cable_nid;
std::string satName; std::string satName;
@@ -801,8 +801,7 @@ class CScanSettings
std::string terr_TP_freq; std::string terr_TP_freq;
CScanSettings(); CScanSettings();
//void useDefaults(const delivery_system_t _delivery_system); bool loadSettings(const char * const fileName);
bool loadSettings(const char * const fileName, const delivery_system_t _delivery_system);
bool saveSettings(const char * const fileName); bool saveSettings(const char * const fileName);
}; };