swift
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
swift::core::context::IContextNetwork Class Referenceabstract

Network context proxy. More...

Inheritance diagram for swift::core::context::IContextNetwork:
[legend]

Public Types

using RawFsdMessageReceivedSlot = std::function< void(const swift::misc::network::CRawFsdMessage &)>
 Raw FSD message receiver functor.
 
- Public Types inherited from QObject
enum  TimerId
 

Public Slots

virtual swift::misc::aviation::CAtcStationList getAtcStationsOnline (bool recalculateDistance) const =0
 The ATC list with online ATC controllers.
 
virtual swift::misc::aviation::CAtcStationList getClosestAtcStationsOnline (int number) const =0
 The ATC list with online ATC controllers. More...
 
virtual swift::misc::simulation::CSimulatedAircraftList getAircraftInRange () const =0
 Aircraft list.
 
virtual swift::misc::aviation::CCallsignSet getAircraftInRangeCallsigns () const =0
 Aircraft callsigns.
 
virtual swift::misc::simulation::CSimulatedAircraft getAircraftInRangeForCallsign (const swift::misc::aviation::CCallsign &callsign) const =0
 Aircraft for given callsign.
 
virtual int getAircraftInRangeCount () const =0
 Aircraft count.
 
virtual bool isAircraftInRange (const swift::misc::aviation::CCallsign &callsign) const =0
 Aircraft in range.
 
virtual swift::misc::weather::CMetar getMetarForAirport (const swift::misc::aviation::CAirportIcaoCode &airportIcaoCode) const =0
 Get METAR, if not available request it (code such as EDDF, KLAX)
 
virtual swift::misc::aviation::CAtcStation getOnlineStationForCallsign (const swift::misc::aviation::CCallsign &callsign) const =0
 Online station for callsign.
 
virtual swift::misc::aviation::CAtcStationList getOnlineStationsForFrequency (const swift::misc::physical_quantities::CFrequency &frequency) const =0
 Online stations for frequency.
 
virtual bool isOnlineStation (const swift::misc::aviation::CCallsign &callsign) const =0
 Online station for callsign?
 
virtual swift::misc::network::CUserList getUsers () const =0
 Get all users.
 
virtual swift::misc::network::CUserList getUsersForCallsigns (const swift::misc::aviation::CCallsignSet &callsigns) const =0
 Users for given callsigns, e.g. for voice room resolution.
 
virtual swift::misc::network::CUser getUserForCallsign (const swift::misc::aviation::CCallsign &callsign) const =0
 User for given callsign, e.g. for text messages.
 
virtual swift::misc::network::CClientList getClients () const =0
 Information about other clients.
 
virtual swift::misc::network::CClientList getClientsForCallsigns (const swift::misc::aviation::CCallsignSet &callsigns) const =0
 Clients for given callsign, e.g. to test/fetch direct aircraft model.
 
virtual bool setOtherClient (const swift::misc::network::CClient &client)=0
 Set client for given callsign.
 
virtual swift::misc::network::CServerList getVatsimFsdServers () const =0
 Known FSD servers, available when data file was first read.
 
virtual void setFastPositionEnabledCallsigns (swift::misc::aviation::CCallsignSet &callsigns)=0
 Callsigns enabled for fast position updates.
 
virtual swift::misc::aviation::CCallsignSet getFastPositionEnabledCallsigns () const =0
 Callsigns enabled for fast position updates.
 
virtual swift::misc::CStatusMessage connectToNetwork (const swift::misc::network::CServer &server, const QString &extraLiveryString, bool sendLivery, const QString &extraModelString, bool sendModelString, const swift::misc::aviation::CCallsign &partnerCallsign, swift::misc::network::CLoginMode loginMode)=0
 Connect to Network. More...
 
virtual swift::misc::network::CServer getConnectedServer () const =0
 Server which is connected, if not connected empty default object.
 
virtual swift::misc::network::CLoginMode getLoginMode () const =0
 Login mode.
 
QString getLoginModeAsString () const
 Mode as string.
 
virtual swift::misc::CStatusMessage disconnectFromNetwork ()=0
 Disconnect from network. More...
 
virtual bool isConnected () const =0
 Network connected?
 
virtual void sendTextMessages (const swift::misc::network::CTextMessageList &textMessages)=0
 Text messages (radio and private chat messages)
 
virtual void sendFlightPlan (const swift::misc::aviation::CFlightPlan &flightPlan)=0
 Send flight plan.
 
virtual swift::misc::aviation::CFlightPlan loadFlightPlanFromNetwork (const swift::misc::aviation::CCallsign &callsign) const =0
 Load flight plan (from network)
 
