summaryrefslogtreecommitdiffstats
path: root/api/logic/net/MetaCacheSink.h
diff options
context:
space:
mode:
Diffstat (limited to 'api/logic/net/MetaCacheSink.h')
-rw-r--r--api/logic/net/MetaCacheSink.h21
1 files changed, 21 insertions, 0 deletions
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;
+};
+}