10#ifndef SOFTWARE_UPDATE_H
11#define SOFTWARE_UPDATE_H
17#include <QVersionNumber>
19class QNetworkAccessManager;
25 void reject(
const QString& reason = {});
27 bool isAccepted()
const;
28 QString reason()
const;
31 bool accepted_ =
false;
32 bool rejected_ =
false;
38 QVersionNumber version;
39 QVersionNumber shortVersion;
77 void init(
bool runWithoutSilentCheck =
false);
99 static QString
info();
112 void startAutoCheck(
int intervalSeconds = 0);
113 void stopAutoCheck();
114 bool isAutoCheckEnabled()
const;
135 static QMutex mutex_;
136 static QMutex updateMutex_;
138 QTimer* updateCheckTimer_;
139 QNetworkAccessManager* networkAccessManager_;
141 QUrl updateUrl()
const;
142 QList<AppcastItem> parseAppcast(
const QByteArray &data)
const;
145 static int __cdecl softwareUpdateCanShutdownCallback();
146 static void __cdecl shutdownRequestCallback();
147 static void __cdecl softwareUpdateEngaged();
148#elif defined(__APPLE__)
149 static void onPostponeRelaunch(
void (*proceed)(
void *ctx),
void *ctx);
153 void onNetworkReplyFinished(QNetworkReply* reply);
154 void checkForUpdates();
Definition software_update.h:22
The SoftwareUpdate class provides an interface for checking for software updates and engaging the upd...
Definition software_update.h:59
static void performUIUpdate()
Definition software_update.cpp:265
void updateCheckFailed(const QString &errorString)
void updateAvailable(QString newVersion, QString releaseNotes)
static bool plattformSupported()
Definition software_update.cpp:219
void appShutdownRequested(ShutdownEvent *shutdownEvent)
void init(bool runWithoutSilentCheck=false)
Definition software_update.cpp:125
static QString info()
Definition software_update.cpp:204
void cleanup()
Definition software_update.cpp:281
Definition software_update.h:36