refactoring: added classes for working with server configs
This commit is contained in:
parent
a2d30efaab
commit
2d22a74b22
34 changed files with 1441 additions and 91 deletions
32
client/core/models/servers/serverConfig.h
Normal file
32
client/core/models/servers/serverConfig.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#ifndef SERVERCONFIG_H
|
||||
#define SERVERCONFIG_H
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QSharedPointer>
|
||||
#include <QString>
|
||||
|
||||
#include "core/defs.h"
|
||||
#include "core/models/containers/containerConfig.h"
|
||||
|
||||
class ServerConfig
|
||||
{
|
||||
public:
|
||||
ServerConfig(const QJsonObject &serverConfigObject);
|
||||
|
||||
virtual QJsonObject toJson() const;
|
||||
|
||||
static QSharedPointer<ServerConfig> createServerConfig(const QJsonObject &serverConfigObject);
|
||||
|
||||
amnezia::ServerConfigType type;
|
||||
|
||||
QString hostName;
|
||||
|
||||
QString dns1;
|
||||
QString dns2;
|
||||
|
||||
QString defaultContainer;
|
||||
|
||||
QMap<QString, ContainerConfig> containerConfigs;
|
||||
};
|
||||
|
||||
#endif // SERVERCONFIG_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue