subsurface/core/checkcloudconnection.h
Dirk Hohndel 766f297bc4 cloudstorage: try alternative server if first connection fails
If we can't reach our preferred server, try using a different one.
The diff makes more sense when ignoring white space.

With this we check the connection to the cloud server much earlier and
in case of failure to connect try a different cloud_base_url.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-04-19 12:51:01 -07:00

25 lines
542 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef CHECKCLOUDCONNECTION_H
#define CHECKCLOUDCONNECTION_H
#include <QObject>
#include <QNetworkReply>
#include <QSsl>
class CheckCloudConnection : public QObject {
Q_OBJECT
public:
CheckCloudConnection(QObject *parent = 0);
bool checkServer();
void pickServer();
private:
QNetworkReply *reply;
bool nextServer();
private
slots:
void sslErrors(const QList<QSslError> &errorList);
void gotIP(QNetworkReply *reply);
void gotContinent(QNetworkReply *reply);
};
#endif // CHECKCLOUDCONNECTION_H