Ref T28, background updater: consolidate DB and model data in background

* automatically reload DB data
* consolidate models with DB data
This commit is contained in:
Klaus Basan
2017-05-03 02:22:37 +02:00
committed by Mathew Sutcliffe
parent 6a96913974
commit f12b69bb87
3 changed files with 309 additions and 0 deletions

View File

@@ -86,6 +86,25 @@ namespace BlackGui
//! Key in data cache
static const char *key() { return "guinownaircraftmodel"; }
};
//! Settings for last manual entries of own aircraft mode
struct TBackgroundConsolidation : public BlackMisc::TSettingTrait<int>
{
//! Key in data cache
static const char *key() { return "backgroundconsolidation"; }
//! Validator function.
static bool isValid(const int &valueInSeconds) { return valueInSeconds == -1 || (valueInSeconds >= minSecs() && valueInSeconds <= maxSecs()); }
//! Default, not consolidating
static const int &defaultValue() { static const int i = -1; return i; }
//! Minimum
static int minSecs() { return 60; }
//! Maximum
static int maxSecs() { return 3600; }
};
} // ns
} // ns