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);
256 void setWadArchiveEnabled(
bool enabled);
270 void skipFileCurrentUrl(
const QString &fileName);
278 void skipService(
const QString &service);
291 void skipSiteSeek(
const QUrl &url);
302 bool startSeek(
const ModSet &wads);
310 QString targetDirectory()
const;
328 void allDone(
bool bSuccess);
342 void fileDownloadFinished(
const ModFile &filename);
359 void fileDownloadProgress(
const ModFile &filename, qint64 done, qint64 total);
369 void fileDownloadStarted(
const ModFile &filename,
const QUrl &url);
379 void fileInstalled(
const ModFile &filename);
388 void message(
const QString &msg, WadseekerLib::MessageType type);
398 void seekStarted(
const ModSet &filenames);
413 void serviceStarted(
const QString &name);
424 void serviceFinished(
const QString &name);
429 void siteFinished(
const QUrl &site);
434 void siteProgress(
const QUrl &site, qint64 bytes, qint64 total);
439 void siteRedirect(
const QUrl &oldUrl,
const QUrl &newUrl);
444 void siteStarted(
const QUrl &site);
450 void abortWwwSeeker();
451 void cleanUpAfterFinish();
452 bool isAllFinished()
const;
457 void prepareSeekObjects();
459 void setupIdgamesClients(
const QList<WadDownloadInfo> &wadDownloadInfoList);
460 void setupSitesUrls();
461 void setupWadArchiveClient(
const QList<WadDownloadInfo> &wadDownloadInfos);
463 void startNextIdgamesClient();
466 void startWadArchiveClient();
467 void stopWadArchiveClient();
470 void cleanUpIfAllFinished();
471 void fileLinkFound(
const QString &filename,
const QUrl &url);
472 void fileMirrorLinksFound(
const QString &filename,
const QList<QUrl> &urls);
473 void idgamesClientFinished(Idgames *pEmitter);
474 void reportBadUrl(
const QUrl &url);
475 void wadArchiveFinished();
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();