swift
webreaderflags.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2015 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_CWEBREADERFLAGS_H
7 #define SWIFT_CORE_CWEBREADERFLAGS_H
8 
9 #include <QFlags>
10 #include <QMetaType>
11 
12 #include "core/swiftcoreexport.h"
14 
15 namespace swift::core
16 {
21  {
22  public:
25  {
26  None = 0,
27  VatsimDataReader = 1 << 0,
28  VatsimMetarReader = 1 << 1,
29  VatsimStatusReader = 1 << 2,
30  VatsimServerFileReader = 1 << 3,
31  IcaoDataReader = 1 << 4,
32  ModelReader = 1 << 5,
33  AirportReader = 1 << 6,
34  DbInfoDataReader = 1 << 7,
35  AllVatsimReaders = VatsimDataReader | VatsimMetarReader | VatsimStatusReader |
36  VatsimServerFileReader,
37  AllSwiftDbReaders = IcaoDataReader | ModelReader | DbInfoDataReader | AirportReader,
38  AllReaders = AllSwiftDbReaders | AllVatsimReaders
39  };
40  Q_DECLARE_FLAGS(WebReader, WebReaderFlag)
41 
42 
43  static WebReader entitiesToReaders(swift::misc::network::CEntityFlags::Entity entities);
44 
46  static WebReader webReaderFlagToWebReader(WebReaderFlag flag);
47 
49  static swift::misc::network::CEntityFlags::Entity allEntitiesForReaders(WebReader readers);
50 
52  static bool isFromSwiftDb(swift::misc::network::CEntityFlags::Entity entity);
53 
55  static bool isFromSwiftDb(WebReader reader);
56 
58  static int numberOfReaders(WebReader readers);
59 
61  static bool isSingleReader(WebReader readers);
62  };
63 } // namespace swift::core
64 
66 Q_DECLARE_METATYPE(swift::core::CWebReaderFlags::WebReader)
67 Q_DECLARE_OPERATORS_FOR_FLAGS(swift::core::CWebReaderFlags::WebReader)
68 
69 #endif // SWIFT_CORE_CWEBREADERFLAGS_H
WebReaderFlag
Which readers to init.
static bool isFromSwiftDb(swift::misc::network::CEntityFlags::Entity entity)
Reads from swift DB?
Backend services of the swift project, like dealing with the network or the simulators.
Definition: actionbind.cpp:7
#define SWIFT_CORE_EXPORT
Export a class or function from the library.