23 #ifndef DOOMSEEKER_UPDATER_AUTOUPDATER_H 24 #define DOOMSEEKER_UPDATER_AUTOUPDATER_H 28 #include <QDomDocument> 29 #include <QNetworkReply> 136 static const QString QT_PACKAGE_NAME;
137 static const QString WADSEEKER_PACKAGE_NAME;
144 static QString errorCodeToString(
ErrorCode code);
152 static QString updateStorageDirPath();
181 QString errorString()
const;
183 bool isRunning()
const;
231 void confirmDownloadAndInstall();
247 void overallProgress(
int current,
int total,
const QString& msg);
248 void packageDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
249 void statusMessage(
const QString &message);
257 QDomDocument adjustUpdaterScriptXml(
const QByteArray& xmlSource);
265 void dumpUpdatePackagesToLog(
const QList<UpdatePackage>& packages);
266 void emitOverallProgress(
const QString& message);
267 void emitStatusMessage(
const QString &message);
269 QUrl mkVersionDataFileUrl();
274 void startNextPackageDownload();
277 void onPackageDownloadFinish();
278 void onPackageDownloadReadyRead();
279 void onPackageScriptDownloadFinish();
280 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.
static const QString FALLBACK_MAIN_PROGRAM_PACKAGE_NAME
Support for downgrading to monolithic Doomseeker package.
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.