mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
refactor: remove serverConfig struct (#2595)
* refactor: remove serverConfig struct * refactor: add warnings for api v1 configs * refactor: moved the server type definition to a separate namespace * refactor: simplified gateway stacks * fix: fixed server description * fix: fixed postAsync reply usage * fix: fixed validateConfig call * fix: fixed server name in notifications * fix: fixed initPrepareConfigHandler for lagacy configs
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "ui/models/api/apiAccountInfoModel.h"
|
||||
#include "ui/models/api/apiCountryModel.h"
|
||||
#include "ui/models/api/apiDevicesModel.h"
|
||||
|
||||
class SubscriptionUiController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -34,10 +35,10 @@ public:
|
||||
Q_PROPERTY(QString vpnKey READ getVpnKey NOTIFY vpnKeyExportReady)
|
||||
|
||||
public slots:
|
||||
bool exportNativeConfig(int serverIndex, const QString &serverCountryCode, const QString &fileName);
|
||||
bool revokeNativeConfig(int serverIndex, const QString &serverCountryCode);
|
||||
bool exportVpnKey(int serverIndex, const QString &fileName);
|
||||
void prepareVpnKeyExport(int serverIndex);
|
||||
bool exportNativeConfig(const QString &serverId, const QString &serverCountryCode, const QString &fileName);
|
||||
bool revokeNativeConfig(const QString &serverId, const QString &serverCountryCode);
|
||||
bool exportVpnKey(const QString &serverId, const QString &fileName);
|
||||
void prepareVpnKeyExport(const QString &serverId);
|
||||
void copyVpnKeyToClipboard();
|
||||
|
||||
bool fillAvailableServices();
|
||||
@@ -45,21 +46,21 @@ public slots:
|
||||
bool importFreeFromGateway();
|
||||
bool restoreServiceFromAppStore();
|
||||
bool importTrialFromGateway(const QString &email);
|
||||
bool updateServiceFromGateway(const int serverIndex, const QString &newCountryCode, const QString &newCountryName,
|
||||
bool updateServiceFromGateway(const QString &serverId, const QString &newCountryCode, const QString &newCountryName,
|
||||
bool reloadServiceConfig = false);
|
||||
bool updateServiceFromTelegram(const int serverIndex);
|
||||
bool deactivateDevice(int serverIndex);
|
||||
bool deactivateExternalDevice(int serverIndex, const QString &uuid, const QString &serverCountryCode);
|
||||
bool deactivateDevice(const QString &serverId);
|
||||
bool deactivateExternalDevice(const QString &serverId, const QString &uuid, const QString &serverCountryCode);
|
||||
|
||||
void validateConfig();
|
||||
|
||||
void setCurrentProtocol(int serverIndex, const QString &protocolName);
|
||||
bool isVlessProtocol(int serverIndex);
|
||||
void setCurrentProtocol(const QString &serverId, const QString &protocolName);
|
||||
bool isVlessProtocol(const QString &serverId);
|
||||
|
||||
void removeApiConfig(int serverIndex);
|
||||
void removeApiConfig(const QString &serverId);
|
||||
|
||||
bool getAccountInfo(const QString &serverId, bool reload);
|
||||
void getRenewalLink(const QString &serverId);
|
||||
|
||||
bool getAccountInfo(int serverIndex, bool reload);
|
||||
void getRenewalLink(int serverIndex);
|
||||
void updateApiCountryModel();
|
||||
void updateApiDevicesModel();
|
||||
|
||||
@@ -80,6 +81,8 @@ signals:
|
||||
|
||||
void vpnKeyExportReady();
|
||||
|
||||
void unsupportedConnectDrawerRequested();
|
||||
|
||||
private:
|
||||
QList<QString> getQrCodes();
|
||||
int getQrCodesCount();
|
||||
|
||||
Reference in New Issue
Block a user