swift
corefacade.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 "core/corefacade.h"
5 
6 #include <QDBusConnection>
7 #include <QElapsedTimer>
8 #include <QMap>
9 #include <QObject>
10 #include <QString>
11 #include <QStringBuilder>
12 #include <QtGlobal>
13 
14 #include "core/airspacemonitor.h"
26 #include "core/corefacadeconfig.h"
28 #include "core/registermetadata.h"
29 #include "misc/dbusserver.h"
30 #include "misc/identifier.h"
31 #include "misc/loghistory.h"
32 #include "misc/logmessage.h"
33 #include "misc/registermetadata.h"
35 #include "misc/statusmessage.h"
36 #include "misc/stringutils.h"
37 #include "misc/verify.h"
38 
39 using namespace swift::misc;
40 using namespace swift::misc::aviation;
41 using namespace swift::misc::simulation;
42 using namespace swift::core::data;
43 using namespace swift::core::context;
44 
45 namespace swift::core
46 {
47  CCoreFacade::CCoreFacade(const CCoreFacadeConfig &config, QObject *parent) : QObject(parent), m_config(config)
48  {
49  this->init();
50  }
51 
53  {
54  if (m_shuttingDown) { return CStatusMessage(this, CStatusMessage::SeverityInfo, u"Shutdown"); }
55  if (!m_config.requiresDBusConnection())
56  {
57  return CStatusMessage(this, CStatusMessage::SeverityInfo, u"Not DBus based");
58  }
59  const QString dBusAddress = this->getDBusAddress();
60  if (dBusAddress.isEmpty())
61  {
62  return CStatusMessage(this, CStatusMessage::SeverityInfo, u"Not DBus based, no address");
63  }
64  QString connectMsg;
65  if (!CContextApplicationProxy::isContextResponsive(dBusAddress, connectMsg))
66  {
68  u"Cannot connect DBus at '" % dBusAddress % u"', reason: " % connectMsg);
69  }
70 
71  // re-init
72  m_initalized = false;
73  this->init();
74 
75  // success
76  return CStatusMessage(this, CStatusMessage::SeverityInfo, u"Re-initialized via '%1'") << dBusAddress;
77  }
78 
79  void CCoreFacade::init()
80  {
81  if (m_initalized || m_shuttingDown) { return; }
82 
84  QElapsedTimer time;
86 
87  // either use explicit setting or last value
88  const QString dbusAddress = this->getDBusAddress();
89  m_launcherSetup.setProperty(CLauncherSetup::IndexDBusAddress, dbusAddress);
90 
91  // DBus
92  time.start();
93  if (m_config.requiresDBusSever()) { this->initDBusServer(dbusAddress); }
94  if (m_config.requiresDBusConnection())
95  {
96  this->initDBusConnection(dbusAddress);
97  if (!m_dbusConnection.isConnected())
98  {
99  const QString e = m_dbusConnection.lastError().message();
100  SWIFT_VERIFY_X(false, "CRuntime::init DBus problem", e.toUtf8().constData());
101  CLogMessage(this).error(u"DBus connection failed: '%1'") << e;
102  return;
103  }
104  }
105  times.insert("DBus", time.restart());
106 
107  // shared state infrastructure
108  m_dataLinkDBus = new shared_state::CDataLinkDBus(this);
109  switch (m_config.getMode())
110  {
112  case CCoreFacadeConfig::Local: m_dataLinkDBus->initializeLocal(nullptr); break;
113  case CCoreFacadeConfig::LocalInDBusServer: m_dataLinkDBus->initializeLocal(m_dbusServer); break;
115  m_dataLinkDBus->initializeRemote(m_dbusConnection, CDBusServer::coreServiceName(m_dbusConnection));
116  break;
117  default: qFatal("Invalid application context mode");
118  }
119 
120  // shared log history
121  m_logHistorySource = new CLogHistorySource(this);
122  m_logHistorySource->initialize(m_dataLinkDBus);
123  if (m_config.getMode() == CCoreFacadeConfig::Local ||
125  {
126  m_logHistory = new CLogHistory(this);
127  m_logHistory->initialize(m_dataLinkDBus);
128  }
129 
130  if (m_config.getMode() == CCoreFacadeConfig::NotUsed)
131  {
132  m_initalized = true;
133  return;
134  }
135 
136  // contexts
137  if (m_contextApplication) { m_contextApplication->deleteLater(); }
138  m_contextApplication = IContextApplication::create(this, m_config.getMode(), m_dbusServer, m_dbusConnection);
139  times.insert("Application", time.restart());
140 
141  if (m_contextAudio) { m_contextAudio->deleteLater(); }
142  m_contextAudio = qobject_cast<CContextAudioBase *>(
143  IContextAudio::create(this, m_config.getMode(), m_dbusServer, m_dbusConnection));
144  times.insert("Audio", time.restart());
145 
146  if (m_contextOwnAircraft) { m_contextOwnAircraft->deleteLater(); }
147  m_contextOwnAircraft = IContextOwnAircraft::create(this, m_config.getMode(), m_dbusServer, m_dbusConnection);
148  times.insert("Own aircraft", time.restart());
149 
150  if (m_contextSimulator) { m_contextSimulator->deleteLater(); }
151  m_contextSimulator = IContextSimulator::create(this, m_config.getMode(), m_dbusServer, m_dbusConnection);
152  times.insert("Simulator", time.restart());
153 
154  // depends on own aircraft and simulator context, which is bad style
155  if (m_contextNetwork) { m_contextNetwork->deleteLater(); }
156  m_contextNetwork = IContextNetwork::create(this, m_config.getMode(), m_dbusServer, m_dbusConnection);
157  times.insert("Network", time.restart());
158 
159  // checks --------------
160  // 1. own aircraft and simulator should reside in same location
161  Q_ASSERT(!m_contextSimulator || (m_contextOwnAircraft->isUsingImplementingObject() ==
162  m_contextSimulator->isUsingImplementingObject()));
163 
164  // 2. own aircraft and network should reside in same location
165  Q_ASSERT(!m_contextNetwork ||
166  (m_contextOwnAircraft->isUsingImplementingObject() == m_contextNetwork->isUsingImplementingObject()));
167 
168  // post inits, wiring things among context (e.g. signal slots)
169  time.restart();
170  this->initPostSetup(times);
171  times.insert("Post setup", time.restart());
172  CLogMessage(this).info(u"Init times: %1") << qmapToString(times);
173 
174  // flag
175  m_initalized = true;
176  }
177 
179  {
182  }
183 
184  bool CCoreFacade::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
185  {
186  bool handled = false;
187  // audio can be empty depending on whre it runs
188  if (this->getIContextAudio() && !this->getIContextAudio()->isEmptyObject())
189  {
190  handled = handled || this->getIContextAudio()->parseCommandLine(commandLine, originator);
191  }
192  if (this->getIContextNetwork())
193  {
194  handled = handled || this->getIContextNetwork()->parseCommandLine(commandLine, originator);
195  }
196  if (this->getIContextOwnAircraft())
197  {
198  handled = handled || this->getIContextOwnAircraft()->parseCommandLine(commandLine, originator);
199  }
200  if (this->getIContextSimulator())
201  {
202  handled = handled || this->getIContextSimulator()->parseCommandLine(commandLine, originator);
203  }
204  return handled;
205  }
206 
207  void CCoreFacade::initDBusServer(const QString &dBusAddress)
208  {
209  Q_ASSERT(!dBusAddress.isEmpty());
210  if (m_dbusServer) { m_dbusServer->deleteLater(); } // delete if there was an existing one
211  m_dbusServer = new CDBusServer(dBusAddress, this);
212  CLogMessage(this).info(u"DBus server on address: '%1'") << dBusAddress;
213  }
214 
215  void CCoreFacade::initPostSetup(QMap<QString, qint64> &times)
216  {
217  bool c = false;
218  Q_UNUSED(c) // for release version
219  QElapsedTimer time;
220  time.start();
221 
222  times.insert("Post setup, connects first", time.restart());
223 
224  // local simulator?
225  if (m_contextSimulator && m_contextSimulator->isUsingImplementingObject())
226  {
227  // only connect if network runs locally, no round trips
228  // remark: from a design perspective it would be nice if those could be avoided (seperation of concerns)
229  // those connects here reprent cross context dependencies
230  if (m_contextNetwork && m_contextNetwork->isUsingImplementingObject())
231  {
232  Q_ASSERT_X(this->getCContextNetwork(), Q_FUNC_INFO, "No local network object");
233  Q_ASSERT_X(this->getCContextNetwork()->airspace(), Q_FUNC_INFO, "No airspace object");
234 
235  c = connect(m_contextNetwork, &IContextNetwork::textMessagesReceived, this->getCContextSimulator(),
236  &CContextSimulator::xCtxTextMessagesReceived, Qt::QueuedConnection);
237  Q_ASSERT(c);
238 
239  // use readyForModelMatching instead of CAirspaceMonitor::addedAircraft, as it contains client
240  // information ready for model matching is sent delayed when all information are available
241  c = connect(m_contextNetwork, &IContextNetwork::readyForModelMatching, this->getCContextSimulator(),
242  &CContextSimulator::xCtxAddedRemoteAircraftReadyForModelMatching, Qt::QueuedConnection);
243  Q_ASSERT(c);
244  c = connect(m_contextNetwork, &IContextNetwork::removedAircraft, this->getCContextSimulator(),
245  &CContextSimulator::xCtxRemovedRemoteAircraft, Qt::QueuedConnection);
246  Q_ASSERT(c);
247  c = connect(m_contextNetwork, &IContextNetwork::changedRemoteAircraftModel,
248  this->getCContextSimulator(), &CContextSimulator::xCtxChangedRemoteAircraftModel,
249  Qt::QueuedConnection);
250  Q_ASSERT(c);
251  c = connect(m_contextNetwork, &IContextNetwork::changedRemoteAircraftEnabled,
252  this->getCContextSimulator(), &CContextSimulator::xCtxChangedRemoteAircraftEnabled,
253  Qt::QueuedConnection);
254  Q_ASSERT(c);
255  c = connect(m_contextNetwork, &IContextNetwork::connectionStatusChanged, this->getCContextSimulator(),
256  &CContextSimulator::xCtxNetworkConnectionStatusChanged, Qt::QueuedConnection);
257  Q_ASSERT(c);
258  c = connect(this->getCContextNetwork()->airspace(), &CAirspaceMonitor::requestedNewAircraft,
259  this->getCContextSimulator(), &CContextSimulator::xCtxNetworkRequestedNewAircraft,
260  Qt::QueuedConnection);
261  Q_ASSERT(c);
262  c = connect(this->getCContextSimulator(), &CContextSimulator::renderRestrictionsChanged,
263  this->getCContextNetwork(), &CContextNetwork::xCtxSimulatorRenderRestrictionsChanged,
264  Qt::QueuedConnection);
265  Q_ASSERT(c);
266  c = connect(this->getCContextSimulator(), &CContextSimulator::simulatorStatusChanged,
267  this->getCContextNetwork(), &CContextNetwork::xCtxSimulatorStatusChanged,
268  Qt::QueuedConnection);
269  Q_ASSERT(c);
270 
271  // set provider
273  }
274 
275  // only if own aircraft runs locally
276  if (m_contextOwnAircraft && m_contextOwnAircraft->isUsingImplementingObject())
277  {
278  c = connect(m_contextOwnAircraft, &IContextOwnAircraft::changedAircraftCockpit,
279  this->getCContextSimulator(), &CContextSimulator::xCtxUpdateSimulatorCockpitFromContext);
280  Q_ASSERT(c);
281  c = connect(m_contextOwnAircraft, &IContextOwnAircraft::changedSelcal, this->getCContextSimulator(),
282  &CContextSimulator::xCtxUpdateSimulatorSelcalFromContext);
283  Q_ASSERT(c);
284 
285  // relay changed aircraft to own aircraft provider but with identifier
286  // identifier is needed because own aircraft context also reports changed aircraft to
287  // xCtxChangedOwnAircraftModel and we avoid roundtrips
288  c = connect(this->getCContextSimulator(), &CContextSimulator::ownAircraftModelChanged,
289  this->getCContextOwnAircraft(), [=](const CAircraftModel &changedModel) {
290  if (!this->getIContextOwnAircraft()) { return; }
291  if (!this->getCContextSimulator()) { return; }
292  this->getCContextOwnAircraft()->xCtxChangedSimulatorModel(
293  changedModel, this->getCContextSimulator()->identifier());
294  });
295 
296  Q_ASSERT(c);
297  c = connect(this->getCContextSimulator(), &CContextSimulator::simulatorStatusChanged,
298  this->getCContextOwnAircraft(), &CContextOwnAircraft::xCtxChangedSimulatorStatus);
299  Q_ASSERT(c);
300 
301  // this is used if the value in own aircraft is changed, to callback simulator
302  c = connect(this->getCContextOwnAircraft(), &CContextOwnAircraft::ps_changedModel,
303  this->getCContextSimulator(), &CContextSimulator::xCtxChangedOwnAircraftModel);
304  Q_ASSERT(c);
305  }
306 
307  // times
308  times.insert("Post setup, sim.connects", time.restart());
309  }
310 
311  // connection status of network changed
312  // with AFV no longer use m_contextAudio->isUsingImplementingObject() as audio can run on both sides
313  if (this->getCContextAudioBase() && m_contextNetwork)
314  {
315  Q_ASSERT(m_contextApplication);
316  c = connect(m_contextNetwork, &IContextNetwork::connectionStatusChanged, this->getCContextAudioBase(),
317  &CContextAudio::xCtxNetworkConnectionStatusChanged, Qt::QueuedConnection);
318  Q_ASSERT(c);
319  times.insert("Post setup, connects audio", time.restart());
320  }
321  }
322 
324  {
325  QString dbusAddress;
326  if (m_config.hasDBusAddress()) { dbusAddress = m_config.getDBusAddress(); }
327  else
328  {
329  const CLauncherSetup setup = m_launcherSetup.get();
330  dbusAddress = setup.getDBusAddress();
331  }
332  return dbusAddress;
333  }
334 
336  {
337  if (!m_initalized) { return; }
338  if (m_shuttingDown) { return; }
339  m_shuttingDown = true;
340 
341  // disable all signals towards runtime
342  disconnect(this);
343 
344  // tear down shared state infrastructure
345  delete m_logHistory;
346  m_logHistory = nullptr;
347  delete m_logHistorySource;
348  m_logHistorySource = nullptr;
349  delete m_dataLinkDBus;
350  m_dataLinkDBus = nullptr;
351 
352  // unregister all from DBus
353  if (m_dbusServer) { m_dbusServer->removeAllObjects(); }
354 
355  // handle contexts
356 
357  if (this->getCContextAudioBase())
358  {
359  // there is no empty audio context since AFV
360  disconnect(this->getCContextAudioBase());
362  this->getIContextAudio()->deleteLater();
363  m_contextAudio = nullptr;
364  }
365 
366  // log off from network, if connected
367  if (this->getIContextNetwork())
368  {
369  disconnect(this->getIContextNetwork());
371  if (m_contextNetwork->isUsingImplementingObject())
372  {
373  this->getCContextNetwork()->gracefulShutdown(); // for threads
374  }
375  this->getIContextNetwork()->deleteLater();
376  // replace by dummy object avoiding nullptr issues during shutdown phase
377  QDBusConnection defaultConnection("default");
378  m_contextNetwork = IContextNetwork::create(this, CCoreFacadeConfig::NotUsed, nullptr, defaultConnection);
379  }
380 
381  if (this->getIContextSimulator())
382  {
383  disconnect(this->getIContextSimulator());
384  if (this->getIContextSimulator()->isUsingImplementingObject())
385  {
386  // shutdown the plugins
388  }
389  this->getIContextSimulator()->deleteLater();
390  QDBusConnection defaultConnection("default");
391  m_contextSimulator =
392  IContextSimulator::create(this, CCoreFacadeConfig::NotUsed, nullptr, defaultConnection);
393  }
394 
395  if (this->getIContextOwnAircraft())
396  {
397  disconnect(this->getIContextOwnAircraft());
398  this->getIContextOwnAircraft()->deleteLater();
399  QDBusConnection defaultConnection("default");
400  m_contextOwnAircraft =
401  IContextOwnAircraft::create(this, CCoreFacadeConfig::NotUsed, nullptr, defaultConnection);
402  }
403 
404  if (this->getIContextApplication())
405  {
406  disconnect(this->getIContextApplication());
407  this->getIContextApplication()->deleteLater();
408  QDBusConnection defaultConnection("default");
409  m_contextApplication =
410  IContextApplication::create(this, CCoreFacadeConfig::NotUsed, nullptr, defaultConnection);
411  }
412  }
413 
414  void CCoreFacade::initDBusConnection(const QString &address)
415  {
416  if (m_initDBusConnection) { return; }
417  if (address.isEmpty() || address == CDBusServer::sessionBusAddress())
418  {
419  QDBusConnection::disconnectFromBus(m_dbusConnection.name());
420  m_dbusConnection = QDBusConnection::sessionBus();
421  }
422  else if (address == CDBusServer::systemBusAddress())
423  {
424  QDBusConnection::disconnectFromBus(m_dbusConnection.name());
425  m_dbusConnection = QDBusConnection::systemBus();
426  }
427  else
428  {
429  const QString name(CDBusServer::p2pConnectionName() + " " + address);
430  QDBusConnection::disconnectFromPeer(name);
431  m_dbusConnection = QDBusConnection::connectToPeer(address, name);
432  }
433  }
434 
435  const IContextApplication *CCoreFacade::getIContextApplication() const { return m_contextApplication; }
436 
437  IContextApplication *CCoreFacade::getIContextApplication() { return m_contextApplication; }
438 
439  IContextAudio *CCoreFacade::getIContextAudio() { return m_contextAudio; }
440 
441  const IContextAudio *CCoreFacade::getIContextAudio() const { return m_contextAudio; }
442 
444 
445  const CContextAudioBase *CCoreFacade::getCContextAudioBase() const { return m_contextAudio; }
446 
447  IContextNetwork *CCoreFacade::getIContextNetwork() { return m_contextNetwork; }
448 
449  const IContextNetwork *CCoreFacade::getIContextNetwork() const { return m_contextNetwork; }
450 
451  IContextOwnAircraft *CCoreFacade::getIContextOwnAircraft() { return m_contextOwnAircraft; }
452 
453  const IContextOwnAircraft *CCoreFacade::getIContextOwnAircraft() const { return m_contextOwnAircraft; }
454 
455  const IContextSimulator *CCoreFacade::getIContextSimulator() const { return m_contextSimulator; }
456 
457  IContextSimulator *CCoreFacade::getIContextSimulator() { return m_contextSimulator; }
458 
460  {
461  Q_ASSERT_X(m_contextAudio && m_contextAudio->isUsingImplementingObject(), "CCoreRuntime",
462  "Cannot downcast to local object");
463  return static_cast<CContextAudio *>(m_contextAudio);
464  }
465 
467  {
468  Q_ASSERT_X(m_contextAudio && m_contextAudio->isUsingImplementingObject(), "CCoreRuntime",
469  "Cannot downcast to local object");
470  return static_cast<CContextAudio *>(m_contextAudio);
471  }
472 
474  {
475  Q_ASSERT_X(m_contextApplication && m_contextApplication->isUsingImplementingObject(), "CCoreRuntime",
476  "Cannot downcast to local object");
477  return static_cast<CContextApplication *>(m_contextApplication);
478  }
479 
481  {
482  Q_ASSERT_X(m_contextApplication && m_contextApplication->isUsingImplementingObject(), "CCoreRuntime",
483  "Cannot downcast to local object");
484  return static_cast<CContextApplication *>(m_contextApplication);
485  }
486 
488  {
489  Q_ASSERT_X(m_contextNetwork && m_contextNetwork->isUsingImplementingObject(), "CCoreRuntime",
490  "Cannot downcast to local object");
491  return static_cast<CContextNetwork *>(m_contextNetwork);
492  }
493 
495  {
496  Q_ASSERT_X(m_contextNetwork && m_contextNetwork->isUsingImplementingObject(), "CCoreRuntime",
497  "Cannot downcast to local object");
498  return static_cast<CContextNetwork *>(m_contextNetwork);
499  }
500 
502  {
503  Q_ASSERT_X(m_contextOwnAircraft && m_contextOwnAircraft->isUsingImplementingObject(), "CCoreRuntime",
504  "Cannot downcast to local object");
505  return static_cast<CContextOwnAircraft *>(m_contextOwnAircraft);
506  }
507 
509  {
510  Q_ASSERT_X(m_contextOwnAircraft && m_contextOwnAircraft->isUsingImplementingObject(), "CCoreRuntime",
511  "Cannot downcast to local object");
512  return static_cast<CContextOwnAircraft *>(m_contextOwnAircraft);
513  }
514 
516  {
517  Q_ASSERT_X(m_contextSimulator && m_contextSimulator->isUsingImplementingObject(), "CCoreRuntime",
518  "Cannot downcast to local object");
519  return static_cast<CContextSimulator *>(m_contextSimulator);
520  }
521 
523  {
524  Q_ASSERT_X(m_contextSimulator && m_contextSimulator->isUsingImplementingObject(), "CCoreRuntime",
525  "Cannot downcast to local object");
526  return static_cast<CContextSimulator *>(m_contextSimulator);
527  }
528 } // namespace swift::core
Configuration object for the contexts.
bool hasDBusAddress() const
DBus address?
bool requiresDBusSever() const
Requires server (at least one in server)?
ContextMode getMode() const
Mode.
bool requiresDBusConnection() const
Requires DBus connection (at least one remote)?
@ NotUsed
during shutdown or not used at all
@ Local
context runs in same process
@ Remote
context runs in a different process.
@ LocalInDBusServer
context runs in same process.
QString getDBusAddress() const
DBus address.
context::CContextSimulator * getCContextSimulator()
Context for simulator.
Definition: corefacade.cpp:515
void gracefulShutdown()
Clean up (will be connected to signal QCoreApplication::aboutToQuit)
Definition: corefacade.cpp:335
context::IContextAudio * getIContextAudio()
Context for audio.
Definition: corefacade.cpp:439
context::IContextOwnAircraft * getIContextOwnAircraft()
Context for own aircraft.
Definition: corefacade.cpp:451
context::IContextApplication * getIContextApplication()
Context for application.
Definition: corefacade.cpp:437
QString getDBusAddress() const
DBus address if any.
Definition: corefacade.cpp:323
context::IContextNetwork * getIContextNetwork()
Context for network.
Definition: corefacade.cpp:447
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Parse command line in all contexts.
Definition: corefacade.cpp:184
context::CContextAudio * getCContextAudio()
Context for audio.
Definition: corefacade.cpp:459
context::IContextSimulator * getIContextSimulator()
Context for simulator.
Definition: corefacade.cpp:457
context::CContextApplication * getCContextApplication()
Context for application.
Definition: corefacade.cpp:473
swift::misc::CStatusMessage tryToReconnectWithDBus()
In case connection between DBus parties is lost, try to reconnect.
Definition: corefacade.cpp:52
context::CContextNetwork * getCContextNetwork()
Context for network.
Definition: corefacade.cpp:487
context::CContextOwnAircraft * getCContextOwnAircraft()
Context for own aircraft.
Definition: corefacade.cpp:501
static void registerMetadata()
Register metadata.
Definition: corefacade.cpp:178
context::CContextAudioBase * getCContextAudioBase()
Context for audio.
Definition: corefacade.cpp:443
void gracefulShutdown()
Graceful shutdown.
Audio context implementation.
Network context implementation.
void gracefulShutdown()
Gracefully shut down, e.g. for thread safety.
void setSimulationEnvironmentProvider(swift::misc::simulation::ISimulationEnvironmentProvider *provider)
Set the provider.
Own aircraft context implementation. Central instance of data for.
Network simulator concrete implementation.
void gracefulShutdown()
Gracefully shut down, e.g. for plugin unloading.
Audio context interface.
Definition: contextaudio.h:61
bool isUsingImplementingObject() const
Using local implementing object?
Definition: context.h:45
virtual bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)=0
Parse a given command line.
virtual swift::misc::CStatusMessage disconnectFromNetwork()=0
Disconnect from network.
const QString & getDBusAddress() const
Destructor.
Definition: launchersetup.h:56
Custom DBusServer.
Definition: dbusserver.h:34
void removeAllObjects()
Remove all objects added with addObject.
Definition: dbusserver.cpp:297
static const QString & systemBusAddress()
Address denoting a system bus server.
Definition: dbusserver.cpp:325
static const QString & sessionBusAddress()
Address denoting a session bus server.
Definition: dbusserver.cpp:319
static const QString & p2pConnectionName()
P2P connection name.
Definition: dbusserver.cpp:399
static const QString & coreServiceName()
Default service name.
Definition: dbusserver.cpp:98
Value object encapsulating information identifying a component of a modular distributed swift process...
Definition: identifier.h:29
Records all log messages to a list that persists for the lifetime of the application.
Definition: loghistory.h:24
Allows distributed insertion of log messages into a central CLogHistory.
Definition: loghistory.h:37
Class for emitting a log message.
Definition: logmessage.h:27
Derived & error(const char16_t(&format)[N])
Set the severity to error, providing a format string.
Derived & info(const char16_t(&format)[N])
Set the severity to info, providing a format string.
Streamable status message, e.g.
constexpr static auto SeverityError
Status severities.
constexpr static auto SeverityInfo
Status severities.
void initialize(IDataLink *)
Publish using the given transport mechanism.
Definition: listjournal.cpp:12
void initialize(IDataLink *)
Publish using the given transport mechanism.
Definition: listmutator.cpp:12
Aircraft model (used by another pilot, my models on disk)
Definition: aircraftmodel.h:71
Core data traits (aka cached values) and classes.
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7
void registerMetadata()
Register all relevant metadata in swift::core.
Free functions in swift::misc.
void registerMetadata()
Register all relevant metadata in Misc.
QString qmapToString(const QMap< K, V > &map)
A map converted to string.
Definition: stringutils.h:137
#define SWIFT_VERIFY_X(COND, WHERE, WHAT)
A weaker kind of assert.
Definition: verify.h:26