mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Ref T272, network can add as ECO system provider (the server connected knows its ECO system)
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "blackmisc/network/rawfsdmessage.h"
|
||||
#include "blackmisc/network/serverlist.h"
|
||||
#include "blackmisc/network/clientprovider.h"
|
||||
#include "blackmisc/network/ecosystemprovider.h"
|
||||
#include "blackmisc/network/clientlist.h"
|
||||
#include "blackmisc/network/textmessagelist.h"
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
@@ -59,11 +60,13 @@ namespace BlackCore
|
||||
*/
|
||||
class BLACKCORE_EXPORT INetwork :
|
||||
public QObject,
|
||||
public BlackMisc::Network::CClientAware, // network vatlib consumes own aircraft data and sets ICAO/callsign data
|
||||
public BlackMisc::Simulation::COwnAircraftAware, // network vatlib consumes own aircraft data and sets ICAO/callsign data
|
||||
public BlackMisc::Network::IEcosystemProvider, // provide info about used ecosystem
|
||||
public BlackMisc::Network::CClientAware, // network can set client information
|
||||
public BlackMisc::Simulation::COwnAircraftAware, // network vatlib consumes own aircraft data and sets ICAO/callsign data
|
||||
public BlackMisc::Simulation::CSimulationEnvironmentAware // allows to consume ground elevations
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(BlackMisc::Network::IEcosystemProvider)
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
|
||||
@@ -277,6 +277,7 @@ namespace BlackCore
|
||||
if (m_status == vatStatusConnected)
|
||||
{
|
||||
m_server.setConnectedSinceNow();
|
||||
this->setCurrentEcosystem(m_server.getEcosystem());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -287,6 +288,8 @@ namespace BlackCore
|
||||
{
|
||||
this->stopPositionTimers();
|
||||
this->clearState();
|
||||
this->setLastEcosystem(m_server.getEcosystem());
|
||||
this->setCurrentEcosystem(CEcosystem::NoSystem);
|
||||
}
|
||||
|
||||
emit this->connectionStatusChanged(convertConnectionStatus(status), convertConnectionStatus(m_status));
|
||||
|
||||
Reference in New Issue
Block a user