From a1abbd9e05c80584d831b1d12c27c5f7d731cece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 28 May 2016 19:54:17 +0200 Subject: NOISSUE refactor *Download into more, smaller pieces * Download is now Download. * Download uses Sink subclasses to process various events. * Validators can be used to further customize the Sink behaviour. --- api/logic/net/MetaCacheSink.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 api/logic/net/MetaCacheSink.h (limited to 'api/logic/net/MetaCacheSink.h') diff --git a/api/logic/net/MetaCacheSink.h b/api/logic/net/MetaCacheSink.h new file mode 100644 index 00000000..98e9bba1 --- /dev/null +++ b/api/logic/net/MetaCacheSink.h @@ -0,0 +1,21 @@ +#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(); + +protected: /* methods */ + JobStatus initCache(QNetworkRequest & request) override; + JobStatus finalizeCache(QNetworkReply & reply) override; + +private: /* data */ + MetaEntryPtr m_entry; + ChecksumValidator * m_md5Node; +}; +} -- cgit v1.2.3