mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-22 02:01:08 +07:00
41 lines
759 B
C++
41 lines
759 B
C++
|
|
#ifndef SERVERCONFIGUTILS_H
|
||
|
|
#define SERVERCONFIGUTILS_H
|
||
|
|
|
||
|
|
#include <QJsonObject>
|
||
|
|
|
||
|
|
namespace serverConfigUtils
|
||
|
|
{
|
||
|
|
|
||
|
|
enum ConfigType {
|
||
|
|
AmneziaFreeV2 = 0,
|
||
|
|
AmneziaFreeV3,
|
||
|
|
AmneziaPremiumV1,
|
||
|
|
AmneziaPremiumV2,
|
||
|
|
SelfHosted,
|
||
|
|
ExternalPremium,
|
||
|
|
|
||
|
|
SelfHostedAdmin = 8,
|
||
|
|
SelfHostedUser,
|
||
|
|
Native,
|
||
|
|
Invalid
|
||
|
|
};
|
||
|
|
|
||
|
|
enum ConfigSource {
|
||
|
|
Telegram = 1,
|
||
|
|
AmneziaGateway
|
||
|
|
};
|
||
|
|
|
||
|
|
bool isServerFromApi(const QJsonObject &serverConfigObject);
|
||
|
|
|
||
|
|
ConfigSource getConfigSource(const QJsonObject &serverConfigObject);
|
||
|
|
|
||
|
|
ConfigType configTypeFromJson(const QJsonObject &serverConfigObject);
|
||
|
|
|
||
|
|
bool isLegacyApiSubscription(ConfigType configType);
|
||
|
|
|
||
|
|
bool isApiV2Subscription(ConfigType configType);
|
||
|
|
|
||
|
|
} // namespace serverConfigUtils
|
||
|
|
|
||
|
|
#endif // SERVERCONFIGUTILS_H
|