Some Web readers adjustemnts

* do not init shared URLs before needed
* do not load info objects when DB is unavailable
* adjust reader flags when DB is down
* airport URL available in setup
This commit is contained in:
Klaus Basan
2016-07-03 01:01:36 +02:00
parent 773f318a07
commit 8d5020d78e
10 changed files with 103 additions and 29 deletions

View File

@@ -52,6 +52,13 @@ namespace BlackCore
return this->m_sharedUrls;
}
CUrlList CGlobalSetup::getSwiftAirportUrls() const
{
// currently subdir of shared, this might change
const CUrlList airportUrls(getSwiftSharedUrls().appendPath("/airports/airports.json"));
return airportUrls;
}
CUrl CGlobalSetup::getDbHomePageUrl() const
{
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
@@ -156,7 +163,7 @@ namespace BlackCore
s.append(this->getFormattedUtcTimestampYmdhms());
s.append(separator);
s.append("Loaded: ");
s.append("Global setup loaded: ");
s.append(boolToYesNo(this->wasLoaded()));
s.append(separator);
@@ -193,6 +200,10 @@ namespace BlackCore
s.append(getSwiftDbDataFileLocationUrls().toQString(i18n));
s.append(separator);
s.append("swift airport files: ");
s.append(getSwiftAirportUrls().toQString(i18n));
s.append(separator);
s.append("VATSIM bookings: ");
s.append(getVatsimBookingsUrl().toQString(i18n));
s.append(separator);

View File

@@ -105,6 +105,9 @@ namespace BlackCore
//! Shared URLs
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
//! Airport URLs
BlackMisc::Network::CUrlList getSwiftAirportUrls() const;
//! URL to read VATSIM bookings
const BlackMisc::Network::CUrl &getVatsimBookingsUrl() const { return m_vatsimBookingsUrl; }