Ref T125, URL for XSwiftBus file info webservice

This commit is contained in:
Klaus Basan
2017-08-15 02:06:41 +02:00
committed by Mathew Sutcliffe
parent 0bbad2ff83
commit 15f5a7f489
2 changed files with 37 additions and 7 deletions

View File

@@ -29,13 +29,30 @@ namespace BlackCore
namespace Data
{
CGlobalSetup::CGlobalSetup() :
ITimestampBased(0),
m_dbRootDirectoryUrl("https://datastore.swift-project.org/"), m_vatsimBookingsUrl("http://vatbook.euroutepro.com/xml2.php"),
m_vatsimMetarsUrls( {"http://metar.vatsim.net/metar.php"}), m_vatsimStatusFileUrls({ "https://status.vatsim.net" }),
m_vatsimDataFileUrls({ "http://info.vroute.net/vatsim-data.txt" }), m_sharedUrls({"https://datastore.swift-project.org/shared", "https://vatsim-germany.org:50443/datastore/shared"}),
m_newsUrls(QStringList({ "http://swift-project.org/" })), m_onlineHelpUrls(QStringList({ "help.swift-project.org/" })),
m_mapUrls(QStringList({ "map.swift-project.org/" }))
{ }
ITimestampBased(0)
{
this->initDefaultUrls();
}
void CGlobalSetup::initDefaultUrls()
{
m_dbRootDirectoryUrl = CUrl("https://datastore.swift-project.org/");
m_vatsimBookingsUrl = CUrl("http://vatbook.euroutepro.com/xml2.php");
m_vatsimMetarsUrls = CUrlList({"http://metar.vatsim.net/metar.php"});
m_vatsimStatusFileUrls = CUrlList({ "https://status.vatsim.net" });
m_vatsimDataFileUrls = CUrlList({ "http://info.vroute.net/vatsim-data.txt" });
m_sharedUrls = CUrlList(
{
"https://datastore.swift-project.org/shared",
"http://www.siliconmind.de/datastore/shared/",
"http://swift-project.org/datastore/shared/"
});
// spare: "https://vatsim-germany.org:50443/datastore/shared"
m_newsUrls = CUrlList({ "http://swift-project.org/" });
m_onlineHelpUrls = CUrlList({ "help.swift-project.org/" });
m_mapUrls = CUrlList({ "map.swift-project.org/" });
}
CUrl CGlobalSetup::getDbIcaoReaderUrl() const
{
@@ -91,6 +108,13 @@ namespace BlackCore
withSwitchedScheme("https", m_dbHttpsPort);
}
CUrl CGlobalSetup::getAlphaXSwiftBusFilesServiceUrl() const
{
return getDbRootDirectoryUrl().
withAppendedPath("/service/jsonalphaxswiftbusfiles.php").
withSwitchedScheme("https", m_dbHttpsPort);
}
bool CGlobalSetup::dbDebugFlag() const
{
if (!m_dbDebugFlag) { return false; }

View File

@@ -101,6 +101,9 @@ namespace BlackCore
//! Login service
BlackMisc::Network::CUrl getDbLoginServiceUrl() const;
//! alpha XSwiftBus files available
BlackMisc::Network::CUrl getAlphaXSwiftBusFilesServiceUrl() const;
//! Root directory of DB
const BlackMisc::Network::CUrl &getDbRootDirectoryUrl() const { return m_dbRootDirectoryUrl; }
@@ -205,6 +208,9 @@ namespace BlackCore
// transient members, to be switched on/off via GUI or set from reader
bool m_dbDebugFlag = false; //!< can trigger DEBUG on the server, so you need to know what you are doing
//! Set the default URLs
void initDefaultUrls();
BLACK_METACLASS(
CGlobalSetup,
BLACK_METAMEMBER(wasLoaded),