23 #ifndef DOOMSEEKER_UPDATER_AUTOUPDATER_H
24 #define DOOMSEEKER_UPDATER_AUTOUPDATER_H
28 #include <QDomDocument>
29 #include <QNetworkReply>
138 static QString errorCodeToString(
ErrorCode code);
146 static QString updateStorageDirPath();
175 QString errorString()
const;
177 bool isRunning()
const;
209 void setIgnoreRevisions(
const QMap<QString, QList<unsigned long long> >& packagesRevisions);
225 void confirmDownloadAndInstall();
241 void overallProgress(
int current,
int total,
const QString& msg);
242 void packageDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
243 void statusMessage(
const QString &message);
251 QDomDocument adjustUpdaterScriptXml(
const QByteArray& xmlSource);
259 void dumpUpdatePackagesToLog(
const QList<UpdatePackage>& packages);
260 void emitOverallProgress(
const QString& message);
261 void emitStatusMessage(
const QString &message);
263 QUrl mkVersionDataFileUrl();
268 void startNextPackageDownload();
271 void onPackageDownloadFinish();
272 void onPackageDownloadReadyRead();
273 void onPackageScriptDownloadFinish();
274 void onUpdaterInfoDownloadFinish();
static const QString UPDATER_INFO_URL_BASE
Base URL to the directory where "update-info*" JSON files are contained.
void setIgnoreRevisions(const QMap< QString, QList< unsigned long long > > &packagesRevisions)
Revisions set in this map will not be treated as updates even if they differ from the currently insta...
One of packages has no revision info.
QNetworkReply::NetworkError lastNetworkError() const
The network error that caused the updater to fail.
Failed to create directory for updates storage.
static QString updaterScriptPath()
Path to updater script XML file.
No valid UpdateChannel was specified.
const UpdateChannel & channel() const
setChannel() .
Failed to download update package.
QUrl.isValid() for package download URL returned false or QUrl.isRelative() returned true...
Update script can't be merged and stored on the local filesystem.
const QList< UpdatePackage > & newUpdatePackages() const
List of new update packages to install.
One of packages has no download URL.
void setChannel(const UpdateChannel &updateChannel)
Update channel name.
static const QString PLUGIN_PREFIX
Prefix for all plugins packages names.
File was parseable but there was no main program information inside.
Deals with program updates/upgrades.
const QStringList & downloadedPackagesFilenames() const
Filenames for packages which are ready to install.
void setRequireDownloadAndInstallConfirmation(bool b)
Controls if the download&installation process is automated.
Network error when downloading updater info file.
Updater info file can't be parsed.
Update was aborted by the user or by the program.
Package file can't be stored on the local filesystem.
static const QString MAIN_PROGRAM_PACKAGE_NAME
Package name for the main program.
void downloadAndInstallConfirmationRequested()
Information on update packages has been received and install confirmation is requested.
void finished()
AutoUpdater has finished its job.