virtual void requestAircraftDataUpdates ()=0
 Request data updates (pilot's frequencies, ATIS, ..)
 
virtual void requestAtisUpdates ()=0
 Request ATIS updates (for all stations)
 
virtual bool updateAircraftEnabled (const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)=0
 Enable/disable rendering.
 
virtual bool setAircraftEnabledFlag (const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)=0
 Set the enabled flag without any further logic like sending signals.
 
virtual bool updateAircraftSupportingGndFLag (const swift::misc::aviation::CCallsign &callsign, bool supportGndFlag)=0
 Enable/disable support of gnd. flag.
 
virtual bool updateAircraftModel (const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)=0
 Change model (for remote aircraft)
 
virtual bool updateAircraftNetworkModel (const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)=0
 Change network model (for remote aircraft)
 
virtual bool updateFastPositionEnabled (const swift::misc::aviation::CCallsign &callsign, bool enableFastPositionSending)=0
 Change fast position updates.
 
virtual int reInitializeAllAircraft ()=0
 Re-initialize all aircraft.
 
virtual swift::misc::CStatusMessageList getReverseLookupMessages (const swift::misc::aviation::CCallsign &callsign) const =0
 Get reverse lookup messages.
 
virtual swift::misc::simulation::ReverseLookupLogging isReverseLookupMessagesEnabled () const =0
 Enabled reverse lookup logging?
 
virtual void enableReverseLookupMessages (swift::misc::simulation::ReverseLookupLogging enable)=0
 Enable reverse lookup logging.
 
virtual swift::misc::CStatusMessageList getAircraftPartsHistory (const swift::misc::aviation::CCallsign &callsign) const =0
 Get aircraft parts history.
 
virtual swift::misc::aviation::CAircraftPartsList getRemoteAircraftParts (const swift::misc::aviation::CCallsign &callsign) const =0
 Get remote aircraft parts.
 
virtual bool isRemoteAircraftSupportingParts (const swift::misc::aviation::CCallsign &callsign) const =0
 Parts supported?
 
virtual bool isAircraftPartsHistoryEnabled () const =0
 Is storing the aircraft parts history enabled?
 
virtual void enableAircraftPartsHistory (bool enabled)=0
 Enable storing of aircraft parts.
 
virtual QString getNetworkStatistics (bool reset, const QString &separator)=0
 Statistics info.
 
virtual bool setNetworkStatisticsEnable (bool enabled)=0
 Statistics enable/disable.
 
virtual QStringList getNetworkPresetValues () const =0
 Network preset values.
 
virtual swift::misc::aviation::CCallsign getPartnerCallsign () const =0
 Partner callsign if any.
 
virtual void testCreateDummyOnlineAtcStations (int number)=0
 Create dummy ATC stations for performance tests etc.
 
virtual void testAddAircraftParts (const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CAircraftParts &parts, bool incremental)=0
 Inject aircraft parts for testing.
 
virtual void testReceivedTextMessages (const swift::misc::network::CTextMessageList &textMessages)=0
 Inject a text message as received.
 
virtual void testReceivedAtisMessage (const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CInformationMessage &msg)=0
 Inject an ATIS.
 
virtual void testRequestAircraftConfig (const swift::misc::aviation::CCallsign &callsign)=0
 Request parts for callsign (from another client)
 
virtual bool testAddAltitudeOffset (const swift::misc::aviation::CCallsign &callsign, const swift::misc::physical_quantities::CLength &offset=swift::misc::physical_quantities::CLength::null())=0
 Add altitude offset for testing.
 

Signals

void removedAircraft (const swift::misc::aviation::CCallsign &callsign)
 An aircraft disappeared.
 
void addedAircraft (const swift::misc::simulation::CSimulatedAircraft &remoteAircraft)
 A new aircraft appeared.
 
void readyForModelMatching (const swift::misc::simulation::CSimulatedAircraft &renderedAircraft)
 Read for model matching.
 
void changedAtcStationsOnline ()
 ATC station (online) list has been changed.
 
void changedAtcStationsOnlineDigest ()
 Digest signal changedAtcStationsOnline()
 
void changedAircraftInRange ()
 Aircraft list has been changed.
 
void changedAircraftInRangeDigest ()
 Digest signal changedAircraftInRange()
 
void changedRemoteAircraftModel (const swift::misc::simulation::CSimulatedAircraft &aircraft, const swift::misc::CIdentifier &originator)
 Aircraft model was changed. More...
 
void changedRemoteAircraftEnabled (const swift::misc::simulation::CSimulatedAircraft &aircraft)
 Aircraft enabled / disabled. More...
 
void changedFastPositionUpdates (const swift::misc::simulation::CSimulatedAircraft &aircraft)
 Aircraft enabled / disabled.
 
void changedGndFlagCapability (const swift::misc::simulation::CSimulatedAircraft &aircraft)
 Changed gnd. flag capability.
 
void atcStationDisconnected (const swift::misc::aviation::CAtcStation &atcStation)
 ATC station disconnected.
 
void kicked (const QString &kickMessage)
 User has been kicked from network.
 
void severeNetworkError (const QString &errorMessage)
 Network error.
 
void muteRequestReceived (bool mute)
 Mute request received.
 
void connectionStatusChanged (const swift::misc::network::CConnectionStatus &from, const swift::misc::network::CConnectionStatus &to)
 Connection status changed. More...
 
void connectedServerChanged (const swift::misc::network::CServer &server)
 The connected server has been changed. More...
 
void textMessagesReceived (const swift::misc::network::CTextMessageList &textMessages)
 Text messages received (also private chat messages, radio channel messages)
 
void supervisorTextMessageReceived (const swift::misc::network::CTextMessage &message)
 A supervisor text message was received.
 
void textMessageSent (const swift::misc::network::CTextMessage &sentMessage)
 Text message sent (by me)
 
- Signals inherited from swift::core::context::IContext
void changedLogOrDebugSettings ()
 Log or debug values changed.
 

Public Member Functions

virtual QString getPathAndContextId () const
 Id and path name for round trip protection. More...
 
virtual ~IContextNetwork ()
 Destructor.
 
virtual QMetaObject::Connection connectRawFsdMessageSignal (QObject *receiver, RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot)=0
 Connect to receive raw fsd messages.
 
- Public Member Functions inherited from swift::core::context::IContext
 ~IContext ()=default
 Destructor.
 
bool isUsingImplementingObject () const
 Using local implementing object?
 
bool isLocalObject () const
 Local or remote object?
 
bool isEmptyObject () const
 Empty object?
 
CCoreFacadegetRuntime ()
 Runtime.
 
const CCoreFacadegetRuntime () const
 Const runtime.
 
CCoreFacadeConfig::ContextMode getMode () const
 Mode.
 
qint64 getUniqueId () const
 Unique id.
 
const IContextApplicationgetIContextApplication () const
 Context for application.
 
IContextApplicationgetIContextApplication ()
 Application.
 
IContextAudiogetIContextAudio ()
 Context for network.
 
const IContextAudiogetIContextAudio () const
 Context for network.
 
IContextNetworkgetIContextNetwork ()
 Context for network.
 
const IContextNetworkgetIContextNetwork () const
 Context for network.
 
IContextOwnAircraftgetIContextOwnAircraft ()
 Context for own aircraft.
 
const IContextOwnAircraftgetIContextOwnAircraft () const
 Context for own aircraft.
 
const IContextSimulatorgetIContextSimulator () const
 Context for simulator.
 
IContextSimulatorgetIContextSimulator ()
 Simulator.
 
void setDebugEnabled (bool debug)
 Set debug flag.
 
bool isDebugEnabled () const
 Debug enabled?
 
virtual bool parseCommandLine (const QString &commandLine, const swift::misc::CIdentifier &originator)=0
 Parse a given command line.
 
- Public Member Functions inherited from QObject
QBindable< QStringbindableObjectName ()
 
 QObject (QObject *parent)
 
 QT_NO_CONTEXTLESS_CONNECT QT_NO_CONTEXTLESS_CONNECT
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUMS (...)
 
 Q_ENUM_NS (...)
 
 Q_FLAG (...)
 
 Q_FLAGS (...)
 
 Q_FLAG_NS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
bool blockSignals (bool block)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
bool moveToThread (QThread *targetThread)
 
bool setProperty (const char *name, QVariant &&value)
 
bool setProperty (const char *name, const QVariant &value)
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::nanoseconds interval, Qt::TimerType timerType)
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
void installEventFilter (QObject *filterObj)
 
