From 75ec461eeaa851cb5c53f4cfffc434e3e529ed1d Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Mon, 22 Jun 2020 21:10:04 +0200 Subject: Restructures the project source and cleans up a bit --- src/protocols/fingerclient.hpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/protocols/fingerclient.hpp (limited to 'src/protocols/fingerclient.hpp') diff --git a/src/protocols/fingerclient.hpp b/src/protocols/fingerclient.hpp new file mode 100644 index 0000000..63d04fd --- /dev/null +++ b/src/protocols/fingerclient.hpp @@ -0,0 +1,39 @@ +#ifndef FINGERCLIENT_HPP +#define FINGERCLIENT_HPP + +#include +#include +#include + +#include "protocolhandler.hpp" + +class FingerClient : public ProtocolHandler +{ + Q_OBJECT +public: + explicit FingerClient(); + + ~FingerClient() override; + + bool supportsScheme(QString const & scheme) const override; + + bool startRequest(QUrl const & url, RequestOptions options) override; + + bool isInProgress() const override; + + bool cancelRequest() override; + +private slots: + void on_connected(); + void on_readRead(); + void on_finished(); + void on_socketError(QTcpSocket::SocketError error_code); + +private: + QTcpSocket socket; + QByteArray body; + bool was_cancelled; + QString requested_user; +}; + +#endif // FINGERCLIENT_HPP -- cgit v1.2.3