Ref T490, "ps_read" replacement

This commit is contained in:
Klaus Basan
2018-12-28 21:03:20 +01:00
committed by Mat Sutcliffe
parent 788f827110
commit 003ad0f0de
13 changed files with 47 additions and 40 deletions

View File

@@ -69,11 +69,6 @@ namespace BlackCore
virtual bool hasChangedUrl(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CUrl &oldUrlInfo, BlackMisc::Network::CUrl &newUrlInfo) const override;
virtual BlackMisc::Network::CUrl getDbServiceBaseUrl() const override;
private slots:
//! Read / re-read data file
void ps_read(BlackMisc::Network::CEntityFlags::Entity entity = BlackMisc::Network::CEntityFlags::DistributorLiveryModel,
BlackMisc::Db::CDbFlags::DataRetrievalModeFlag mode = BlackMisc::Db::CDbFlags::DbReading, const QDateTime &newerThan = QDateTime());
private:
BlackMisc::CData<BlackCore::Data::TDbAirportCache> m_airportCache {this, &CAirportDataReader::airportCacheChanged}; //!< cache file
std::atomic_bool m_syncedAirportCache { false }; //!< already synchronized?
@@ -81,6 +76,9 @@ namespace BlackCore
//! Reader URL (we read from where?) used to detect changes of location
BlackMisc::CData<BlackCore::Data::TDbModelReaderBaseUrl> m_readerUrlCache {this, &CAirportDataReader::baseUrlCacheChanged };
//! \copydoc CDatabaseReader::read
void read(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Db::CDbFlags::DataRetrievalModeFlag mode, const QDateTime &newerThan) override;
//! Parse downloaded JSON file
void parseAirportData(QNetworkReply *nwReplyPtr);