23 #ifndef __WADSEEKER_H_
24 #define __WADSEEKER_H_
29 #include <QStringList>
33 #include "entities/waddownloadinfo.h"
34 #include "wadseekerexportinfo.h"
35 #include "wadseekermessagetype.h"
38 class WadArchiveClient;
94 static const QString defaultSites[];
103 static const QString forbiddenWads[];
108 static const QString defaultIdgamesUrl();
115 static QStringList defaultSitesListEncoded();
120 static ModSet filterAllowedOnlyWads(
const ModSet &wads);
124 static ModSet filterForbiddenOnlyWads(
const ModSet &wads);
135 static bool isForbiddenWad(
const ModFile &wad);
153 bool isDownloadingFile(
const ModFile &file)
const;
164 bool isWorking()
const;
178 void setCustomSite(
const QString &url);
186 void setCustomSites(
const QStringList &urls);
194 void setIdgamesEnabled(
bool bEnabled);
199 void setIdgamesUrl(QString archiveURL);
209 void setMaximumConcurrentDownloads(
unsigned max);
219 void setMaximumConcurrentSeeks(
unsigned max);
231 void setPrimarySites(
const QStringList &urlList);
239 void setPrimarySitesToDefault();
250 void setTargetDirectory(
const QString &dir);
260 void setWadArchiveEnabled(
bool enabled);
274 void skipFileCurrentUrl(
const QString &fileName);
282 void skipService(
const QString &service);
295 void skipSiteSeek(
const QUrl &url);
306 bool startSeek(
const ModSet &wads);
314 QString targetDirectory()
const;
332 void allDone(
bool bSuccess);
346 void fileDownloadFinished(
const ModFile &filename);
363 void fileDownloadProgress(
const ModFile &filename, qint64 done, qint64 total);
373 void fileDownloadStarted(
const ModFile &filename,
const QUrl &url);
383 void fileInstalled(
const ModFile &filename);
392 void message(
const QString &msg, WadseekerLib::MessageType type);
402 void seekStarted(
const ModSet &filenames);
417 void serviceStarted(
const QString &name);
428 void serviceFinished(
const QString &name);
433 void siteFinished(
const QUrl &site);
438 void siteProgress(
const QUrl &site, qint64 bytes, qint64 total);
443 void siteRedirect(
const QUrl &oldUrl,
const QUrl &newUrl);
448 void siteStarted(
const QUrl &site);
454 void abortWwwSeeker();
455 void cleanUpAfterFinish();
456 bool isAllFinished()
const;
461 void prepareSeekObjects();
463 void setupIdgamesClients(
const QList<WadDownloadInfo> &wadDownloadInfoList);
464 void setupSitesUrls();
466 void startNextIdgamesClient();
471 void cleanUpIfAllFinished();
472 void fileLinkFound(
const QString &filename,
const QUrl &url);
473 void fileMirrorLinksFound(
const QString &filename,
const QList<QUrl> &urls);
474 void idgamesClientFinished(Idgames *pEmitter);
475 void reportBadUrl(
const QUrl &url);
476 void wadRetrieverDownloadFinished(WadDownloadInfo wadDownloadInfo);
477 void wadRetrieverDownloadProgress(WadDownloadInfo wadDownloadInfo, qint64 current, qint64 total);
478 void wadRetrieverDownloadStarted(WadDownloadInfo wadDownloadInfo,
const QUrl &url);
479 void wadRetrieverFinished();
480 void wadRetrieverMessage(
const QString &message, WadseekerLib::MessageType type);
481 void wadRetrieverWadInstalled(WadDownloadInfo wadDownloadInfo);
482 void wwwSeekerFinished();