mirror of
https://github.com/outbackdingo/amnezia-client.git
synced 2026-01-27 10:18:14 +00:00
* fix(api_key): added displaying vpn_key field added in older version of the app * revert changes * fix: implemented generation of api key text for PremiumV2 * fix: deleted unnecessary code * saving apikey text when generating * added method for vpn key export, fixed wrong saving file
30 lines
994 B
C++
30 lines
994 B
C++
#ifndef APIUTILS_H
|
|
#define APIUTILS_H
|
|
|
|
#include <QNetworkReply>
|
|
#include <QObject>
|
|
|
|
#include "apiDefs.h"
|
|
#include "core/defs.h"
|
|
|
|
namespace apiUtils
|
|
{
|
|
bool isServerFromApi(const QJsonObject &serverConfigObject);
|
|
|
|
bool isSubscriptionExpired(const QString &subscriptionEndDate);
|
|
|
|
bool isPremiumServer(const QJsonObject &serverConfigObject);
|
|
|
|
apiDefs::ConfigType getConfigType(const QJsonObject &serverConfigObject);
|
|
apiDefs::ConfigSource getConfigSource(const QJsonObject &serverConfigObject);
|
|
|
|
amnezia::ErrorCode checkNetworkReplyErrors(const QList<QSslError> &sslErrors, const QString &replyErrorString,
|
|
const QNetworkReply::NetworkError &replyError, const int httpStatusCode,
|
|
const QByteArray &responseBody);
|
|
|
|
QString getPremiumV1VpnKey(const QJsonObject &serverConfigObject);
|
|
QString getPremiumV2VpnKey(const QJsonObject &serverConfigObject);
|
|
}
|
|
|
|
#endif // APIUTILS_H
|