swift
Loading...
Searching...
No Matches
vatsimdatafilereader.h
Go to the documentation of this file.
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
5
6#ifndef SWIFT_CORE_VATSIM_VATSIMDATAFILEREADER_H
7#define SWIFT_CORE_VATSIM_VATSIMDATAFILEREADER_H
8
9#include <QMap>
10#include <QObject>
11#include <QString>
12#include <QStringList>
13
22#include "misc/datacache.h"
27
28class QNetworkReply;
29
30namespace swift::misc::simulation
31{
33}
34namespace swift::core::vatsim
35{
38 {
40
41 public:
44
48
52
57
62
67
71
76
81
86
90
95
100
105
110
114
115 signals:
117 void dataFileRead(int kB);
118
120 void dataRead(swift::misc::network::CEntityFlags::Entity entity,
121 swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url);
122
123 protected:
124 // CThreadedReader overrides
125 void doWorkImpl() override;
126
127 private:
131 this, &CVatsimDataFileReader::reloadSettings
132 };
134 m_flightPlanRemarks;
135
137 void parseVatsimFile(QNetworkReply *nwReply);
138
140 QStringList &o_illegalEquipmentCodes) const;
141 swift::misc::aviation::CFlightPlanRemarks parseFlightPlanRemarks(const QJsonObject &) const;
142 swift::misc::aviation::CAtcStation parseController(const QJsonObject &) const;
143
145 void read();
146
148 void reloadSettings();
149 };
150} // namespace swift::core::vatsim
151
152#endif // SWIFT_CORE_VATSIM_VATSIMDATAFILEREADER_H
CThreadedReaderPeriodic(QObject *owner, const QString &name)
Constructor.
swift::misc::network::CUserList getControllersForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Controllers for callsigns.
swift::misc::aviation::CFlightPlanRemarks getFlightPlanRemarksForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Flight plan remarks for callsign.
void dataRead(swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url)
Data have been read.
swift::misc::network::CUserList getPilotsForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Users for callsigns.
swift::misc::aviation::CAirlineIcaoCode getAirlineIcaoCode(const swift::misc::aviation::CCallsign &callsign) const
Airline ICAO info for callsign.
void dataFileRead(int kB)
Data have been read.
void doWorkImpl()
This method does the actual work in the derived class.
swift::misc::aviation::CAtcStationList getAtcStationsForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Get ATC stations for callsigns.
swift::misc::aviation::CAtcStationList getAtcStationsForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Get ATC stations for callsign.
swift::misc::network::CVoiceCapabilities getVoiceCapabilityForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Voice capability for callsign.
void updateWithVatsimDataFileData(swift::misc::simulation::CSimulatedAircraft &aircraftToBeUdpated) const
Update aircraft with VATSIM aircraft data from data file.
swift::misc::network::CUserList getUsersForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Users for callsign(s).
swift::misc::network::CUserList getPilotsForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Users for callsign.
swift::misc::network::CUserList getControllersForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Controllers for callsign.
swift::misc::aviation::CAtcStationList getAtcStations() const
Get ATC station.
swift::misc::network::CUserList getUsersForCallsign(const swift::misc::aviation::CCallsign &callsign) const
User for callsign.
swift::misc::aviation::CAircraftIcaoCode getAircraftIcaoCode(const swift::misc::aviation::CCallsign &callsign) const
Aircraft ICAO info for callsign.
swift::misc::simulation::CSimulatedAircraftList getAircraft() const
Get aircraft.
const QObject * owner() const
Owner of the worker.
Definition worker.h:352
Class template for accessing a specific value in the CSettingsCache.
Value object for ICAO classification.
Value object for ICAO classification.
Value object encapsulating information about an ATC station.
Definition atcstation.h:38
Value object for a list of ATC stations.
Value object encapsulating information of a callsign.
Definition callsign.h:30
Value object for a set of callsigns.
Definition callsignset.h:26
Flight plan remarks, parsed values.
Definition flightplan.h:46
Value object encapsulating a list of voice rooms.
Definition userlist.h:26
Value object encapsulating information for voice capabilities.
Comprehensive information of an aircraft.
Value object encapsulating a list of aircraft.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.