swift
networksetup.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 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_DATA_NETWORKSETUP_H
7 #define SWIFT_CORE_DATA_NETWORKSETUP_H
8 
9 #include <QObject>
10 #include <QString>
11 
12 #include "core/data/vatsimsetup.h"
13 #include "core/swiftcoreexport.h"
18 #include "misc/settingscache.h"
19 #include "misc/statusmessage.h"
20 
21 namespace swift::core::data
22 {
24  class SWIFT_CORE_EXPORT CNetworkSetup : public QObject
25  {
26  Q_OBJECT
27 
28  public:
30  CNetworkSetup();
31 
33  virtual ~CNetworkSetup() {}
34 
36  swift::misc::network::CServer getLastVatsimServer() const;
37 
39  swift::misc::CStatusMessage setLastVatsimServer(const swift::misc::network::CServer &server);
40 
42  swift::misc::network::CServer getLastServer() const;
43 
46 
48  swift::misc::network::CEcosystem getLastEcosystem() const;
49 
51  swift::misc::network::CServerList getOtherServers() const;
52 
54  swift::misc::network::CServerList getOtherServersPlusPredefinedServers() const;
55 
57  bool wasLastUsedWithVatsim() const;
58 
60  bool wasLastUsedWithOtherServer() const;
61 
62  signals:
64  void setupChanged();
65 
66  private:
68  void onSettingsChanged();
69 
71  this, &CNetworkSetup::onSettingsChanged
72  };
74  this, &CNetworkSetup::onSettingsChanged
75  };
77  this, &CNetworkSetup::onSettingsChanged
78  };
79  };
80 } // namespace swift::core::data
81 
82 #endif // SWIFT_CORE_DATA_NETWORKSETUP_H
Remembering the last servers and ecosystem.
Definition: networksetup.h:25
void setupChanged()
Setup changed.
virtual ~CNetworkSetup()
Destructor.
Definition: networksetup.h:33
Streamable status message, e.g.
Ecosystem of server belonging together.
Definition: ecosystem.h:21
Value object encapsulating information of a server.
Definition: server.h:28
Value object encapsulating a list of servers.
Definition: serverlist.h:23
Core data traits (aka cached values) and classes.
#define SWIFT_CORE_EXPORT
Export a class or function from the library.