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:
21
api/logic/net/MetaCacheSink.h
Normal file
21
api/logic/net/MetaCacheSink.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "FileSink.h"
|
||||
#include "ChecksumValidator.h"
|
||||
#include "net/HttpMetaCache.h"
|
||||
|
||||
namespace Net {
|
||||
class MetaCacheSink : public FileSink
|
||||
{
|
||||
public: /* con/des */
|
||||
MetaCacheSink(MetaEntryPtr entry, ChecksumValidator * md5sum);
|
||||
virtual ~MetaCacheSink();
|
||||
|
||||
protected: /* methods */
|
||||
JobStatus initCache(QNetworkRequest & request) override;
|
||||
JobStatus finalizeCache(QNetworkReply & reply) override;
|
||||
|
||||
private: /* data */
|
||||
MetaEntryPtr m_entry;
|
||||
ChecksumValidator * m_md5Node;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user