PrismLauncher/api/logic/net/MetaCacheSink.h
Petr Mrázek dd0e996081 GH-1697 always stale files tolerate errors if a local copy is present
This fixes the situation when liteloader snapshot site is broken
and there's an older local snapshot already present.
2016-10-28 02:19:19 +02:00

23 lines
521 B
C++

#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();
bool hasLocalData() override;
protected: /* methods */
JobStatus initCache(QNetworkRequest & request) override;
JobStatus finalizeCache(QNetworkReply & reply) override;
private: /* data */
MetaEntryPtr m_entry;
ChecksumValidator * m_md5Node;
};
}