2025-02-06 15:26:47 +07:00
|
|
|
#ifndef APIUTILS_H
|
|
|
|
|
#define APIUTILS_H
|
|
|
|
|
|
2025-02-15 13:58:48 +07:00
|
|
|
#include <QNetworkReply>
|
2025-02-06 15:26:47 +07:00
|
|
|
#include <QObject>
|
|
|
|
|
|
2025-02-07 22:22:14 +07:00
|
|
|
#include "apiDefs.h"
|
2025-02-15 13:58:48 +07:00
|
|
|
#include "core/defs.h"
|
2025-02-07 22:22:14 +07:00
|
|
|
|
|
|
|
|
namespace apiUtils
|
2025-02-06 15:26:47 +07:00
|
|
|
{
|
2025-02-07 22:22:14 +07:00
|
|
|
bool isServerFromApi(const QJsonObject &serverConfigObject);
|
|
|
|
|
|
2025-02-06 15:26:47 +07:00
|
|
|
bool isSubscriptionExpired(const QString &subscriptionEndDate);
|
2025-02-07 22:22:14 +07:00
|
|
|
|
2025-04-16 09:58:44 +07:00
|
|
|
bool isPremiumServer(const QJsonObject &serverConfigObject);
|
|
|
|
|
|
2025-02-07 22:22:14 +07:00
|
|
|
apiDefs::ConfigType getConfigType(const QJsonObject &serverConfigObject);
|
2025-02-15 11:50:42 +07:00
|
|
|
apiDefs::ConfigSource getConfigSource(const QJsonObject &serverConfigObject);
|
2025-02-15 13:58:48 +07:00
|
|
|
|
|
|
|
|
amnezia::ErrorCode checkNetworkReplyErrors(const QList<QSslError> &sslErrors, QNetworkReply *reply);
|
2025-05-13 12:29:33 +08:00
|
|
|
|
|
|
|
|
QString getPremiumV1VpnKey(const QJsonObject &serverConfigObject);
|
2025-02-06 15:26:47 +07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif // APIUTILS_H
|