diff --git a/src/blackcore/vatsim/vatsimdatafilereader.cpp b/src/blackcore/vatsim/vatsimdatafilereader.cpp index 063e9b455..da6c0ec01 100644 --- a/src/blackcore/vatsim/vatsimdatafilereader.cpp +++ b/src/blackcore/vatsim/vatsimdatafilereader.cpp @@ -50,8 +50,7 @@ using namespace BlackCore::Data; namespace BlackCore::Vatsim { - CVatsimDataFileReader::CVatsimDataFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimDataFileReader"), - CEcosystemAware(CEcosystemAware::providerIfPossible(owner)) + CVatsimDataFileReader::CVatsimDataFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimDataFileReader") { this->reloadSettings(); } @@ -174,7 +173,6 @@ namespace BlackCore::Vatsim this->threadAssertCheck(); if (!this->doWorkCheck()) { return; } if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM data file")) { return; } - if (this->isNotVATSIMEcosystem()) { return; } // round robin for load balancing // remark: Don't use QThread to run network operations in the background @@ -192,7 +190,6 @@ namespace BlackCore::Vatsim // required to use delete later as object is created in a different thread QScopedPointer nwReply(nwReplyPtr); this->threadAssertCheck(); - if (this->isNotVATSIMEcosystem()) { return; } // Worker thread, make sure to write only synced here! if (!this->doWorkCheck()) diff --git a/src/blackcore/vatsim/vatsimdatafilereader.h b/src/blackcore/vatsim/vatsimdatafilereader.h index be5930a03..71344500e 100644 --- a/src/blackcore/vatsim/vatsimdatafilereader.h +++ b/src/blackcore/vatsim/vatsimdatafilereader.h @@ -14,7 +14,6 @@ #include "blackmisc/aviation/callsignset.h" #include "blackmisc/aviation/flightplan.h" #include "blackmisc/network/entityflags.h" -#include "blackmisc/network/ecosystemprovider.h" #include "blackmisc/network/serverlist.h" #include "blackmisc/network/userlist.h" #include "blackmisc/network/voicecapabilities.h" @@ -37,8 +36,7 @@ namespace BlackCore::Vatsim { //! Read vatsim data file class BLACKCORE_EXPORT CVatsimDataFileReader : - public CThreadedReader, - public BlackMisc::Network::CEcosystemAware + public CThreadedReader { Q_OBJECT diff --git a/src/blackcore/vatsim/vatsimmetarreader.cpp b/src/blackcore/vatsim/vatsimmetarreader.cpp index ca98456ec..68499d955 100644 --- a/src/blackcore/vatsim/vatsimmetarreader.cpp +++ b/src/blackcore/vatsim/vatsimmetarreader.cpp @@ -31,8 +31,7 @@ using namespace BlackCore::Data; namespace BlackCore::Vatsim { - CVatsimMetarReader::CVatsimMetarReader(QObject *owner) : CThreadedReader(owner, "CVatsimMetarReader"), - CEcosystemAware(CEcosystemAware::providerIfPossible(owner)) + CVatsimMetarReader::CVatsimMetarReader(QObject *owner) : CThreadedReader(owner, "CVatsimMetarReader") { this->reloadSettings(); } @@ -68,7 +67,6 @@ namespace BlackCore::Vatsim this->threadAssertCheck(); if (!this->doWorkCheck()) { return; } if (!this->isInternetAccessible("No network/internet access, cannot read METARs")) { return; } - if (this->isNotVATSIMEcosystem()) { return; } CFailoverUrlList urls(sApp->getVatsimMetarUrls()); const CUrl url(urls.obtainNextWorkingUrl(true)); @@ -85,7 +83,6 @@ namespace BlackCore::Vatsim // Worker thread, make sure to write thread safe! this->threadAssertCheck(); - if (this->isNotVATSIMEcosystem()) { return; } if (!this->doWorkCheck()) { diff --git a/src/blackcore/vatsim/vatsimmetarreader.h b/src/blackcore/vatsim/vatsimmetarreader.h index a41143961..8d34147a3 100644 --- a/src/blackcore/vatsim/vatsimmetarreader.h +++ b/src/blackcore/vatsim/vatsimmetarreader.h @@ -10,7 +10,6 @@ #include "blackmisc/weather/metar.h" #include "blackmisc/weather/metardecoder.h" #include "blackmisc/weather/metarlist.h" -#include "blackmisc/network/ecosystemprovider.h" #include "blackmisc/network/entityflags.h" #include "blackmisc/aviation/airporticaocode.h" #include "blackcore/threadedreader.h" @@ -23,8 +22,7 @@ namespace BlackCore::Vatsim { //! Read METARs from VATSIM class BLACKCORE_EXPORT CVatsimMetarReader : - public BlackCore::CThreadedReader, - public BlackMisc::Network::CEcosystemAware + public BlackCore::CThreadedReader { Q_OBJECT diff --git a/src/blackcore/vatsim/vatsimserverfilereader.cpp b/src/blackcore/vatsim/vatsimserverfilereader.cpp index dfbf0e60b..45f75525f 100644 --- a/src/blackcore/vatsim/vatsimserverfilereader.cpp +++ b/src/blackcore/vatsim/vatsimserverfilereader.cpp @@ -28,8 +28,7 @@ using namespace BlackCore::Data; namespace BlackCore::Vatsim { - CVatsimServerFileReader::CVatsimServerFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimServerFileReader"), - CEcosystemAware(CEcosystemAware::providerIfPossible(owner)) + CVatsimServerFileReader::CVatsimServerFileReader(QObject *owner) : CThreadedReader(owner, "CVatsimServerFileReader") {} CServerList CVatsimServerFileReader::getFsdServers() const @@ -56,7 +55,6 @@ namespace BlackCore::Vatsim this->threadAssertCheck(); if (!this->doWorkCheck()) { return; } if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM server file")) { return; } - if (this->isNotVATSIMEcosystem()) { return; } Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application"); const QUrl url = sApp->getVatsimServerFileUrl(); @@ -70,7 +68,6 @@ namespace BlackCore::Vatsim // required to use delete later as object is created in a different thread QScopedPointer nwReply(nwReplyPtr); this->threadAssertCheck(); - if (this->isNotVATSIMEcosystem()) { return; } // Worker thread, make sure to write only synced here! if (!this->doWorkCheck()) diff --git a/src/blackcore/vatsim/vatsimserverfilereader.h b/src/blackcore/vatsim/vatsimserverfilereader.h index 8e262088e..2d18ecf33 100644 --- a/src/blackcore/vatsim/vatsimserverfilereader.h +++ b/src/blackcore/vatsim/vatsimserverfilereader.h @@ -14,7 +14,6 @@ #include "blackmisc/aviation/callsignset.h" #include "blackmisc/aviation/flightplan.h" #include "blackmisc/network/entityflags.h" -#include "blackmisc/network/ecosystemprovider.h" #include "blackmisc/network/serverlist.h" #include "blackmisc/network/userlist.h" #include "blackmisc/network/voicecapabilities.h" @@ -34,8 +33,7 @@ namespace BlackCore::Vatsim //! Read VATSIM server file //! \sa https://data.vatsim.net/v3/vatsim-servers.json class BLACKCORE_EXPORT CVatsimServerFileReader : - public CThreadedReader, - public BlackMisc::Network::CEcosystemAware + public CThreadedReader { Q_OBJECT diff --git a/src/blackcore/webdataservices.cpp b/src/blackcore/webdataservices.cpp index ab7289960..a9aeda397 100644 --- a/src/blackcore/webdataservices.cpp +++ b/src/blackcore/webdataservices.cpp @@ -82,11 +82,6 @@ namespace BlackCore this->initWriters(); } - if (sApp) - { - connect(sApp, &CApplication::coreFacadeStarted, this, &CWebDataServices::onCoreFacadeStarted, Qt::QueuedConnection); - } - // make sure this is called in event queue, so pending tasks cam be performed entities &= ~CEntityFlags::DbInfoObjectEntity; // triggered in init readers entities &= ~CEntityFlags::VatsimStatusFile; // triggered in init readers @@ -1517,21 +1512,6 @@ namespace BlackCore } } - void CWebDataServices::onCoreFacadeStarted() - { - if (sApp && sApp->supportsContexts() && sApp->getIContextNetwork()) - { - connect(sApp->getIContextNetwork(), &IContextNetwork::connectedServerChanged, this, &CWebDataServices::onConnectedNetworkServerChanged, Qt::QueuedConnection); - } - } - - void CWebDataServices::onConnectedNetworkServerChanged(const CServer &server) - { - const CEcosystem es(server.getEcosystem()); - this->setCurrentEcosystem(es); - CLogMessage(this).info(u"Changed data service ecosystem to '%1'") << es.toQString(true); - } - bool CWebDataServices::writeDbDataToDisk(const QString &dir) { if (dir.isEmpty()) { return false; } diff --git a/src/blackcore/webdataservices.h b/src/blackcore/webdataservices.h index f1469a920..f719e92b3 100644 --- a/src/blackcore/webdataservices.h +++ b/src/blackcore/webdataservices.h @@ -19,7 +19,6 @@ #include "blackmisc/aviation/airporticaocode.h" #include "blackmisc/aviation/atcstationlist.h" #include "blackmisc/aviation/liverylist.h" -#include "blackmisc/network/ecosystemprovider.h" #include "blackmisc/network/serverlist.h" #include "blackmisc/network/urllist.h" #include "blackmisc/network/userlist.h" @@ -80,11 +79,9 @@ namespace BlackCore * Encapsulates reading data from web sources */ class BLACKCORE_EXPORT CWebDataServices : - public QObject, - public BlackMisc::Network::IEcosystemProvider + public QObject { Q_OBJECT - Q_INTERFACES(BlackMisc::Network::IEcosystemProvider) public: //! Log categories @@ -604,13 +601,6 @@ namespace BlackCore //! \return true means info objects available bool waitForInfoObjectsThenRead(BlackMisc::Network::CEntityFlags::Entity entities, const QString &info, BlackCore::Db::CInfoDataReader *infoReader, QDateTime &timeOut); - //! \copydoc BlackCore::CApplication::coreFacadeStarted - void onCoreFacadeStarted(); - - //! \copydoc BlackCore::Context::IContextNetwork::connectedServerChanged - //! \remark sets the ecosystem - void onConnectedNetworkServerChanged(const BlackMisc::Network::CServer &server); - BlackMisc::Network::CEntityFlags::Entity m_entitiesPeriodicallyRead = BlackMisc::Network::CEntityFlags::NoEntity; //!< entities permanently updated by timers BlackMisc::Network::CEntityFlags::Entity m_swiftDbEntitiesRead = BlackMisc::Network::CEntityFlags::NoEntity; //!< entities read BlackCore::Db::CDatabaseReaderConfigList m_dbReaderConfig; //!< how to read DB data