mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
32 lines
998 B
C++
32 lines
998 B
C++
#pragma once
|
|
#include "DialFields.h"
|
|
#include "include/configs/baseConfig.h"
|
|
|
|
namespace Configs
|
|
{
|
|
class OutboundCommons : public baseConfig
|
|
{
|
|
public:
|
|
virtual ~OutboundCommons() = default;
|
|
QString name;
|
|
QString server;
|
|
int server_port = 0;
|
|
std::shared_ptr<DialFields> dialFields = std::make_shared<DialFields>();
|
|
|
|
OutboundCommons()
|
|
{
|
|
_add(new configItem("name", &name, string));
|
|
_add(new configItem("server", &server, string));
|
|
_add(new configItem("server_port", &server_port, integer));
|
|
_add(new configItem("dial_fields", dynamic_cast<JsonStore *>(dialFields.get()), jsonStore));
|
|
}
|
|
|
|
// baseConfig overrides
|
|
bool ParseFromLink(const QString& link) override;
|
|
bool ParseFromJson(const QJsonObject& object) override;
|
|
QString ExportToLink() override;
|
|
QJsonObject ExportToJson() override;
|
|
BuildResult Build() override;
|
|
};
|
|
}
|