swift
vatsimstatusfilereader.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_VATSIMSTATUSFILEREADER_H
7 #define SWIFT_CORE_VATSIM_VATSIMSTATUSFILEREADER_H
8 
9 #include <QObject>
10 
11 #include "core/data/vatsimsetup.h"
12 #include "core/swiftcoreexport.h"
13 #include "core/threadedreader.h"
14 #include "misc/datacache.h"
16 #include "misc/network/url.h"
17 
18 class QNetworkReply;
19 
20 namespace swift::core::vatsim
21 {
25  {
26  Q_OBJECT
27 
28  public:
30  explicit CVatsimStatusFileReader(QObject *owner);
31 
34  swift::misc::network::CUrl getMetarFileUrl() const;
35 
38  swift::misc::network::CUrl getDataFileUrl() const;
39 
41  void readInBackgroundThread();
42 
43  signals:
45  void statusFileRead(int bytes);
46 
48  void dataRead(swift::misc::network::CEntityFlags::Entity entity,
50 
51  private:
53  void read();
54 
56  void parseVatsimFile(QNetworkReply *nwReply);
57 
59  };
60 } // namespace swift::core::vatsim
61 
62 #endif // SWIFT_CORE_VATSIM_VATSIMSTATUSFILEREADER_H
Support for threaded based reading and parsing tasks such as data files via http, or file system and ...
Sole purpose is to read the URLs where VATSIM data can be downloaded.
void dataRead(swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CEntityFlags::ReadState state, int bytes)
Data have been read.
void statusFileRead(int bytes)
Data have been read.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
Definition: url.h:27
#define SWIFT_CORE_EXPORT
Export a class or function from the library.