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/Validator.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 api/logic/net/Validator.h (limited to 'api/logic/net/Validator.h') diff --git a/api/logic/net/Validator.h b/api/logic/net/Validator.h new file mode 100644 index 00000000..a390ab28 --- /dev/null +++ b/api/logic/net/Validator.h @@ -0,0 +1,20 @@ +#pragma once + +#include "net/NetAction.h" + +#include "multimc_logic_export.h" + +namespace Net { +class MULTIMC_LOGIC_EXPORT Validator +{ +public: /* con/des */ + Validator() {}; + virtual ~Validator() {}; + +public: /* methods */ + virtual bool init(QNetworkRequest & request) = 0; + virtual bool write(QByteArray & data) = 0; + virtual bool abort() = 0; + virtual bool validate(QNetworkReply & reply) = 0; +}; +} \ No newline at end of file -- cgit v1.2.3