Ref T272, skip VATSIM readers if (for sure) connected to an other eco system

Remark: This requires the server (=> ecosystem) to be connected, otherwise VATSIM data (before that connection) are still read as default
This commit is contained in:
Klaus Basan
2018-05-28 12:13:50 +02:00
parent 776a096168
commit abfa12c1ec
12 changed files with 116 additions and 46 deletions

View File

@@ -14,6 +14,7 @@
#include "blackcore/blackcoreexport.h"
#include "blackmisc/aviation/atcstationlist.h"
#include "blackmisc/network/ecosystemprovider.h"
#include "blackmisc/network/entityflags.h"
#include "blackcore/threadedreader.h"
@@ -26,7 +27,9 @@ namespace BlackCore
namespace Vatsim
{
//! Read bookings from VATSIM
class BLACKCORE_EXPORT CVatsimBookingReader : public BlackCore::CThreadedReader
class BLACKCORE_EXPORT CVatsimBookingReader :
public BlackCore::CThreadedReader,
public BlackMisc::Network::CEcosystemAware
{
Q_OBJECT
@@ -53,15 +56,14 @@ namespace BlackCore
virtual void doWorkImpl() override;
//! @}
private slots:
private:
//! Bookings have been read
//! \threadsafe
void ps_parseBookings(QNetworkReply *nwReply);
void parseBookings(QNetworkReply *nwReply);
//! Do reading
void ps_read();
void read();
private:
//! Settings changed
void settingsChanged();