swift
simulatorfsx.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
4 #include "simulatorfsx.h"
5 
6 #include "../fsxcommon/simconnectsymbols.h"
7 
8 using namespace swift::misc;
9 using namespace swift::misc::aviation;
10 using namespace swift::misc::physical_quantities;
11 using namespace swift::misc::geo;
12 using namespace swift::misc::network;
13 using namespace swift::misc::simulation;
14 using namespace swift::misc::simulation::fscommon;
15 using namespace swift::core;
16 
17 namespace swift::simplugin::fsx
18 {
19  CSimulatorFsx::CSimulatorFsx(const CSimulatorPluginInfo &info, IOwnAircraftProvider *ownAircraftProvider,
20  IRemoteAircraftProvider *remoteAircraftProvider, IClientProvider *clientProvider,
21  QObject *parent)
22  : CSimulatorFsxCommon(info, ownAircraftProvider, remoteAircraftProvider, clientProvider, parent)
23  {
24  this->setDefaultModel({ "Boeing 737-800 Paint1", CAircraftModel::TypeModelMatchingDefaultModel,
25  "B737-800 default model", CAircraftIcaoCode("B738", "L2J") });
26  }
27 
28  bool CSimulatorFsx::connectTo()
29  {
30  if (!loadAndResolveFsxSimConnect(true)) { return false; }
31  return CSimulatorFsxCommon::connectTo();
32  }
33 
34  void CSimulatorFsxListener::startImpl()
35  {
36  if (!loadAndResolveFsxSimConnect(true)) { return; }
37  return CSimulatorFsxCommonListener::startImpl();
38  }
39 
40 } // namespace swift::simplugin::fsx
Value object for ICAO classification.
Direct in memory access to client (network client) data.
Direct threadsafe in memory access to own aircraft.
Direct thread safe in memory access to remote aircraft.
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7
Free functions in swift::misc.
FSXCOMMON_EXPORT bool loadAndResolveFsxSimConnect(bool manifestProbing)
Load and resolve FSX SimConnect.