Cloud storage: first stab at creating an account on the backend

This triggers when the email address / password is changed in the
preferences. It opens an https connection with the backend server (the URL
is hardcoded) which should create an account with these credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-04 17:26:30 -07:00
parent d9801b67b4
commit 318bf5cccc
3 changed files with 70 additions and 2 deletions

View file

@ -109,6 +109,21 @@ slots:
virtual void startDownload() { }
virtual void startUpload() { }
virtual void buttonClicked(QAbstractButton *button) { }
};
class CloudStorageAuthenticate : QObject {
Q_OBJECT
public:
QNetworkReply* authenticate(QString email, QString password);
explicit CloudStorageAuthenticate(QObject *parent);
private
slots:
void uploadError(QNetworkReply::NetworkError error);
void sslErrors(QList<QSslError> errorList);
void uploadFinished();
private:
QNetworkReply *reply;
QString userAgent;
};