void killTimer (Qt::TimerId id)
 
void killTimer (int id)
 
void objectNameChanged (const QString &objectName)
 
void removeEventFilter (QObject *obj)
 
void setObjectName (QAnyStringView name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
QList< QByteArraydynamicPropertyNames () const const
 
QList< T > findChildren (QAnyStringView name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
QObjectparent () const const
 
QString objectName () const const
 
QThreadthread () const const
 
QVariant property (const char *name) const const
 
findChild (QAnyStringView name, Qt::FindChildOptions options) const const
 
findChild (Qt::FindChildOptions options) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool inherits (const char *className) const const
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
bool signalsBlocked () const const
 
virtual const QMetaObjectmetaObject () const const
 
const QObjectListchildren () const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 

Static Public Member Functions

static const QStringInterfaceName ()
 DBus interface name.
 
static const QStringObjectPath ()
 DBus object path.
 
static IContextNetworkcreate (CCoreFacade *parent, CCoreFacadeConfig::ContextMode mode, swift::misc::CDBusServer *server, QDBusConnection &connection)
 Factory method.
 
static const QList< QCommandLineOption > & getCmdLineOptions ()
 Cmd.line arguments.
 
- Static Public Member Functions inherited from swift::core::context::IContext
static const QStringListgetLogCategories ()
 Log categories.
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 

Protected Member Functions

 IContextNetwork (CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime)
 Constructor.
 
- Protected Member Functions inherited from swift::core::context::IContext
 IContext (CCoreFacadeConfig::ContextMode mode, QObject *parent)
 Constructor.
 
QString buildPathAndContextId (const QString &path) const
 Path and context id.
 
void relayBaseClassSignals (const QString &serviceName, QDBusConnection &connection, const QString &objectPath, const QString &interfaceName)
 Relay signals from this class.
 
void logEmptyContextWarning (const QString &functionName) const
 Empty context called.
 
virtual void onAboutToShutdown ()
 Called when shutdown is about to be called.
 
void registerWithDBus (const QString &objectPath, misc::CDBusServer *server)
 Register myself in DBus.
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
virtual void timerEvent (QTimerEvent *event)
 
QObjectsender () const const
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
int senderSignalIndex () const const
 

Additional Inherited Members

- Public Attributes inherited from QObject
typedef QObjectList
 
 Invalid
 
- Static Protected Member Functions inherited from swift::core::context::IContext
static const misc::CStatusMessagestatusMessageEmptyContext ()
 Standard message when status message is returned in empty context.
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Network context proxy.

Definition at line 73 of file contextnetwork.h.

Member Function Documentation

◆ changedRemoteAircraftEnabled

void swift::core::context::IContextNetwork::changedRemoteAircraftEnabled ( const swift::misc::simulation::CSimulatedAircraft aircraft)
signal

Aircraft enabled / disabled.

All remote aircraft are stored in the network context. The aircraft can be enabled (for rendering) here via

See also
updateAircraftEnabled and then this signal is fired

◆ changedRemoteAircraftModel

void swift::core::context::IContextNetwork::changedRemoteAircraftModel ( const swift::misc::simulation::CSimulatedAircraft aircraft,
const swift::misc::CIdentifier originator 
)
signal

Aircraft model was changed.

All remote aircraft are stored in the network context. The model can be updated here via

See also
updateAircraftModel and then this signal is fired

◆ connectedServerChanged

void swift::core::context::IContextNetwork::connectedServerChanged ( const swift::misc::network::CServer server)
signal

The connected server has been changed.

Remarks
can also be used to determine if the ecosystem has been changed
See also
swift::misc::network::CServer::getEcosysstem

◆ connectionStatusChanged

void swift::core::context::IContextNetwork::connectionStatusChanged ( const swift::misc::network::CConnectionStatus from,
const swift::misc::network::CConnectionStatus to 
)
signal

Connection status changed.

See also
IContextNetwork::connectedServerChanged

◆ connectToNetwork

virtual swift::misc::CStatusMessage swift::core::context::IContextNetwork::connectToNetwork ( const swift::misc::network::CServer server,
const QString extraLiveryString,
bool  sendLivery,
const QString extraModelString,
bool  sendModelString,
const swift::misc::aviation::CCallsign partnerCallsign,
swift::misc::network::CLoginMode  loginMode 
)
pure virtualslot

Connect to Network.

Returns
messages generated during connecting

◆ disconnectFromNetwork

virtual swift::misc::CStatusMessage swift::core::context::IContextNetwork::disconnectFromNetwork ( )
pure virtualslot

Disconnect from network.

Returns
messages generated during disconnecting

◆ getClosestAtcStationsOnline

virtual swift::misc::aviation::CAtcStationList swift::core::context::IContextNetwork::getClosestAtcStationsOnline ( int  number) const
pure virtualslot

The ATC list with online ATC controllers.

Remarks
recalculates distance and picks closest elements
sorted by distance, nearest first

◆ getPathAndContextId()

virtual QString swift::core::context::IContextNetwork::getPathAndContextId ( ) const
inlinevirtual

Id and path name for round trip protection.

Implements swift::core::context::IContext.

Definition at line 94 of file contextnetwork.h.


The documentation for this class was generated from the following files: