swift
serversettings.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2016 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_MISC_NETWORK_SETTINGS_SERVERSSETTINGS_H
7 #define SWIFT_MISC_NETWORK_SETTINGS_SERVERSSETTINGS_H
8 
10 #include "misc/settingscache.h"
11 #include "misc/valueobject.h"
12 
13 namespace swift::misc::network::settings
14 {
18  struct TTrafficServers : public TSettingTrait<CServerList>
19  {
21  static const char *key() { return "network/trafficservers"; }
22 
24  static const QString &humanReadable()
25  {
26  static const QString name("Traffic servers");
27  return name;
28  }
29  };
30 
34  struct TCurrentTrafficServer : public TSettingTrait<CServer>
35  {
37  static const char *key() { return "network/currenttrafficserver"; }
38 
40  static const QString &humanReadable()
41  {
42  static const QString name("Current traffic servers");
43  return name;
44  }
45 
48  {
49  static const CServer dv;
50  return dv;
51  }
52  };
53 } // namespace swift::misc::network::settings
54 
55 #endif // SWIFT_MISC_NETWORK_SETTINGS_SERVERSSETTINGS_H
Value object encapsulating information of a server.
Definition: server.h:28
Base class for traits to be used as template argument to swift::misc::CSetting.
Currently selected virtual air traffic server.
static const QString & humanReadable()
Optional human readable name.
static const swift::misc::network::CServer & defaultValue()
Return the value to use in case the supplied value does not satisfy the validator....
static const char * key()
Key string of the value. Reimplemented in derived class.
static const char * key()
Key string of the value. Reimplemented in derived class.
static const QString & humanReadable()
Optional human readable name.