From a3f3e3933c4a2522e233917a6795c6e9d677e65c Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Tue, 16 Jun 2020 22:01:59 +0200 Subject: Refactoring: Changes internal structure of requests and unifies a lot of code. Now all errors are handled the same. --- src/gopherclient.hpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/gopherclient.hpp') diff --git a/src/gopherclient.hpp b/src/gopherclient.hpp index f9913c5..2ead2c4 100644 --- a/src/gopherclient.hpp +++ b/src/gopherclient.hpp @@ -5,7 +5,9 @@ #include #include -class GopherClient : public QObject +#include "protocolhandler.hpp" + +class GopherClient : public ProtocolHandler { Q_OBJECT public: @@ -13,18 +15,13 @@ public: ~GopherClient() override; - bool startRequest(QUrl const & url); - - bool isInProgress() const; - - bool cancelRequest(); + bool supportsScheme(QString const & scheme) const override; -signals: - void requestProgress(qint64 transferred); + bool startRequest(QUrl const & url) override; - void requestComplete(QByteArray const & data, QString const & mime); + bool isInProgress() const override; - void requestFailed(QString const & message); + bool cancelRequest() override; private slots: void on_connected(); -- cgit v1.2.3