From fbd9255f56a09edf7217efef8da73a3ea6c2be1b Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Tue, 14 Feb 2023 17:42:05 +0100 Subject: [PATCH] Add getter for server file to CApplication --- src/blackcore/application.cpp | 7 +++++++ src/blackcore/application.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index c01a22719..d5c7fb40a 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -1737,6 +1737,13 @@ namespace BlackCore return CUrlList(); } + CUrl CApplication::getVatsimServerFileUrl() const + { + if (m_shutdown || !m_setupReader) { return {}; } + + return m_setupReader->getSetup().getVatsimServerFileUrl(); + } + void CApplication::onCrashDumpUploadEnabledChanged() { const bool enabled = CBuildConfig::isReleaseBuild() && m_crashDumpSettings.getThreadLocal().isEnabled(); diff --git a/src/blackcore/application.h b/src/blackcore/application.h index d606a0805..c7cce70a6 100644 --- a/src/blackcore/application.h +++ b/src/blackcore/application.h @@ -439,6 +439,9 @@ namespace BlackCore //! \threadsafe BlackMisc::Network::CUrlList getVatsimDataFileUrls() const; + //! Get URL to file which contains the list of VATSIM servers + BlackMisc::Network::CUrl getVatsimServerFileUrl() const; + //! Start services, if not yet parsed call CApplication::parse virtual bool start();