23 #ifndef DOOMSEEKER_UPDATER_AUTOUPDATER_H 24 #define DOOMSEEKER_UPDATER_AUTOUPDATER_H 28 #include <QDomDocument> 29 #include <QNetworkReply> 132 static const QString QT_PACKAGE_NAME;
133 static const QString WADSEEKER_PACKAGE_NAME;
140 static QString errorCodeToString(
ErrorCode code);
148 static QString updateStorageDirPath();
177 QString errorString()
const;
179 bool isRunning()
const;
227 void confirmDownloadAndInstall();
243 void overallProgress(
int current,
int total,
const QString &msg);
244 void packageDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
245 void statusMessage(
const QString &message);
253 QDomDocument adjustUpdaterScriptXml(
const QByteArray &xmlSource);
261 void dumpUpdatePackagesToLog(
const QList<UpdatePackage> &packages);
262 void emitOverallProgress(
const QString &message);
263 void emitStatusMessage(
const QString &message);
265 QUrl mkVersionDataFileUrl();
270 void startNextPackageDownload();
273 void onPackageDownloadFinish();
274 void onPackageDownloadReadyRead();
275 void onPackageScriptDownloadFinish();
276 void onUpdaterInfoDownloadFinish();
static const QString UPDATER_INFO_URL_BASE
Base URL to the directory where "update-info*" JSON files are contained.
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.
void setIgnoreRevisions(const QMap< QString, QList< QString > > &packagesRevisions)
Revisions set in this map will not be treated as updates even if they differ from the currently insta...
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.