mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +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();
|
return getDbRootDirectoryUrl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUrl CGlobalSetup::getDbAirportReaderUrl() const
|
||||||
|
{
|
||||||
|
return getDbRootDirectoryUrl();
|
||||||
|
}
|
||||||
|
|
||||||
CUrl CGlobalSetup::getDbInfoReaderUrl() const
|
CUrl CGlobalSetup::getDbInfoReaderUrl() const
|
||||||
{
|
{
|
||||||
return getDbRootDirectoryUrl();
|
return getDbRootDirectoryUrl();
|
||||||
@@ -52,13 +57,6 @@ namespace BlackCore
|
|||||||
return this->m_sharedUrls;
|
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
|
CUrl CGlobalSetup::getDbHomePageUrl() const
|
||||||
{
|
{
|
||||||
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
|
return getDbRootDirectoryUrl().withAppendedPath("/page/index.php");
|
||||||
@@ -190,6 +188,9 @@ namespace BlackCore
|
|||||||
s.append("Model DB reader: ");
|
s.append("Model DB reader: ");
|
||||||
s.append(getDbModelReaderUrl().toQString(i18n));
|
s.append(getDbModelReaderUrl().toQString(i18n));
|
||||||
s.append(separator);
|
s.append(separator);
|
||||||
|
s.append("Airport DB reader: ");
|
||||||
|
s.append(getDbAirportReaderUrl().toQString(i18n));
|
||||||
|
s.append(separator);
|
||||||
s.append("DB home page: ");
|
s.append("DB home page: ");
|
||||||
s.append(getDbHomePageUrl().toQString(i18n));
|
s.append(getDbHomePageUrl().toQString(i18n));
|
||||||
s.append(separator);
|
s.append(separator);
|
||||||
@@ -200,10 +201,6 @@ namespace BlackCore
|
|||||||
s.append(getSwiftDbDataFileLocationUrls().toQString(i18n));
|
s.append(getSwiftDbDataFileLocationUrls().toQString(i18n));
|
||||||
s.append(separator);
|
s.append(separator);
|
||||||
|
|
||||||
s.append("swift airport files: ");
|
|
||||||
s.append(getSwiftAirportUrls().toQString(i18n));
|
|
||||||
s.append(separator);
|
|
||||||
|
|
||||||
s.append("VATSIM bookings: ");
|
s.append("VATSIM bookings: ");
|
||||||
s.append(getVatsimBookingsUrl().toQString(i18n));
|
s.append(getVatsimBookingsUrl().toQString(i18n));
|
||||||
s.append(separator);
|
s.append(separator);
|
||||||
@@ -249,8 +246,6 @@ namespace BlackCore
|
|||||||
return CVariant::fromValue(this->getBootstrapFileUrls());
|
return CVariant::fromValue(this->getBootstrapFileUrls());
|
||||||
case IndexSwiftDbFiles:
|
case IndexSwiftDbFiles:
|
||||||
return CVariant::fromValue(this->getSwiftDbDataFileLocationUrls());
|
return CVariant::fromValue(this->getSwiftDbDataFileLocationUrls());
|
||||||
case IndexSwiftAirportUrls:
|
|
||||||
return CVariant::fromValue(this->getSwiftAirportUrls());
|
|
||||||
case IndexShared:
|
case IndexShared:
|
||||||
return CVariant::fromValue(this->m_sharedUrls);
|
return CVariant::fromValue(this->m_sharedUrls);
|
||||||
case IndexWasLoaded:
|
case IndexWasLoaded:
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ namespace BlackCore
|
|||||||
IndexVatsimMetars,
|
IndexVatsimMetars,
|
||||||
IndexVatsimData,
|
IndexVatsimData,
|
||||||
IndexSwiftDbFiles,
|
IndexSwiftDbFiles,
|
||||||
IndexSwiftAirportUrls,
|
|
||||||
IndexBootstrap,
|
IndexBootstrap,
|
||||||
IndexUpdateInfo,
|
IndexUpdateInfo,
|
||||||
IndexWasLoaded,
|
IndexWasLoaded,
|
||||||
@@ -103,15 +102,15 @@ namespace BlackCore
|
|||||||
//! Model reader URL
|
//! Model reader URL
|
||||||
BlackMisc::Network::CUrl getDbModelReaderUrl() const;
|
BlackMisc::Network::CUrl getDbModelReaderUrl() const;
|
||||||
|
|
||||||
|
//! Airport reader URL
|
||||||
|
BlackMisc::Network::CUrl getDbAirportReaderUrl() const;
|
||||||
|
|
||||||
//! Info data reader URL
|
//! Info data reader URL
|
||||||
BlackMisc::Network::CUrl getDbInfoReaderUrl() const;
|
BlackMisc::Network::CUrl getDbInfoReaderUrl() const;
|
||||||
|
|
||||||
//! Shared URLs
|
//! Shared URLs
|
||||||
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
|
const BlackMisc::Network::CUrlList &getSwiftSharedUrls() const;
|
||||||
|
|
||||||
//! Airport URLs
|
|
||||||
BlackMisc::Network::CUrlList getSwiftAirportUrls() const;
|
|
||||||
|
|
||||||
//! URL to read VATSIM bookings
|
//! URL to read VATSIM bookings
|
||||||
const BlackMisc::Network::CUrl &getVatsimBookingsUrl() const { return m_vatsimBookingsUrl; }
|
const BlackMisc::Network::CUrl &getVatsimBookingsUrl() const { return m_vatsimBookingsUrl; }
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
CUrl CAirportDataReader::getAirportsUrl() const
|
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)
|
void CAirportDataReader::ps_parseAirportData(QNetworkReply *nwReply)
|
||||||
|
|||||||
Reference in New Issue
Block a user