2017-04-27 18:24:53 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2016-01-26 14:24:27 +00:00
|
|
|
#ifndef CLOUD_STORAGE_H
|
|
|
|
#define CLOUD_STORAGE_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QNetworkReply>
|
|
|
|
|
|
|
|
class CloudStorageAuthenticate : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2016-01-26 14:28:38 +00:00
|
|
|
QNetworkReply* backend(const QString& email,const QString& password,const QString& pin = QString(),const QString& newpasswd = QString());
|
2016-01-26 14:24:27 +00:00
|
|
|
explicit CloudStorageAuthenticate(QObject *parent);
|
|
|
|
signals:
|
|
|
|
void finishedAuthenticate();
|
|
|
|
void passwordChangeSuccessful();
|
|
|
|
private
|
|
|
|
slots:
|
|
|
|
void uploadError(QNetworkReply::NetworkError error);
|
2019-04-01 20:15:19 +00:00
|
|
|
void sslErrors(const QList<QSslError> &errorList);
|
2016-01-26 14:24:27 +00:00
|
|
|
void uploadFinished();
|
|
|
|
private:
|
|
|
|
QNetworkReply *reply;
|
|
|
|
QString userAgent;
|
2018-09-10 13:49:14 +00:00
|
|
|
QString cloudNewPassword;
|
2016-01-26 14:24:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
QNetworkAccessManager *manager();
|
2017-04-27 18:24:53 +00:00
|
|
|
#endif
|