pollymc/launcher/net/MetaCacheSink.h

24 lines
566 B
C
Raw Normal View History

#pragma once
#include "ChecksumValidator.h"
#include "FileSink.h"
#include "net/HttpMetaCache.h"
namespace Net {
class MetaCacheSink : public FileSink {
public:
MetaCacheSink(MetaEntryPtr entry, ChecksumValidator* md5sum);
virtual ~MetaCacheSink() = default;
auto hasLocalData() -> bool override;
protected:
auto initCache(QNetworkRequest& request) -> Task::State override;
auto finalizeCache(QNetworkReply& reply) -> Task::State override;
private:
2018-07-15 18:21:05 +05:30
MetaEntryPtr m_entry;
ChecksumValidator* m_md5Node;
};
} // namespace Net