summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qmlmanager.h')
-rw-r--r--qt-mobile/qmlmanager.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h
index 22feadba3..bd6884894 100644
--- a/qt-mobile/qmlmanager.h
+++ b/qt-mobile/qmlmanager.h
@@ -3,6 +3,7 @@
#include <QObject>
#include <QString>
+#include <QNetworkAccessManager>
#include "gpslocation.h"
@@ -48,16 +49,26 @@ public:
void setLogText(const QString &logText);
void appendTextToLog(const QString &newText);
+ typedef void(QMLManager::*execute_function_type)();
+
public slots:
void savePreferences();
void saveCloudCredentials();
+ void checkCredentialsAndExecute(execute_function_type execute);
+ void tryRetrieveDataFromBackend();
+ void handleError(QNetworkReply::NetworkError nError);
+ void handleSslErrors(const QList<QSslError> &errors);
+ void retrieveUserid();
void loadDives();
+ void loadDivesWithValidCredentials();
+ void provideAuth(QNetworkReply *reply, QAuthenticator *auth);
void commitChanges(QString diveId, QString suit, QString buddy, QString diveMaster, QString notes);
void saveChanges();
void addDive();
void applyGpsData();
void sendGpsData();
void clearGpsData();
+ void finishSetup();
private:
QString m_cloudUserName;
@@ -71,6 +82,9 @@ private:
GpsLocation *locationProvider;
bool m_loadFromCloud;
static QMLManager *m_instance;
+ QNetworkReply *reply;
+ QNetworkRequest request;
+ QNetworkAccessManager *mgr;
signals:
void cloudUserNameChanged();