summaryrefslogtreecommitdiffstats
path: root/logic/GoUpdate.h
diff options
context:
space:
mode:
Diffstat (limited to 'logic/GoUpdate.h')
-rw-r--r--logic/GoUpdate.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/logic/GoUpdate.h b/logic/GoUpdate.h
new file mode 100644
index 00000000..756a71cf
--- /dev/null
+++ b/logic/GoUpdate.h
@@ -0,0 +1,43 @@
+#pragma once
+#include "net/NetJob.h"
+
+class GoUpdate : public QObject
+{
+ Q_OBJECT
+
+public:
+ struct version_channel
+ {
+ QString id;
+ QString name;
+ int latestVersion;
+ };
+
+ struct version_summary
+ {
+ int id;
+ QString name;
+ };
+
+signals:
+ void updateAvailable();
+
+private slots:
+ void updateCheckFinished();
+ void updateCheckFailed();
+
+public:
+ GoUpdate();
+ void checkForUpdate();
+private:
+ NetJobPtr index_job;
+ NetJobPtr fromto_job;
+
+ QString repoUrlBase;
+ QString builderName;
+ int currentBuildIndex;
+ int newBuildIndex = -1;
+
+ QList<version_summary> versions;
+ QList<version_channel> channels;
+};