2016-05-28 18:54:17 +01:00
|
|
|
#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();
|
2016-10-28 01:19:19 +01:00
|
|
|
bool hasLocalData() override;
|
2016-05-28 18:54:17 +01:00
|
|
|
|
|
|
|
protected: /* methods */
|
2017-05-03 22:11:52 +01:00
|
|
|
JobStatus initCache(QNetworkRequest & request) override;
|
|
|
|
JobStatus finalizeCache(QNetworkReply & reply) override;
|
2016-05-28 18:54:17 +01:00
|
|
|
|
|
|
|
private: /* data */
|
|
|
|
MetaEntryPtr m_entry;
|
|
|
|
ChecksumValidator * m_md5Node;
|
|
|
|
};
|
|
|
|
}
|