mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
* Add news and notifications * Add localization for news and notifications * Remove news caching * Add fetching news befor openning news page * Fix not updating news page * Delete debug output * Remove news and notificztions with only self-hosted servers * Add stack filters to fetching news request * Add fetching news with changing stack in the client * small refactoring * polishing * Rename newsModel files and fix naming in code * fix: remove custom signals; fetch news only on stack expansion * chore: delete unnecessary code * chore: code style fixes * fix: fixed memory leak in gateway controller --------- Co-authored-by: vkamn <vk@amnezia.org>
29 lines
923 B
C++
29 lines
923 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);
|
|
}
|
|
|
|
#endif // APIUTILS_H
|