mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refs #748, airport reader setup
* removed functions for old file URL * added URL functions for DB data
This commit is contained in:
@@ -42,6 +42,11 @@ namespace BlackCore
|
||||
return getDbRootDirectoryUrl();
|
||||
}
|
||||
|
||||
CUrl CGlobalSetup::getDbAirportReaderUrl() const
|
||||
{
|
||||
return getDbRootDirectoryUrl();
|
||||
}
|
||||
|
||||
CUrl CGlobalSetup::getDbInfoReaderUrl() const
|
||||
{
|
||||
return getDbRootDirectoryUrl();
|
||||
@@ -52,13 +57,6 @@ namespace BlackCore
|
||||
return this->m_sharedUrls;
|
||||
}
|
||||
|
||||
CUrlList CGlobalSetup::getSwiftAirportUrls() const
|
||||
{
|
||||
// currently subdir of shared, this might change
|
||||
const CUrlList airportUrls(getSwiftSharedUrls().appendPath(versionString() + "/airports/airports.json"));
|
||||
return airportUrls;
|
||||
}
|
||||
|
||||
CUrl CGlobalSetup::getDbHomePageUrl() const
|
||||
{
|
||||
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
|
||||
@@ -190,6 +188,9 @@ namespace BlackCore
|
||||
s.append("Model DB reader: ");
|
||||
s.append(getDbModelReaderUrl().toQString(i18n));
|
||||
s.append(separator);
|
||||
s.append("Airport DB reader: ");
|
||||
s.append(getDbAirportReaderUrl().toQString(i18n));
|
||||
s.append(separator);
|
||||
s.append("DB home page: ");
|
||||
s.append(getDbHomePageUrl().toQString(i18n));
|
||||
s.append(separator);
|
||||
@@ -200,10 +201,6 @@ 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);
|
||||
@@ -249,8 +246,6 @@ namespace BlackCore
|
||||
return CVariant::fromValue(this->getBootstrapFileUrls());
|
||||
case IndexSwiftDbFiles:
|
||||
return CVariant::fromValue(this->getSwiftDbDataFileLocationUrls());
|
||||
case IndexSwiftAirportUrls:
|
||||
return CVariant::fromValue(this->getSwiftAirportUrls());
|
||||
case IndexShared:
|
||||
return CVariant::fromValue(this->m_sharedUrls);
|
||||
case IndexWasLoaded:
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace BlackCore
|
||||
IndexVatsimMetars,
|
||||
IndexVatsimData,
|
||||
IndexSwiftDbFiles,
|
||||
IndexSwiftAirportUrls,
|
||||
IndexBootstrap,
|
||||
IndexUpdateInfo,
|
||||
IndexWasLoaded,
|
||||
@@ -103,15 +102,15 @@ namespace BlackCore
|
||||
//! Model reader URL
|
||||
BlackMisc::Network::CUrl getDbModelReaderUrl() const;
|
||||
|
||||
//! Airport reader URL
|
||||
BlackMisc::Network::CUrl getDbAirportReaderUrl() const;
|
||||
|
||||
//! Info data reader URL
|
||||
BlackMisc::Network::CUrl getDbInfoReaderUrl() const;
|
||||
|
||||
//! 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; }
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace BlackCore
|
||||
|
||||
CUrl CAirportDataReader::getAirportsUrl() const
|
||||
{
|
||||
return sApp->getGlobalSetup().getDbRootDirectoryUrl().withAppendedPath("service/jsonairport.php");
|
||||
return sApp->getGlobalSetup().getDbAirportReaderUrl().withAppendedPath("service/jsonairport.php");
|
||||
}
|
||||
|
||||
void CAirportDataReader::ps_parseAirportData(QNetworkReply *nwReply)
|
||||
|
||||
Reference in New Issue
Block a user