swift
Loading...
Searching...
No Matches
vatsimserverfilereader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2023 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_VATSIMSERVERFILEREADER_H
7#define SWIFT_CORE_VATSIM_VATSIMSERVERFILEREADER_H
8
9#include <QObject>
10#include <QString>
11
14#include "core/threadedreader.h"
17#include "misc/datacache.h"
21
22class QNetworkReply;
23
24namespace swift::core::vatsim
25{
29 {
31
32 public:
35
39
42
43 signals:
45 void dataFileRead(int bytes);
46
48 void dataRead(swift::misc::network::CEntityFlags::Entity entity,
49 swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url);
50
51 private:
53
55 void parseVatsimFile(QNetworkReply *nwReply);
56
57 swift::misc::network::CServer parseServer(const QJsonObject &) const;
58
60 void read();
61 };
62} // namespace swift::core::vatsim
63
64#endif // SWIFT_CORE_VATSIM_VATSIMSERVERFILEREADER_H
CThreadedReader(const CThreadedReader &)=delete
Copy constructor.
void dataRead(swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url)
Data have been read.
void readInBackgroundThread()
Start reading in own thread.
void dataFileRead(int bytes)
Data have been read.
swift::misc::network::CServerList getFsdServers() const
Get all VATSIM FSD servers.
const QObject * owner() const
Owner of the worker.
Definition worker.h:352
Class template for accessing a specific value in the CDataCache.
Definition datacache.h:315
Value object encapsulating information of a FSD server.
Definition server.h:28
Value object encapsulating a list of servers.
Definition serverlist.h:23
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.