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

@@ -37,6 +37,10 @@ namespace BlackMisc
//! \threadsafe
bool isCurrentEcosystem(const CEcosystem &system) const;
//! Current ecosystem VATSIM?
//! \threadsafe
bool isCurrentEcosystemVATSIM() const;
//! Last known ecosystem?
//! \threadsafe
bool isLastEcosystem(const CEcosystem &system) const;
@@ -72,9 +76,19 @@ namespace BlackMisc
//! \copydoc IEcosystemProvider::isCurrentEcosystem
bool isCurrentEcosystem(const CEcosystem &system) const;
//! \copydoc IEcosystemProvider::isCurrentEcosystemVATSIM
bool isCurrentEcosystemVATSIM() const;
//! Connected with other system than VATSIM?
//! \remark use this function to skip VATSIM specific provider tasks etc.
bool isNotVATSIMEcosystem() const;
//! \copydoc IEcosystemProvider::isLastEcosystem
bool isLastEcosystem(const CEcosystem &system) const;
//! Cast as provider if possible
static IEcosystemProvider *providerIfPossible(QObject *object);
protected:
//! Constructor
CEcosystemAware(IEcosystemProvider *EcosystemProvider) : IProviderAware(EcosystemProvider) { Q_ASSERT(EcosystemProvider); }