summaryrefslogtreecommitdiffstats
path: root/subsurface-core/cloudstorage.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-26 12:24:27 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-26 09:50:32 -0800
commit8b7427c56d487a9f41afef01b6d7952e8e1e15af (patch)
treea715ce04ff0e31abaa4543a738d634462e74cedb /subsurface-core/cloudstorage.h
parent411f455291a547c782588ec8327ec5f8a34f243c (diff)
downloadsubsurface-8b7427c56d487a9f41afef01b6d7952e8e1e15af.tar.gz
Move CloudStorage out of the widgets
Cloud Storage is a non-gui based class, we currently use two different approaches for cloud storage, one on the desktop target and other on the mobile target, we should use only one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/cloudstorage.h')
-rw-r--r--subsurface-core/cloudstorage.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/subsurface-core/cloudstorage.h b/subsurface-core/cloudstorage.h
new file mode 100644
index 000000000..b4b21dd2a
--- /dev/null
+++ b/subsurface-core/cloudstorage.h
@@ -0,0 +1,27 @@
+#ifndef CLOUD_STORAGE_H
+#define CLOUD_STORAGE_H
+
+#include <QObject>
+#include <QNetworkReply>
+
+class CloudStorageAuthenticate : public QObject {
+ Q_OBJECT
+public:
+ QNetworkReply* backend(QString email, QString password, QString pin = "", QString newpasswd = "");
+ explicit CloudStorageAuthenticate(QObject *parent);
+signals:
+ void finishedAuthenticate();
+ void passwordChangeSuccessful();
+private
+slots:
+ void uploadError(QNetworkReply::NetworkError error);
+ void sslErrors(QList<QSslError> errorList);
+ void uploadFinished();
+private:
+ QNetworkReply *reply;
+ QString userAgent;
+ bool verbose;
+};
+
+QNetworkAccessManager *manager();
+#endif \ No newline at end of file