sneedmc/api/logic/net/MetaCacheSink.h
Petr Mrázek e1465f4848 NOISSUE refactor NetAction to be based on Task
Still missing some things, this is part 1.
2017-04-29 02:24:00 +02:00

23 lines
527 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 */
Task::Status initCache(QNetworkRequest & request) override;
Task::Status finalizeCache(QNetworkReply & reply) override;
private: /* data */
MetaEntryPtr m_entry;
ChecksumValidator * m_md5Node;
};
}