NOISSUE refactor *Download into more, smaller pieces
* Download is now Download. * Download uses Sink subclasses to process various events. * Validators can be used to further customize the Sink behaviour.
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
|
||||
#include "BaseWonkoEntityRemoteLoadTask.h"
|
||||
|
||||
#include "net/CacheDownload.h"
|
||||
#include "net/Download.h"
|
||||
#include "net/HttpMetaCache.h"
|
||||
#include "net/NetJob.h"
|
||||
#include "wonko/format/WonkoFormat.h"
|
||||
@ -37,7 +37,7 @@ void BaseWonkoEntityRemoteLoadTask::executeTask()
|
||||
|
||||
auto entry = ENV.metacache()->resolveEntry("wonko", url().toString());
|
||||
entry->setStale(true);
|
||||
m_dl = CacheDownload::make(url(), entry);
|
||||
m_dl = Net::Download::makeCached(url(), entry);
|
||||
job->addNetAction(m_dl);
|
||||
connect(job, &NetJob::failed, this, &BaseWonkoEntityRemoteLoadTask::emitFailed);
|
||||
connect(job, &NetJob::succeeded, this, &BaseWonkoEntityRemoteLoadTask::networkFinished);
|
||||
|
@ -18,6 +18,11 @@
|
||||
#include "tasks/Task.h"
|
||||
#include <memory>
|
||||
|
||||
namespace Net
|
||||
{
|
||||
class Download;
|
||||
}
|
||||
|
||||
class BaseWonkoEntity;
|
||||
class WonkoIndex;
|
||||
class WonkoVersionList;
|
||||
@ -43,7 +48,7 @@ private:
|
||||
void executeTask() override;
|
||||
|
||||
BaseWonkoEntity *m_entity;
|
||||
std::shared_ptr<class CacheDownload> m_dl;
|
||||
std::shared_ptr<Net::Download> m_dl;
|
||||
};
|
||||
|
||||
class WonkoIndexRemoteLoadTask : public BaseWonkoEntityRemoteLoadTask
|
||||
|
Reference in New Issue
Block a user