2016-05-28 23:24:17 +05:30
|
|
|
#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 05:49:19 +05:30
|
|
|
bool hasLocalData() override;
|
2016-05-28 23:24:17 +05:30
|
|
|
|
|
|
|
protected: /* methods */
|
|
|
|
JobStatus initCache(QNetworkRequest & request) override;
|
|
|
|
JobStatus finalizeCache(QNetworkReply & reply) override;
|
|
|
|
|
|
|
|
private: /* data */
|
|
|
|
MetaEntryPtr m_entry;
|
|
|
|
ChecksumValidator * m_md5Node;
|
|
|
|
};
|
|
|
|
}
|