aboutsummaryrefslogtreecommitdiff
path: root/src/gopherclient.hpp
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-16 22:01:59 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-16 22:01:59 +0200
commita3f3e3933c4a2522e233917a6795c6e9d677e65c (patch)
tree6e1bd483bbd5e8ca6fee4566e544de48bfa754a6 /src/gopherclient.hpp
parentbc18d9356828f1ae40d3b4ce5432b30ca13cfc15 (diff)
downloadkristall-a3f3e3933c4a2522e233917a6795c6e9d677e65c.tar.gz
Refactoring: Changes internal structure of requests and unifies a lot of code. Now all errors are handled the same.
Diffstat (limited to 'src/gopherclient.hpp')
-rw-r--r--src/gopherclient.hpp17
1 files changed, 7 insertions, 10 deletions
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 <QTcpSocket>
#include <QUrl>
-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();